• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue "sh: 1: node: not found" on NPM install with Node.js app

rjriel

New Pleskian
I added a node.js app and tried to run NPM install, but I'm getting an error, with the below output. Is there an issue with the node.js installation on my server?

  • Execution filemng has failed with exit code 1, stdout:
  • > [email protected] install /var/www/vhosts/<my host>/<root dir>/node_modules/node-sass
  • > node scripts/install.js
  • > [email protected] postinstall /var/www/vhosts/<my host>/<root dir>/node_modules/uglifyjs-webpack-plugin
  • > node lib/post_install.js
  • <node app name>@0.0.0 /var/www/vhosts/<my host>/<root dir>
  • `-- (empty)
  • , stderr: npm WARN lifecycle npm is using /opt/plesk/node/7/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.
  • npm WARN prefer global [email protected] should be installed with -g
  • sh: 1: node: not found
  • sh: 1: node: not found
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
  • npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/node-sass):
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node scripts/install.js`
  • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
  • npm ERR! Linux 4.4.0-79-generic
  • npm ERR! argv "/opt/plesk/node/7/bin/node" "/opt/plesk/node/7/bin/npm" "install"
  • npm ERR! node v7.4.0
  • npm ERR! npm v4.0.5
  • npm ERR! file sh
  • npm ERR! code ELIFECYCLE
  • npm ERR! errno ENOENT
  • npm ERR! syscall spawn
  • npm ERR! [email protected] postinstall: `node lib/post_install.js`
  • npm ERR! spawn ENOENT
  • npm ERR!
  • npm ERR! Failed at the [email protected] postinstall script 'node lib/post_install.js'.
  • npm ERR! Make sure you have the latest version of node.js and npm installed.
  • npm ERR! If you do, this is most likely a problem with the uglifyjs-webpack-plugin package,
  • npm ERR! not with npm itself.
  • npm ERR! Tell the author that this fails on your system:
  • npm ERR! node lib/post_install.js
  • npm ERR! You can get information on how to open an issue for this project with:
  • npm ERR! npm bugs uglifyjs-webpack-plugin
  • npm ERR! Or if that isn't available, you can get their info via:
  • npm ERR! npm owner ls uglifyjs-webpack-plugin
  • npm ERR! There is likely additional logging output above.
  • npm ERR! Please include the following file with any support request:
  • npm ERR! /var/www/vhosts/<my host>/<root dir>/npm-debug.log
 
Back
Top