1

When i try to run the bot in Heroku, it keeps giving me the same error and not turning the bot on. How would i go on to fix this issue? All the files and node modules are already installed in the github repository

-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false
       
-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 12.x...
       Downloading and installing node 12.19.1...
       Using default npm version: 6.14.8
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > @discordjs/opus@0.3.2 install /tmp/build_8234188f_/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.3.2 install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the @discordjs/opus@0.3.2 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.tAPfy/_logs/2020-11-22T22_42_39_963Z-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - node_modules checked into source control
         https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
       
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed
Gaxyhs
  • 71
  • 6
  • Well, _is_ your `node_modules/` checked into source control? – ChrisGPT was on strike Nov 22 '20 at 23:06
  • "*All the files and node modules are already installed in the github repository*" That's exactly what the error is saying. The node_modules folder should NOT be checked into source control. – Gino Mempin Nov 22 '20 at 23:07
  • Does this answer your question? [Heroku Build Failed: "node\_modules checked into source control"](https://stackoverflow.com/questions/34294170/heroku-build-failed-node-modules-checked-into-source-control) – Gino Mempin Nov 22 '20 at 23:12

0 Answers0