gpt4 book ai didi

node.js - gitlab-ci 构建 grpc 失败

转载 作者:搜寻专家 更新时间:2023-11-01 00:35:37 25 4
gpt4 key购买 nike

我的 node.js 构建在 2 天前停止在 gitlab-ci 服务器上工作。我真的不明白为什么。更多信息:

  • 当 ci 构建停止工作时,package.json 文件未更改
  • 即使是几天前还可以的旧 ci-build,在我重新启动它们时也不再工作了
  • 构建仍然可以在我的 Windows 开发机器上运行(即使在删除 node_modules 并重新安装之后)

这是错误日志的摘录:

> grpc@1.16.0 install /builds/vallen-bridge/source/server/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.16.0/node-v67-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.16.0 and node@11.1.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.16.0 and node@11.1.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
make: Entering directory '/builds/vallen-bridge/source/server/node_modules/grpc/build'
make: Entering directory '/builds/vallen-bridge/source/server/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/surface/init.o
rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
grpc.target.mk:470: recipe for target 'Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o' failed
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
make: Leaving directory '/builds/vallen-bridge/source/server/node_modules/grpc/build'
gyp ERR! build error

似乎无法下载 grpc 二进制文件,作为后备,系统尝试从源代码构建包,但也失败了。 firebase-admin 需要 grpc:

npm ls grpc
`-- firebase-admin@6.1.0
`-- @google-cloud/firestore@0.18.0
`-- google-gax@0.20.0
`-- grpc@1.16.0

知道为什么会发生这种情况或有解决方法吗?
即版本在我的 package.json 中配置为 "firebase-admin": "^6.1.0",,所以不应该有任何重大更改,对吗?

最佳答案

@itaied 所述这是 Node 11 上的 grpc 的问题:grpc#594

目前的解决方法使用 Node 10:即在 .gitlab-ci.yml 的开头:

image: node:10

关于node.js - gitlab-ci 构建 grpc 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53139831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com