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

Cannot npm install grpc-tools on arm #1497

Closed
kittaakos opened this issue Jul 9, 2020 · 7 comments
Closed

Cannot npm install grpc-tools on arm #1497

kittaakos opened this issue Jul 9, 2020 · 7 comments

Comments

@kittaakos
Copy link

Problem description

I cannot install [email protected] 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"
}



> [email protected] 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 [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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. [email protected]] ?

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!

@murgatroid99
Copy link
Member

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.

@kittaakos
Copy link
Author

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.

@leonheld
Copy link

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?

@murgatroid99
Copy link
Member

grpc-js is all JavaScript, so it should work fine on all platforms, including ARM.

@leonheld
Copy link

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!

@murgatroid99
Copy link
Member

You can also just npm install @grpc/grpc-js.

@leonheld
Copy link

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!

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

No branches or pull requests

3 participants