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

npm install fails on M1 mac because of missing GRPC dependency #540

Closed
RostiMelk opened this issue Apr 8, 2022 · 3 comments · Fixed by #541
Closed

npm install fails on M1 mac because of missing GRPC dependency #540

RostiMelk opened this issue Apr 8, 2022 · 3 comments · Fixed by #541

Comments

@RostiMelk
Copy link

Error log:

npm ERR! code 1
npm ERR! path /Users/rostimelk/Projects/testinging/node_modules/grpc-tools
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install
npm ERR! response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.11.2/darwin-arm64.tar.gz
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
npm ERR! node-pre-gyp info using node@16.6.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/rostimelk/Projects/testinging/node_modules/grpc-tools/bin/grpc_tools.node" (not found)
npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc-tools/v1.11.2/darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.11.2/darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install error
npm ERR! node-pre-gyp ERR! stack Error: response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.11.2/darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! stack     at /Users/rostimelk/Projects/testinging/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
npm ERR! node-pre-gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.2.0
npm ERR! node-pre-gyp ERR! command "/Users/rostimelk/.nvm/versions/node/v16.6.0/bin/node" "/Users/rostimelk/Projects/testinging/node_modules/.bin/node-pre-gyp" "install"
npm ERR! node-pre-gyp ERR! cwd /Users/rostimelk/Projects/testinging/node_modules/grpc-tools
npm ERR! node-pre-gyp ERR! node -v v16.6.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

Related issue:
grpc/grpc-node#1405

@brikendr
Copy link
Contributor

It appears that the sub dependencies of sdk (@huddly/camera-proto and @huddly/camera-switch-proto) have grpc-tools as a production dependency where in reality it should have been a dev dependency. Updating this will most likely fix the above issue.

@eskilgh eskilgh reopened this Apr 20, 2022
@eskilgh
Copy link
Contributor

eskilgh commented Apr 20, 2022

Unfortunately declaring these dependencies as dev dependencies did not fix the issue at hand.
It seems that we are blocked by this issue.

You might have success using one of the approaches in this thread. Or you could try using node version 14.

@eskilgh eskilgh closed this as completed Apr 20, 2022
@suenot
Copy link

suenot commented Apr 24, 2022

Try this:

npm_config_target_arch=x64 npm i grpc-tools
npm i

or that:

yarn add grpc-tools --ignore-scripts
pushd node_modules/grpc-tools
node_modules/.bin/node-pre-gyp install --target_arch=x64
popd

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

Successfully merging a pull request may close this issue.

4 participants