3

My node.js build stopped working on the gitlab-ci servers 2 days ago. And I don't really understand why. Some more info:

  • The package.json file has not changed when the ci build stopped working
  • Even older ci-builds that were okay some days ago, don't work anymore when I restart them
  • The build still works on my windows development machine (even after deleting node_modules and reinstalling)

Here is an excerpt from the error-log:

> 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 

It seems that grpc binaries cannot be downloaded and as a fallback the system tries to built the package from source which also fails. grpc is required by firebase-admin:

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

Any idea why this could happen or ideas for a workaroun?
i.e. the version is configured as "firebase-admin": "^6.1.0", in my package.json, so there should not be any breaking changes, right?

TmTron
  • 17,012
  • 10
  • 94
  • 142

2 Answers2

5

as mentioned by @itaied this is an issue with grpc on node 11: grpc#594

the workaround for now is to use node 10: i.e. at the start of .gitlab-ci.yml:

image: node:10
TmTron
  • 17,012
  • 10
  • 94
  • 142
0

In my case I change to node:8-jessie and it worked great, but is the same principle!!


UPDATE!

Take a look at https://hub.docker.com/_/node?tab=tags and you can see all the combinations of node versions and debian versions you can use, just don't use node 12

Arnaldo Perez
  • 581
  • 1
  • 4
  • 10