![](/img/trans.png)
[英]ERROR: /ng-app/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header
[英]Invalid ELF header with node bcrypt on AWSBox
我正在玩awsbox,部署我的应用程序会显示以下错误:
/home/app/code/node_modules/mongoose-troop/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^
Error: /home/app/code/node_modules/mongoose-troop/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
at Object.Module._extensions..node (module.js:485:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at bindings (/home/app/code/node_modules/mongoose-troop/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/home/app/code/node_modules/mongoose-troop/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
warn: Forever detected script exited with code: 1
warn: Forever restarting script for 1 time
任何想法如何解决这个问题?
[出于其他原因,我也遇到了相同的错误(请参见注释),以防万一它对其他人有用:我通过使用以下命令通过npm重新安装bcrypt模块来解决了这个问题:
npm install bcrypt
不知道最好的答案是什么,但是我确实找到了一些帖子,提到了x86与64位问题。 我删除了mongoose-troop模块,并从awsbox控制台中调用了npm install,这似乎已经完成了。 虽然不确定如何部署到awsbox。 可能不起作用
请通过npm install重新安装bcrypt模块,然后重新启动服务器。 应该解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.