• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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