简体   繁体   中英

I keep getting this error; node-pre-gyp install --fallback-to-build --library=static_library

I'm trying to deploy my app to heroku and I keep getting 'node-pre-gyp install --fallback-to-build --library=static_library'. I've seen several people ask similar questions and told to try downgrading firebase version or node-pre-gyp version so something similar. I've tried manually installing different versions of the dependencies to no avail. It's quite frustrating. Can someone point me in the right direction.

This is the full error I'm getting.

remote:        > grpc@1.10.1 install /tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc
remote:        > node-pre-gyp install --fallback-to-build --library=static_library
remote:        
remote:        node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v83-linux-x64-glibc.tar.gz 
remote:        node-pre-gyp ERR! Pre-built binaries not found for grpc@1.10.1 and node@14.18.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
remote:        node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@14.18.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
remote:        node-pre-gyp ERR! Hit error Connection closed while downloading tarball file 
remote:        make: Entering directory '/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/build'
remote:        make: Entering directory '/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/build'
remote:          CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
remote:          CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
remote:        sed: can't read ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
remote:          CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
remote:        rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
remote:        grpc.target.mk:406: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o' failed
remote:        make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
remote:        make: Leaving directory '/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/build'
remote:        gyp ERR! build error 
remote:        gyp ERR! stack Error: `make` failed with exit code: 2
remote:        gyp ERR! stack     at ChildProcess.onExit (/tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
remote:        gyp ERR! System Linux 4.4.0-1096-aws
remote:        gyp ERR! command "/tmp/build_15f9dff5/.heroku/node/bin/node" "/tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc"
remote:        gyp ERR! cwd /tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc
remote:        gyp ERR! node -v v14.18.0
remote:        gyp ERR! node-gyp -v v5.1.0
remote:        gyp ERR! not ok 
remote:        node-pre-gyp ERR! build error 
remote:        node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_15f9dff5/.heroku/node/bin/node /tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc' (1
remote:        node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
remote:        node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
remote:        node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
remote:        node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
remote:        node-pre-gyp ERR! System Linux 4.4.0-1096-aws
remote:        node-pre-gyp ERR! command "/tmp/build_15f9dff5/.heroku/node/bin/node" "/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
remote:        node-pre-gyp ERR! cwd /tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc
remote:        node-pre-gyp ERR! node -v v14.18.0
remote:        node-pre-gyp ERR! node-pre-gyp -v v0.7.0
remote:        node-pre-gyp ERR! not ok 
remote:        Failed to execute '/tmp/build_15f9dff5/.heroku/node/bin/node /tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc' (1)
remote:          CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
remote:        In file included from ../deps/grpc/src/core/lib/backoff/backoff.h:22:0,
remote:                         from ../deps/grpc/src/core/lib/backoff/backoff.cc:19:
remote:        ../deps/grpc/src/core/lib/iomgr/exec_ctx.h:22:10: fatal error: grpc/support/atm.h: No such file or directory
remote:         #include <grpc/support/atm.h>
remote:                  ^~~~~~~~~~~~~~~~~~~~
remote:        compilation terminated.
remote:        grpc.target.mk:406: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o' failed
remote:        make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o] Error 1
remote:        make: Leaving directory '/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/build'
remote:        gyp ERR! build error 
remote:        gyp ERR! stack Error: `make` failed with exit code: 2
remote:        gyp ERR! stack     at ChildProcess.onExit (/tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
remote:        gyp ERR! System Linux 4.4.0-1096-aws
remote:        gyp ERR! command "/tmp/build_15f9dff5/.heroku/node/bin/node" "/tmp/build_15f9dff5/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc"
remote:        gyp ERR! cwd /tmp/build_15f9dff5/node_modules/@firebase/firestore/node_modules/grpc
remote:        gyp ERR! node -v v14.18.0
remote:        gyp ERR! node-gyp -v v5.1.0
remote:        gyp ERR! not ok 
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 1
remote:        npm ERR! grpc@1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
remote:        npm ERR! Exit status 1
remote:        npm ERR! 
remote:        npm ERR! Failed at the grpc@1.10.1 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.Aw0LH/_logs/2021-10-06T14_06_09_309Z-debug.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        Some possible problems:
remote:        
remote:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:        
remote:        Love,
remote:        Heroku
remote:        
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 7cc828820878ec9a73cec1b409bf9a1fbce92039
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 7cc828820878ec9a73cec1b409bf9a1fbce92039
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to admin03.
remote: 

You are using an old version of the grpc package with a recent version of Node and they are not compatible. That log shows that you have a dependency on grpc version 1.10.1, but the latest version is 1.24.11. You will need to upgrade your dependency on grpc or more likely @firebase/firestore , which appears to be the package that uses it, or you will need to use an older version of Node.

In addition, the grpc package has been deprecated, and it is recommended that you use @grpc/grpc-js instead. I believe that newer versions of @firebase/firestore have switched that dependency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM