我创建了一个使用hummus.js
模块的API。本地测试 - >正常工作。Plesk安装npm包错误
现在我上传了我的API并尝试运行npm install
来安装所有依赖项。但我得到这个错误:
npm-Installation
Execution filemng has failed with exit code 1, stdout:
> [email protected] install /var/www/vhosts/XXX/XXX/node_modules/hummus
> node-pre-gyp install --fallback-to-build
, 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.
/usr/bin/env: 'node': No such file or directory
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! Linux 4.4.0-21-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] install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
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 hummus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hummus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hummus
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/XXX/XXX/npm-debug.log
错误来自hummus-js
包。 所以我想尝试安装node-gyp
(npm install -g node-gyp
)。但我不知道如何?在Plesk中,我无法安装单个模块。当我使用ssh尝试它,我得到:
command NPM not found
我是一个服务器管理员,菜鸟,所以我很高兴为每一个帮助!
问候
编辑: 我的服务器= 16.04的Ubuntu LTS服务器64 +的Plesk玛瑙
通过“上传我的API”,你的意思是试图在(云我假设)服务器上测试它或? –
我有Plesk中的根服务器安装 – Ckappo