首页 > 解决方案 > Heroku 部署分支失败

问题描述

我对 Heroku 有疑问,我正在尝试构建自己的不和谐机器人,我按照教程https://youtu.be/8qIsRzV0Hpg但我遇到了问题,无法部署它,这是错误:

-----> Building on the Heroku-20 stack
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 14.x...
       Downloading and installing node 14.15.4...
       Using default npm version: 6.14.10
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > @discordjs/opus@0.4.0 install /tmp/build_12ef9cfb_/node_modules/@discordjs/opus
       > node-pre-gyp install --fallback-to-build
       
       sh: 1: node-pre-gyp: Permission denied
       npm ERR! code ELIFECYCLE
       npm ERR! errno 126
       npm ERR! @discordjs/opus@0.4.0 install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the @discordjs/opus@0.4.0 install script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.Lv9o4/_logs/2021-02-09T14_07_39_023Z-debug.log
       
       Some possible problems:
       
       - node_modules checked into source control
           
       - Node version not specified in package.json
              
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

标签: githubherokudiscordbots

解决方案


推荐阅读