Welcome there,
That error is not very helpful, because it appears to just consist of the last few lines. I suggest either:
a) Getting the full logs in the suggested /.npm/logs
b) Ensuring the logs are open, when you build/start the app - this way, all of the error message will be visible
----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.16.1...
Using default npm version: 6.14.12
-----> Restoring cache
Caching has been disabled because NODE_MODULES_CACHE=false
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> protobufjs@6.10.2 postinstall /tmp/build_b05fd119/node_modules/protobufjs
> node scripts/postinstall
> canvas@2.7.0 install /tmp/build_b05fd119/node_modules/canvas
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! canvas@2.7.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the canvas@2.7.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.7Ma3I/_logs/2021-04-18T17_31_34_097Z-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
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I got this error
Thank you, for sharing that.
Googling the error reveals:
- npm install : "node-pre-gyp: Permission denied" and sqlite3 · Issue #191 · jansmolders86/mediacenterjs · GitHub
- npm - node-pre-gyp: Permission denied in heroku push - Stack Overflow
Hope this helps
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.