question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to update/upgrade Node.JS version ?

See original GitHub issue

I’m having great trouble upgrading Node.JS on my RPI 3 B+. I’ve been on the web for a day, trying almost all solutions but I’ve yet to get it upgraded.

Here’s a few of what I’ve tried : all to no avail

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - $ sudo apt-get install -y nodejs

package-lock.json npm install npm rebuild

npm cache clean -f npm install -g n n stable

After entering these commands they seem to be doing their job, however whenever I enter “node -v” it always says I’m still on 8.2.1 . Why why why ?

I’m concerned over whether my accessories / platforms will still work after NodeJS is upgraded. I’m trying to install Ring plugin but it requires version 8.3.0 , while mine is 8.2.1 .

I’m also running MagicMirror on the same RPI . Think it uses pm2 . If I eventually successfully upgraded NodeJS , will either MagicMirror / Homebridge work as usual ?

Thank you very much for anyone that has an answer to this … I just need a correct list of steps/commands to upgrade NodeJS safely . I’m getting variations of the method everywhere but none of which seem to work . If Homebridge has to be reinstalled after upgrading NodeJS, what’s the correct procedure to do it in this case?

My apologies for not being able to provide the Homebridge Log / Command Output. Through multiple tries of upgrading NodeJS a lot of plugins went wrong already , it has taken me ages to get things back to yesterday . For now Homebridge autostart on boot doesn’t work anymore . I don’t want to mess things up further by redoing the same steps again …

Versions

  • Homebridge: homebridge --version : 0.4.49
  • Node: node --version : v8.2.1
  • OS: Windows 10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
oznucommented, Oct 26, 2020

Adding a link to the relevant wiki article as this issue is one of the top results in Google.

https://github.com/homebridge/homebridge/wiki/How-To-Update-Node.js

2reactions
LegendaryWizcommented, Sep 15, 2019

Okay so … I’ve finally found a way to upgrade successfully !!

sudo npm cache clean -f sudo npm install -g n sudo n 8.3.0

What on earth … Took me 2 days to do so. Now it has upgraded successfully. Everything is back to normal and every plugin in Homebridge still works as per normal.

However with success comes disappointments, the Ring plugin works now but I can’t get it to discover and add my Ring Doorbell. Wtf … Guess it’s a problem for another day 😞

Thank you very much to all that have helped. I really appreciate the fast responses 😄😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Update Node.js to Latest Version {Linux, Windows ...
Option 1: Update Node.js with NVM (Node Version Manager) · 1. Start by updating the package repository with the command: sudo apt update...
Read more >
Upgrading Node.js to latest version - Stack Overflow
For Windows users, simply go to the node.js (nodejs.org) website and download the latest version ...
Read more >
How to Easily Update Node.js to the Latest Version
Go to the official Node.js downloads site, which has different Linux binary packages, and select your preferred built-in installer or source ...
Read more >
How to Update Node and NPM to the Latest Version
1. Use NPM to Update Your Node Version · Clear the NPM cache · Install n · Install a new version of Node...
Read more >
How do update Node.js and NPM to their latest version?
nodejs · 1. Use NPM to update your version of Node.js framework · 2. Use NVM to update your version of Node ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found