question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

grpc install fails on alpine

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
murgatroid99commented, May 29, 2020

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

2reactions
peter-hartmann-emrsncommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

grpcio can't be installed on alpine · Issue #24722 - GitHub
RUN python setup.py install in my Dockerfile. Around 6-7 days ago pip install grpcio stopped working and build started to fail. I had...
Read more >
`pip3 install grpcio` fails on Alpine Linux - Stack Overflow
The build environment for Alpine Linux is not installed by default. You need to install the header files - apk add linux-headers ....
Read more >
Can't install from source on Alpine due to grpc 1.19 ... - GitLab
Summary When installing from source, installing Ruby Gems fails due ... GCC and Alpine and has been resolved with later grpc releases >...
Read more >
testing/php81-pecl-grpc: Unable to load - alpine · GitLab
After building on v3.15, I have this problem: PHP Warning: PHP Startup: Unable to load dynamic library 'grpc' (tried: ...
Read more >
Protocol Buffer Compiler Installation - gRPC
Check the version of protoc (as indicated below) after installation to ensure that it is sufficiently recent. The versions of protoc installed by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found