Cannot npm install grpc-tools on arm
kittaakos opened this issue · comments
Problem description
I cannot install grpc-tools@1.9.0
on armv7l
.
Reproduction steps
mkdir grpc-tools-test && cd grpc-tools-test && npm init -y && npm i -S grpc-tools
Error:
mkdir grpc-tools-test && cd grpc-tools-test && npm init -y && npm i -S grpc-tools
Wrote to /home/pi/dev/git/grpc-tools-test/package.json:
{
"name": "grpc-tools-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
> grpc-tools@1.9.0 install /home/pi/dev/git/grpc-tools-test/node_modules/grpc-tools
> node-pre-gyp install
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc-tools/v1.9.0/linux-arm.tar.gz
node-pre-gyp ERR! stack at PassThrough.<anonymous> (/home/pi/dev/git/grpc-tools-test/node_modules/node-pre-gyp/lib/install.js:149:27)
node-pre-gyp ERR! stack at PassThrough.emit (events.js:194:15)
node-pre-gyp ERR! stack at ClientRequest.<anonymous> (/home/pi/dev/git/grpc-tools-test/node_modules/needle/lib/needle.js:500:9)
node-pre-gyp ERR! stack at Object.onceWrapper (events.js:277:13)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:189:13)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:442:20)
node-pre-gyp ERR! stack at TLSSocket.emit (events.js:189:13)
node-pre-gyp ERR! stack at addChunk (_stream_readable.js:284:12)
node-pre-gyp ERR! System Linux 4.19.118-v7l+
node-pre-gyp ERR! command "/home/pi/.config/nvm/versions/node/v10.15.3/bin/node" "/home/pi/dev/git/grpc-tools-test/node_modules/.bin/node-pre-gyp" "install"
node-pre-gyp ERR! cwd /home/pi/dev/git/grpc-tools-test/node_modules/grpc-tools
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc-tools/v1.9.0/linux-arm.tar.gz
npm WARN grpc-tools-test@1.0.0 No description
npm WARN grpc-tools-test@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc-tools@1.9.0 install: `node-pre-gyp install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc-tools@1.9.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-07-09T15_14_56_961Z-debug.log
pi@raspberrypi:~/dev/git/grpc-tools-test $
Environment
- OS name, version and architecture: [e.g. Linux Ubuntu 18.04 amd64]:
Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
- Node version [e.g. 8.10.0]:
10.15.3
- Node installation method [e.g. nvm]:
nvm
- If applicable, compiler version [e.g. clang 3.8.0-2ubuntu4] ?
- Package name and version [e.g. gRPC@1.12.0] ?
Additional context
I would like to build a gRPC capable electron app for armhf
and arm64
. I already switched from grpc
to @grpc/grpc-js
as there are no pre-builds for electron for ARM. But I cannot install grpc-tools
to generate my JS/TS API as part of the build step, as I cannot pull grpc-tools
in. Is there a recommended way to work around this? Thank you!
It is true that we do not distribute ARM builds of grpc-tools. I recommend doing your code generation on a non-ARM machine and then copying the files over.
It is true that we do not distribute ARM builds of grpc-tools.
Thanks for confirming it!
I recommend doing your code generation on a non-ARM machine and then copying the files over.
OK, I had the same idea.
Closing it; there is a workaround.
Sorry for commenting on a closed issue, but
I recommend doing your code generation on a non-ARM machine and then copying the files over.
Wouldn't we still need grpc-js anyway?
grpc-js is all JavaScript, so it should work fine on all platforms, including ARM.
Yea, a coworker of mine pointed that out earlier this morning. I went the "I don't really know what I'm doing" route and did this
RUN git clone https://github.com/grpc/grpc-node.git && cd grpc-node/packages/grpc-js && npm install --unsafe-perm && npm link
then simply link it with npm on my project.
Thanks!
You can also just npm install @grpc/grpc-js
.
Oh, that's absolutely true. I think I got things messed up and thought grpc-js had grps-tools as a dependency, but it's all nice clean TypeScript. Really convenient. Appreciate your replies!