Member-only story

How to add a new Node.Js Version to Plesk

Alex Zerling
1 min readJun 10, 2021

--

We recently needed to install a new version of Node.Js on our Server with Plesk installed.

There is a workaround from Plesk how to do it manually but it isn’t entirely complete.

From https://support.plesk.com/hc/en-us/articles/115001630174-Node-js-versions-available-in-Plesk:

  1. Connect to server via ssh
  2. # curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
  3. Restart SSH connection
  4. # nvm install 14
  5. # cp -R ~/.nvm/versions/node/v14.17.0/ /opt/plesk/node/
  6. # plesk sbin nodemng register /opt/plesk/node/v14.17.0/bin/node
  7. Log in to Plesk and go to Extensions > Node.js.
  8. Click Refresh

Now you can see the new Node version. But if you try to use it and hit the npm install button you get “/usr/bin/env: ‘node’: No such file or directory plesk node 14”

To fix this you have to do the following (via https://stackoverflow.com/a/61893861/2689455):

Open file /opt/plesk/node/YOURVERSION/lib/node_modules/npm/bin/npm-cli.js

Change first line to #!/opt/plesk/node/YOURVERSION/bin/node

Now everything should work fine.

--

--

Alex Zerling
Alex Zerling

Written by Alex Zerling

Full stack web developer since 2003.

Responses (1)

Write a response