Summerfly
Posts: 2
Joined: Wed Apr 12, 2017 1:59 pm

Re: Installing newer version of NodeJS on Pi 3

Wed Jun 06, 2018 9:29 am

Thanks everyone for sharing your findings. Thanks to your help I have been able to solve this issue as well. For me the installation process still didn't remove the old version of node and npm, but I found a additional rm command that purged all files after the remove/purge command. Also a symbolic link to node had to be added, but that worked out as well. I hope this helps others as well.

My commands look as follows:

Code: Select all

[email protected]:~ $ sudo su -
[email protected]:~ # apt-get remove --purge node* npm*
[email protected]:~# sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
[email protected]:~ # curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
[email protected]:~# apt-get install nodejs -y
[email protected]:~# sudo ln -s `which nodejs` /usr/local/bin/node
[email protected]:~# node -v
v8.11.2
[email protected]:~# npm -v
5.6.0

Ryan780
Posts: 5
Joined: Wed Sep 06, 2017 2:12 pm

Re: Installing newer version of NodeJS on Pi 3

Sat Aug 04, 2018 11:34 pm

Yeah, just tried those commands and at the end when i try node -v it doesn't know what node is. So, I dunno what else you did but there's something missing from your write up. Not helpful at all.

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: Installing newer version of NodeJS on Pi 3

Sun Aug 05, 2018 10:30 pm

Just my 2 cents....
This thread title is about upgrading whatever version of NodeJS comes with Raspbian

I know nothing about the intricacies and pro/cons of various methods offered BUT........

If all you want to do is run/upgrade Node-RED on a standard Pi installation and not bothered about what's happening in the engine room down below - then just run the update script (as normal Pi user) from https://nodered.org/docs/hardware/raspberrypi

Sorry for the interruption - carry on with the discussions :)

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 2 guests