Search code examples
herokudiscord.js

heroku push with npm problems


im trying to push my discord app to heroku but there are some problems, can someone help me? i think this is from my npm or something idk

       Resolving node version 14.x...
       Downloading and installing node 14.17.1...
       Using default npm version: 6.14.13
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > @discordjs/[email protected] install /tmp/build_b5827880/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/[email protected] install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the @discordjs/[email protected] 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.7tseI/_logs/2021-06-16T14_44_27_673Z-debug.log
-----> Build failed

Solution

  • Try to remove the node_modules folder and let heroku install them, make sure you have package.json

    also check node-pre-gyp: Permission denied in heroku push