Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

atelier33's avatar

Node.js update procedure

I've a server created with Forge with Node.js v6.9.2 installed, and I'll like to update it to version 8.2.1, is there a recommended procedure / command line sequence to be used with Forge? Thanks

0 likes
5 replies
atelier33's avatar

Me again, does anyone know a recommended method to upgrade?

ejdelmonico's avatar

You can try running:

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

That should do it with Ubuntu server.

browner12's avatar

I don't believe Node is installed via NPM on Forge. It's actually a deb repository in Ubuntu.

To upgrade, edit your /etc/apt/sources.list.d/nodesource.list

For me, I just had to change the '6' to an '8'.

Then run your normal sudo apt-get update && sudo apt-get upgrade

6 likes
rhand's avatar

@browner12 Thanks. I ran

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

and it worked really well. And all based on suggested documentation. Thanks again!

1 like

Please or to participate in this conversation.