npm install bcrypt返回错误代码127

时间:2015-03-16 11:45:12

标签: node.js npm

我正在尝试使用bcrypt安装npm install但是我收到以下错误:

npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http GET https://registry.npmjs.org/nan/1.5.0
npm http 304 https://registry.npmjs.org/nan/1.5.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.8.1 install /var/www/learningbankapi/src/node_modules/bcrypt
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-31-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/learningbankapi/src/node_modules/bcrypt
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0

有没有人经历过相同或者我知道如何解决它?

0 个答案:

没有答案