Unable to start a Node.js application in Plesk using Run Script option in Domains > example.com > Node.js > Run Script
> firstname.lastname@example.org start /var/www/vhosts/example.com/httpdocs
> node index.js
npm WARN lifecycle npm is using /opt/plesk/node/8/bin/node but there is no node binary in the current PATH. Use the
--scripts-prepend-node-path option to include the path for the node binary npm was executed with.
sh: node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
node binary was not found by
npm since it is missing on the specified PATH
Or add the variable into a global npm config file
Connect to the server over SSH
Execute the following to configure the corresponding Node.js version. The example below shown for Node.js 8.
# echo "scripts-prepend-node-path=true" >> /opt/plesk/node/8/etc/npmrc