簡體   English   中英

Node.js Heroku部署失敗,並顯示錯誤消息,提示grpc命令失敗

[英]Node.js heroku deployment fails with error message saying grpc command failed

您是否知道如何解決Node.js heroku部署失敗並顯示錯誤消息grpc命令失敗的問題? 我懷疑是heroku末端的grpc版本或節點版本問題。

我已經運行了以下命令:heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#v123 -a myApp

   [4/4] Building fresh packages...
   error /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc: Command failed.
   Exit code: 1
   Command: ./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library
   Arguments:
   Directory: /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc
   Output:
   node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-linux-x64-glibc.tar.gz
   node-pre-gyp ERR! Pre-built binaries not found for grpc@1.10.1 and node@10.2.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
   node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@10.2.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
   node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
   make: Entering directory '/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/build'
   CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
   make: Entering directory '/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/build'
   CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
   CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
   grpc.target.mk:388: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o' failed
   make: Leaving directory '/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/build'
   Failed to execute '/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/bin/node /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
   rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
   make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
   gyp ERR! build error
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
   gyp ERR! System Linux 4.4.0-1019-aws
   gyp ERR! command "/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/bin/node" "/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
   gyp ERR! cwd /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc
   gyp ERR! node -v v10.2.1
   gyp ERR! node-gyp -v v3.6.2
   gyp ERR! not ok
   node-pre-gyp ERR! build error
   node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/bin/node /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
   node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
   node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
   node-pre-gyp ERR! System Linux 4.4.0-1019-aws
   node-pre-gyp ERR! command "/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/.heroku/node/bin/node" "/tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
   node-pre-gyp ERR! cwd /tmp/build_b9178ea7e8a83dfc95c327fb45eaba92/node_modules/grpc
   node-pre-gyp ERR! node -v v10.2.1
   node-pre-gyp ERR! node-pre-gyp -v v0.7.0
   node-pre-gyp ERR! not ok

gRPC庫的1.10版不適用於Node10。從那時起,已經發布了1.11和1.12版,並且兩者均支持Node 10。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM