• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved Problem with update npm for nodejs extension

Azurel

Silver Pleskian
Hello, I call update npm for nodejs extension (02 - How to install npm & manage npm versions | npm Documentation)
# /opt/plesk/node/8/bin/npm install npm@latest -g

After this I get now for
# /opt/plesk/node/8/bin/npm -v
this line
/usr/bin/env: node: No such file or directory

I have remove and install nodejs extension in plesk gui again, but that not fix it. How I can repair it?

Version 6+7 is working fine:
# /opt/plesk/node/7/bin/npm -v
4.0.5
 
Last edited:
You can fix it with

# export PATH=/opt/plesk/node/8/bin
 
I must re-activate this topic. :(

After a week (I not changed anything on server) the node.js client crashed, so I must restart it, but again... node 8 is not accessable

# /opt/plesk/node/8/bin/npm -v
/usr/bin/env: node: No such file or directory

After again
# export PATH=/opt/plesk/node/8/bin

# /opt/plesk/node/8/bin/npm -v
5.7.1

Now its working again. Must I now every few days do export?
 
Thanks! You mean that file located under /root/.bash_profile? I never work with export command before, so after take a look I think your command should look like this?:

# export PATH=$PATH:/opt/plesk/node/8/bin/

I think your example above overwrite all exists path? Because with your command "sh" not working anymore too

#sh myscript.sh start
-bash: sh: command not found

# export PATH=$PATH:/usr/bin/

And its working now again too. I have edit /root/.bash_profile like this on the bottom

PATH=$PATH:$HOME/bin
PATH=$PATH:/opt/plesk/node/8/bin
PATH=$PATH:/usr/bin/
export PATH

Can you me explain why my update NPM in start post remove the path and why re-install the NodeJS package not fix this issue? Thank you very much :)
 
It is not clear how an update of NPM removes the path to the latest node tools install. To solve this for all users I prefer to sym-link in /usr/bin to the npm executable.

With root user privileges use:

Code:
cd /usr/bin/
ln -s /opt/plesk/node/21/bin/npm npm

The node version 21 is the latest version installed in my case on AlmaLinux 9.5 which is now the derivative of Centos.

Plesk may overwrite or re-establish it's own PATH strategy so this link could be removed or linked to the latest node install.
 
Back
Top