# Install on RPi replaced nodejs with older version

**URL:** <https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434>\
**Category:** General\
**Created:** [2 November 2019 11:47 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434 "2019-11-02T11:47:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dagius](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dagius](https://discourse.nodered.org/u/dagius)\
**Post date:** [2 November 2019 11:47 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/1 "2019-11-02T11:47:37Z")

</div>

Hello, I just installed Node-RED on my Raspberry Pi 4, using your recommended batch command, which said it would only update nodejs if the version was less than 8.

I had just built the latest Github 12.13.0 version, but your batch command replaced it with 10.17 nodejs. Why did that happen? Should not 12.13.0 be preferred over 10.17? Should I rebuild 12.13

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2019 14:57 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/2 "2019-11-02T14:57:08Z")

</div>

Currently nodejs 10.x is the [preferred version](https://nodered.org/docs/faq/node-versions) which I guess is why it downgraded it. It appears that text in the docs is not correct. It is possible that some contributed nodes are not fully 12.x compatible. However I suspect that very soon the script will be amended to allow 12.x.

Did you have a particular reason for wanting 12.x? If so then you don't need to build it as [this method](https://nodesource.com/blog/installing-node-js-tutorial-ubuntu/) will install it for you I believe.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 November 2019 16:18 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/3 "2019-11-02T16:18:58Z")

</div>

The script looks for anything 7 or below, or 9 .  
Not sure why it would download 12 - will need to investigate.  
12 is (or should be fine).

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2019 17:06 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/4 "2019-11-02T17:06:24Z")

</div>

I have checked it on Ubuntu 19.10 with node 10 installed from nodesource and it does replace it. Install log shows

```auto
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package nodered
Now install nodejs
Updating nodejs v12
Using nodesource.list
Removing nodejs v12

```

and then goes on to put 10 in.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 November 2019 17:25 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/5 "2019-11-02T17:25:59Z")

</div>

I have pushed a fix to the linux installers - can you retry / retest ? Thanks  
(def not tried on ubuntu 19.10... so would be useful to know)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 November 2019 17:45 UTC](https://discourse.nodered.org/t/install-on-rpi-replaced-nodejs-with-older-version/17434/6 "2019-11-02T17:45:58Z")

</div>

Fixed on Ubuntu 19.10
