Herokuで動かしているNode.jsのサーバにdeployした際、謎のエラーでBuild Failedした件。
Installing node modules (package.json)
> grpc@1.10.1 install /tmp/build_6361fb4d8a2fa1b8703d71219349dfb2/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
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.3.0 (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.3.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
grpc@1.10.1
がインストールできていないっぽい。
Node.jsのバージョン指定をダウングレード
package.json
を書き換えます。
Before
package.json
"engines": {
"node": ">=6.0.0",
"npm": ">= 3.0.0"
}
After
package.json
"engines": {
"node": "8.9.4",
"npm": ">= 3.0.0"
}
"node": ">=6.0.0"
にしていたせいで、node --version
が最新のv10.0.0
になっていました。Node v10とgrpc@1.10.1
の相性が悪いみたい。
参考: https://github.com/firebase/firebase-js-sdk/issues/780#issuecomment-390650868
v8.xだと問題ないらしいので試してみたところ、正常にdeployできました。
ここ数日起きている現象のようなので早めに解消されると思いますが、取り急ぎ。