I want to deploy an app to heroku. A while ago it was working, but when I tried to push, now it gives me "Push rejected".
I tried to run node-pre-gyp install and it tells me that my package.json is not node-pre-gyp ready, telling me that:
package.json must declare these properties:
main
version
binary.module_name
binary.module_path
binary.host
It seems like this is the problem, however, I'm quite new to web developing (this is my first project) and I have no idea what these properties mean so I don't know how to add them in my package.json.
heroku login
git add .
git commit -m "test"
git push heroku master
This is how I usually deploy the code.
{
"name": "myproject",
"private": true,
"engines": {
"node": "8.10.0"
},
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.6.0",
"bcrypt": "^3.0.0",
"bcryptjs": "^2.4.3",
"meteor-node-stubs": "^0.4.1",
"node-pre-gyp": "0.13.0"
},
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
}
This is my package.json.
remote: regexpu-core@4.4.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regexpu-core
remote: regenerate@1.4.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regenerate
remote: regenerate-unicode-properties@7.0.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regenerate-unicode-properties
remote: regjsgen@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regjsgen
remote: regjsparser@0.6.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regjsparser
remote: jsesc@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regjsparser/node_modules/jsesc
remote: unicode-match-property-ecmascript@1.0.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/unicode-match-property-ecmascript
remote: unicode-canonical-property-names-ecmascript@1.0.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/unicode-canonical-property-names-ecmascript
remote: unicode-property-aliases-ecmascript@1.0.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/unicode-property-aliases-ecmascript
remote: unicode-match-property-value-ecmascript@1.0.2 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/unicode-match-property-value-ecmascript
remote: @babel/preset-react@7.0.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel/preset-react
remote: @babel/runtime@7.3.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel/runtime
remote: regenerator-runtime@0.12.1 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/regenerator-runtime
remote: acorn@5.7.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/acorn
remote: babel-helper-evaluate-path@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-evaluate-path
remote: babel-helper-flip-expressions@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-flip-expressions
remote: babel-helper-is-nodes-equiv@0.0.1 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-is-nodes-equiv
remote: babel-helper-is-void-0@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-is-void-0
remote: babel-helper-mark-eval-scopes@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-mark-eval-scopes
remote: babel-helper-remove-or-void@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-remove-or-void
remote: babel-helper-to-multiple-sequence-expressions@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-helper-to-multiple-sequence-expressions
remote: babel-plugin-minify-builtins@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-builtins
remote: babel-plugin-minify-constant-folding@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-constant-folding
remote: babel-plugin-minify-dead-code-elimination@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-dead-code-elimination
remote: lodash.some@4.6.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/lodash.some
remote: babel-plugin-minify-flip-comparisons@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-flip-comparisons
remote: babel-plugin-minify-guarded-expressions@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-guarded-expressions
remote: babel-plugin-minify-infinity@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-infinity
remote: babel-plugin-minify-mangle-names@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-mangle-names
remote: babel-plugin-minify-numeric-literals@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-numeric-literals
remote: babel-plugin-minify-replace@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-replace
remote: babel-plugin-minify-simplify@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-simplify
remote: babel-plugin-minify-type-constructors@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-minify-type-constructors
remote: babel-plugin-transform-es2015-modules-reify@0.18.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-es2015-modules-reify
remote: reify@0.18.1 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-es2015-modules-reify/node_modules/reify
remote: babel-plugin-transform-inline-consecutive-adds@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-inline-consecutive-adds
remote: babel-plugin-transform-member-expression-literals@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-member-expression-literals
remote: babel-plugin-transform-merge-sibling-variables@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-merge-sibling-variables
remote: babel-plugin-transform-minify-booleans@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-minify-booleans
remote: babel-plugin-transform-property-literals@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-property-literals
remote: babel-plugin-transform-regexp-constructors@0.4.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-regexp-constructors
remote: babel-plugin-transform-remove-console@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-remove-console
remote: babel-plugin-transform-remove-debugger@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-remove-debugger
remote: babel-plugin-transform-remove-undefined@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-remove-undefined
remote: babel-plugin-transform-simplify-comparison-operators@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-simplify-comparison-operators
remote: babel-plugin-transform-undefined-to-void@6.9.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-undefined-to-void
remote: babel-preset-meteor@7.3.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-preset-meteor
remote: babel-preset-minify@0.5.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-preset-minify
remote: lodash.isplainobject@4.0.6 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/lodash.isplainobject
remote: json5@2.1.0 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/json5
remote: meteor-babel@7.3.4 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/meteor-babel
remote: meteor-babel-helpers@0.0.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/meteor-babel-helpers
remote: reify@0.17.3 /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/reify
remote:
remote: > bcrypt@3.0.0 install /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.0 and node@8.15.1 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
remote: node-pre-gyp WARN Hit error Remote end closed socket abruptly.
remote: node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.0 and node@8.15.1 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
remote: node-pre-gyp WARN Hit error bad download
remote: make: Entering directory '/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/build'
remote: make: Entering directory '/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/build'
remote: CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
remote: CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
remote: rm: cannot remove './Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw': No such file or directory
remote: bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/blowfish.o' failed
remote: make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
remote: make: Leaving directory '/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/build'
remote: CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
remote: gyp ERR! build error
remote: gyp ERR! stack Error: `make` failed with exit code: 2
remote: gyp ERR! stack at ChildProcess.onExit (/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
remote: gyp ERR! stack at emitTwo (events.js:126:13)
remote: gyp ERR! stack at ChildProcess.emit (events.js:214:7)
remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
remote: gyp ERR! System Linux 4.4.0-1048-aws
remote: gyp ERR! command "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi"
remote: gyp ERR! cwd /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt
remote: gyp ERR! node -v v8.15.1
remote: gyp ERR! node-gyp -v v3.8.0
remote: gyp ERR! not ok
remote: node-pre-gyp ERR! build error
remote: node-pre-gyp ERR! stack Error: Failed to execute '/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
remote: node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
remote: node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
remote: node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
remote: node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
remote: node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
remote: node-pre-gyp ERR! System Linux 4.4.0-1048-aws
remote: node-pre-gyp ERR! command "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
remote: node-pre-gyp ERR! cwd /tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt
remote: node-pre-gyp ERR! node -v v8.15.1
remote: node-pre-gyp ERR! node-pre-gyp -v v0.10.2
remote: node-pre-gyp ERR! not ok
remote: Failed to execute '/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.8.1.1sak1mc.c14s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_be7761c4e5b001e1b5dbfe1536cb4eec/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! bcrypt@3.0.0 install: `node-pre-gyp install --fallback-to-build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the bcrypt@3.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! /app/.npm/_logs/2019-09-08T15_17_16_793Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! meteor-dev-bundle@ install: `node npm-rebuild.js`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the meteor-dev-bundle@ 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! /app/.npm/_logs/2019-09-08T15_17_16_852Z-debug.log
remote: make: *** wait: No child processes. Stop.
remote: make: *** Waiting for unfinished jobs....
remote: make: *** wait: No child processes. Stop.
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to frozenfruits.
remote:
To https://git.heroku.com/frozenfruits.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/frozenfruits.git'
This is the error log when I run git push heroku master.
Working backwards from the error, the key lines in the error log are:
remote: npm ERR! Failed at the bcrypt@3.0.0 install script.
Which tells us that bcrypt's install script is the culprit (not your app code)
remote: gyp ERR! stack Error: `make` failed with exit code: 2
Which shows an error when node-gyp
was running make
which is used to compile native addons to node.
and:
remote: node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.0 and node@8.15.1 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
Which tells us that node-pre-gyp
initially tried to download a pre-built version of bcrypt to save you the hassle of compilation, but failed because there's isn't a pre-built version of bcrypt 3 for node 8.
This means that if we find a version of bcrypt that works for the node version, we should be good! The version compatibility table tells us:
| Node Version | bcrypt Version |
| ------------ |:--------------:|
| 8 | >= 1.0.3 |
| 10, 11 | >= 3 |
So you want a version of bcrypt between 1.0.3 and 3.0.0.
Looking at the versions tab on npm, we see the latest version that fits is 2.0.1
So you want to change the version in your package.json
to 2.0.1:
"dependencies": {
"bcrypt": "^2.0.1",
... etc
While you're at it, you should probably remove bcryptjs
if you're using bcrypt
, and node-pre-gyp
, as it's very unlikely your actual application is using that in production
In fact, that'd be why node-pre-gyp install
is telling you that you're not "node-pre-gyp ready", just remove node-pre-gyp