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: 1953
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 :)

Marooned
Posts: 2
Joined: Fri Feb 22, 2013 12:56 pm

Re: Installing newer version of NodeJS on Pi 3

Sun Oct 14, 2018 9:04 pm

Trying to manually install Node-RED on FreePBX image (based on Raspbian Stretch)
Summerfly wrote:
Wed Jun 06, 2018 9:29 am
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
Did them and got:

Code: Select all

[email protected]:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -

## Installing the NodeSource Node.js 8.x LTS Carbon repo...


## You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the 'linux-armv6l' binary tarballs available directly from nodejs.org for Node.js 4 and later.
and after the rest:

Code: Select all

[email protected]:~# node -v
v8.11.1
[email protected]:~# npm -v
/usr/lib/node_modules/npm/node_modules/npmlog/log.js:57
log.progressEnabled = log.gauge.isEnabled()
                                ^

TypeError: log.gauge.isEnabled is not a function
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:57:33)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /usr/lib/node_modules/npm/bin/npm-cli.js:22:13
    at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:153:3)
[email protected]:~#

User avatar
scruss
Posts: 1797
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Installing newer version of NodeJS on Pi 3

Mon Oct 15, 2018 3:30 pm

Marooned wrote:
Sun Oct 14, 2018 9:04 pm
Trying to manually install Node-RED on FreePBX image (based on Raspbian Stretch)
On what machine? If your machine isn't a 3 or a 3+, this thread isn't for you. Download the linux-armv6l tarball like the instructions said.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 5 guests