• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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