Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install additional node versions in Plesk Onyx

This a guidance not a problem to solve, to help those which have the same issue I had

Enable Node support in Plesk Onyx:

  1. Install the "Node support" simply from your "update and updates" Plesk interface.
  2. Go to your "Node extension" page enable/disable the node versions you need

In case you need additional node versions which does not come with the default node support installation:

  1. Install the Node Version Manager on your server
  2. Install the versions you need e.g. nvm install v4.8.4
  3. Copy paste the node version to plesk cp -R ~/.nvm/versions/node/v4.8.4/ /opt/plesk/node/
  4. Then notify your plesk about your installation plesk sbin nodemng register /opt/plesk/node/v4.8.4/bin/node
  5. Go to your node extension page where all node versions are listed, hit refresh and voilá

I had some troubles installing additional node versions into Plesk to run my meteorJS app on my server instead of their hosting service.

like image 235
Maertz Avatar asked Oct 15 '17 13:10

Maertz


People also ask

Does Plesk support NodeJs?

Node. js support is available in both Plesk for Linux and Plesk for Windows.

What is Plesk Onyx?

Plesk Onyx is the newest and smoothest upgrade of the traditional Plesk control panel. Originally released in 2001, Plesk is one of the leading control panel solutions for both Linux and Windows servers.


1 Answers

Thanks for the question :) As some people were using this method, they ran into this problem:

/opt/plesk/node/v12.13.1/bin/npm install
/usr/bin/env: 'node': No such file or directory

The NPM script is looking for the default node location by asking it to env. The plesk-version of the NPM files are slightly modified to point to the correct node version.

To fix this, make a small edit to the npm file:

  • After step 3, edit the /opt/plesk/node/[your_version]/bin/npm file.
  • Replace the first line with #!/opt/plesk/node/[your_version]/bin/node
like image 62
Milkmannetje Avatar answered Oct 05 '22 20:10

Milkmannetje