Hi All
Is there a way to update node.js to the latest version of the 14.x branch... im on latest dietpi.. however
node.js is says it version 14.0.0 and latest is 14.15.0.... however i do not want to be upgraded to the 15.0.0 branch.
which why i was asking.. some one posted a shell script from last year however that goes to the Latest node folder so will get v15.
Thanks,
update node.js Topic is solved
Re: update node.js
Hi,
many thanks for your request. There is no automated way to perform this. You would need to download the correct archive fitting your architecture from https://nodejs.org/dist/v14.15.0/ and unzip it to /usr/local/
many thanks for your request. There is no automated way to perform this. You would need to download the correct archive fitting your architecture from https://nodejs.org/dist/v14.15.0/ and unzip it to /usr/local/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: update node.js
thanks Joulinar
i took a look at the dietpi-software and was able to do the following.
INSTALL_URL_ADDRESS='https://raw.githubusercontent.com/Micha ... install.sh'
G_EXEC curl -sSfLO "$INSTALL_URL_ADDRESS"
edited the node script to for Raspberry PI (armv7l) condition and changed the URL line to point to the v14 folder
it would otherwise download v15... apparently node-red prefers v14.x
elif [[ $ARCH == 'armv7l' ]]
then
URL+='latest-v14.x/'
NAME=$(curl -sSf "$URL" | grep -o '"node-v[0-9.]*-linux-armv7l.tar.gz')
then did
G_EXEC chmod +x node-install.sh
G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh
it then did the install
and now i can see it is on V14.15.0
cheers
i took a look at the dietpi-software and was able to do the following.
INSTALL_URL_ADDRESS='https://raw.githubusercontent.com/Micha ... install.sh'
G_EXEC curl -sSfLO "$INSTALL_URL_ADDRESS"
edited the node script to for Raspberry PI (armv7l) condition and changed the URL line to point to the v14 folder
it would otherwise download v15... apparently node-red prefers v14.x
elif [[ $ARCH == 'armv7l' ]]
then
URL+='latest-v14.x/'
NAME=$(curl -sSf "$URL" | grep -o '"node-v[0-9.]*-linux-armv7l.tar.gz')
then did
G_EXEC chmod +x node-install.sh
G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh
it then did the install
and now i can see it is on V14.15.0
cheers

Re: update node.js
yeah node.js is quite a simple installation. Basically it's just downloading an archive and have it extracted.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: update node.js
Node also has the version management tool n:
```
npm i -g --unsafe-perm n
n 14
```
```
npm i -g --unsafe-perm n
n 14
```