Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc install fails on alpine #1448

Closed
clehene opened this issue May 28, 2020 · 8 comments
Closed

grpc install fails on alpine #1448

clehene opened this issue May 28, 2020 · 8 comments

Comments

@clehene
Copy link
Contributor

clehene commented May 28, 2020

Problem description

A clear and concise description of what the problem is.

yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /usr/src/app/server/node_modules/grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments: 
Directory: /usr/src/app/server/node_modules/grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.14.0
node-pre-gyp info using node@12.16.3 | linux | x64
node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp info check checked for "/usr/src/app/server/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-musl/grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v72-linux-x64-musl.tar.gz
node-pre-gyp http 200 https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v72-linux-x64-musl.tar.gz
node-pre-gyp info install unpacking node-v72-linux-x64-musl/grpc_node.node
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.2 and node@12.16.3 (node-v72 ABI, musl) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error bad download 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/src/app/server/node_modules/node-pre-gyp/lib/util/compile.js:77:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
node-pre-gyp ERR! stack     at onErrorNT (internal/child_process.js:469:16)
node-pre-gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
node-pre-gyp ERR! System Linux 5.0.0-1034-gcp
node-pre-gyp ERR! command "/usr/bin/node" "/usr/src/app/server/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/src/app/server/node_modules/grpc
node-pre-gyp ERR! node -v v12.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp clean' (Error: spawn node-gyp ENOENT)
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1

Reproduction steps

This only reproduces in Google Cloud Build.

Environment

Google Cloud Build.
Linux 5.0.0-1034-gcp
Docker with alpine:3.10

Additional context

@murgatroid99
Copy link
Member

With that "Hit error bad download" line, this looks like the same bug that I reported as nodejs/node#33254, which turned out to actually be the bug tomas/needle#312, which has since been fixed. I am working on a grpc release that will pick up that new version of needle, which should fix that.

@clehene
Copy link
Contributor Author

clehene commented May 28, 2020

@murgatroid99 I also made a PR in node-pre-gyp mapbox/node-pre-gyp#502 to upgrade it there, but not sure when / if it has a chance to get merged.

@murgatroid99
Copy link
Member

Fortunately, unbundling node-pre-gyp from grpc should be enough to pick up the new version of needle whether or not node-pre-gyp explicitly updates the dependency.

@clehene
Copy link
Contributor Author

clehene commented May 29, 2020

@murgatroid99 we did the request workaround for now, but will chnage it once it gets fixed. Should we track it in this issue?

@murgatroid99
Copy link
Member

I will update this issue when I publish the new version of grpc with the un-bundled dependency on node-pre-gyp.

@murgatroid99
Copy link
Member

grpc 1.24.3 is now out with that change.

@peter-hartmann-emrsn
Copy link

peter-hartmann-emrsn commented Nov 4, 2020

I run into this issue today using latest node version, even with grpc 1.24.3. Using an older node version worked for me:

FROM node:15.0.1-alpine - bad

FROM node:10.12.0-alpine - good

@murgatroid99
Copy link
Member

It didn't work with Node 15 because we didn't add support for Node 15. This issue was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants