简体   繁体   English

由于 bcrypt,无法将节点部署到 heroku

[英]fail to deploy node to heroku due to bcrypt

A few days ago, I built a backend app using node.js and I successfully deploy it to heroku.几天前,我使用 node.js 构建了一个后端应用程序,并成功将其部署到了 heroku。 Today I build the exactly same thing but I fail to deploy it and I do not know how to fix this Here are the error今天我构建了完全相同的东西,但我无法部署它,我不知道如何解决这个问题这是错误

remote:        > bcrypt@1.0.3 install /tmp/build_e9e73855f7912a4acc55f89ae92f6e41/node_modules/bcrypt
remote:        > node-pre-gyp install --fallback-to-build
remote:
remote:        sh: 1: node-pre-gyp: Permission denied
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 126
remote:        npm ERR! bcrypt@1.0.3 install: `node-pre-gyp install --fallback-to-build`
remote:        npm ERR! Exit status 126
remote:        npm ERR!
remote:        npm ERR! Failed at the bcrypt@1.0.3 install script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /tmp/npmcache.55byY/_logs/2018-04-06T19_42_56_019Z-debug.log

I really need to deploy this server today.我今天真的需要部署这个服务器。 Could you please show me how to fix this error?你能告诉我如何解决这个错误吗? I have tried some solutions that I found but nothing worked.我尝试了一些我找到的解决方案,但没有任何效果。 I even tried to install python and set path in environment.我什至尝试安装python并在环境中设置路径。

npm install --save bcrypt-nodejs && npm uninstall --save bcrypt
npm install --save bcryptjs && npm uninstall --save bcrypt

bcrypt-nodejs is no longer actively maintained. bcrypt-nodejs 不再积极维护。 thats why bcryptjs is alternate for it!这就是为什么 bcryptjs 是它的替代品!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM