在流星中使用 NPM 安装 bcrypt 时出错
Error installing bcrypt with NPM in meteor
我已经搜索了几天试图解决这个问题,虽然人们在使用 NPM 安装 bcrypt
时遇到了问题,但他们似乎不像我的那样。对于那些通过 Google 找到这个的人,我建议你也看看 。
现在我和其他人一样在安装 bcrypt
时遇到以下错误:
> bcrypt@0.8.7 install /home/william/bonsai/brain/src/hyperdev/node_modules/bcrypt
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. 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:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-28-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/william/bonsai/brain/src/hyperdev/node_modules/bcrypt
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
hyperdev@ /home/william/bonsai/brain/src/hyperdev
└── touch@1.0.0 extraneous
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "bcrypt"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
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 bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/william/bonsai/brain/src/hyperdev/npm-debug.log
我已经安装了 bcrypt 的所有依赖项,所以我真的不确定如何继续。这是所需的 npm debug log。
我认为这是一个known bug in Meteor。
我用的是debian8.6-64bit
我删除帐户密码和 npm-bcrypt,然后我做
meteor add npm-bcrypt
meteor npm install -g node-gyp
meteor npm install --save bcrypt
meteor npm install --save babel-runtime
meteor add accounts-password
终于,我修复了这个bug。如果你改变命令的顺序,我不确定它的有效性。
我已经搜索了几天试图解决这个问题,虽然人们在使用 NPM 安装 bcrypt
时遇到了问题,但他们似乎不像我的那样。对于那些通过 Google 找到这个的人,我建议你也看看
现在我和其他人一样在安装 bcrypt
时遇到以下错误:
> bcrypt@0.8.7 install /home/william/bonsai/brain/src/hyperdev/node_modules/bcrypt
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. 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:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-28-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/william/bonsai/brain/src/hyperdev/node_modules/bcrypt
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
hyperdev@ /home/william/bonsai/brain/src/hyperdev
└── touch@1.0.0 extraneous
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "bcrypt"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
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 bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/william/bonsai/brain/src/hyperdev/npm-debug.log
我已经安装了 bcrypt 的所有依赖项,所以我真的不确定如何继续。这是所需的 npm debug log。
我认为这是一个known bug in Meteor。
我用的是debian8.6-64bit
我删除帐户密码和 npm-bcrypt,然后我做
meteor add npm-bcrypt
meteor npm install -g node-gyp
meteor npm install --save bcrypt
meteor npm install --save babel-runtime
meteor add accounts-password
终于,我修复了这个bug。如果你改变命令的顺序,我不确定它的有效性。