Heroku使用bcrypt部署node.js失败

问题描述 投票:0回答:1

在向我的服务器添加bookshelf-secure-password之后,heroku未能成功部署我的服务器,并一直说无法安装bcrypt。

NPM_CONFIG_DISTURL=https://nodejs.org/download/release/
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote:        engines.node (package.json):  12.14.0
remote:        engines.npm (package.json):   6.13.4
remote:
remote:        Resolving node version 12.14.0...
remote:        Downloading and installing node 12.14.0...
remote:        npm 6.13.4 already installed with node
remote:
remote: -----> Installing dependencies
remote:        Prebuild detected (node_modules already exists)
remote:        Rebuilding any native modules
remote:
remote:        > [email protected] install /tmp/build_a26ccc13212d9e4abd4c4c76594f5696/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! [email protected] install: `node-pre-gyp install --fallback-to-build`
remote:        npm ERR! Exit status 126
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] 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.aPY9Y/_logs/2020-03-01T18_03_19_337Z-debug.log
remote:
remote: -----> Build failed
remote:
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        Some possible problems:
remote:
remote:        - node_modules checked into source control
remote:          https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits

我曾尝试按照heroku对Node.js部署站点https://devcenter.heroku.com/articles/troubleshooting-node-deploys进行故障排除,但没有帮助,我曾尝试安装bcrypt,将其卸载并安装bcryptjs,但这无济于事,我不知道该怎么办现在就做,有人可以帮忙吗?

node.js heroku bcrypt bookshelf.js
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.