0

I have a problem in deploying an app to Heorku, I have an existing app (a node js server), in the same git repository I install Heroku, when I push on Heroku master (git push heroku master) I receive this output:

I cut some code.

C:\some_folders>git push heroku master
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving node version 12.x...
remote:        Downloading and installing node 12.18.3...
remote:        Using default npm version: 6.14.6
remote:
remote: -----> Installing dependencies
remote:        Prebuild detected (node_modules already exists)
remote:        Rebuilding any native modules
remote:
remote:        > bcrypt@5.0.0 install /tmp/build_1be9d777/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! bcrypt@5.0.0 install: `node-pre-gyp install --fallback-to-build`
remote:        npm ERR! Exit status 126
remote:        npm ERR!
remote:        npm ERR! Failed at the bcrypt@5.0.0 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.oPATN/_logs/2020-08-25T21_49_16_056Z-debug.log
remote:
remote: -----> Build failed

How can I fix it?

Erme Schultz
  • 319
  • 5
  • 17
Frotta
  • 11
  • 1

1 Answers1

0

I fix the problem simply moving the server.js file from his folder to a new folder linked with Heroku, without copy node_modules folder, and I uninstall bcrypt library ("npm uninstall bcrypt --save" in cmd) and install bcryptjs library.

Now the command "git push heroku master" work.

Frotta
  • 11
  • 1