请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

pm2 deploy ecosystem.json production时报错

 pm2 deploy ecosystem.json production时报错

> bcrypt@0.8.7 install /home/tihumihu/www/test/movie/source/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 4.4.0-93-generic

gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"

gyp ERR! cwd /home/tihumihu/www/test/movie/source/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


  post-deploy hook failed


Deploy failed


正在回答 回答被采纳积分+3

2回答

Scott 2018-07-17 08:11:58

恩,node 降级后,对应的 pm2 也需要装一遍,node_modules 也删除掉

0 回复 有任何疑惑可以回复我~
Scott 2018-07-13 07:29:47

bcrypt 安装失败了


看上去是 node 版本这里可能也有点问题,你这样,你把 node 版本降级一下,比如安装 8.11.3,看看这个版本上能不能编译安装成功

0 回复 有任何疑惑可以回复我~
  • 提问者 woniu2015 #1
    我怕搞错,node降级后,npm和pm2也是需要相应的降级吧,是删了node_module,重新npm install就可以吗?求老师详细说明下。谢谢老师!
    回复 有任何疑惑可以回复我~ 2018-07-13 10:33:16
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号