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 install grpc-tools js package on ubuntu 18.04 with npm #1751

Open
PolyProgrammist opened this issue Apr 15, 2021 · 6 comments
Open

Cannot install grpc-tools js package on ubuntu 18.04 with npm #1751

PolyProgrammist opened this issue Apr 15, 2021 · 6 comments

Comments

@PolyProgrammist
Copy link

Problem description

I am trying to install grpc-tools package on ubuntu 18.04 with npm. But an error arises. On ubuntu 20.04 everything is ok. How to install it on ubuntu 18.04?

Reproduction steps

I have Dockerfile:

FROM ubuntu:18.04
RUN apt update && apt install -y --no-install-recommends nodejs npm
RUN npm config set strict-ssl false
RUN npm install grpc-tools@1.11.0

I build docker this way:

docker build .

Getting an error:

Step 4/4 : RUN npm install grpc-tools@1.11.0
 ---> Running in 77d9132ac6af
npm WARN deprecated node-pre-gyp@0.15.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

> grpc-tools@1.11.0 install /node_modules/grpc-tools
> node-pre-gyp install

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp ERR! install error 
node-pre-gyp ERR! stack Error: unable to get local issuer certificate
node-pre-gyp ERR! stack     at TLSSocket.<anonymous> (_tls_wrap.js:1105:38)
node-pre-gyp ERR! stack     at emitNone (events.js:106:13)
node-pre-gyp ERR! stack     at TLSSocket.emit (events.js:208:7)
node-pre-gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:639:8)
node-pre-gyp ERR! stack     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38)
node-pre-gyp ERR! System Linux 5.4.0-40-generic
node-pre-gyp ERR! command "/usr/bin/node" "/node_modules/.bin/node-pre-gyp" "install"
node-pre-gyp ERR! cwd /node_modules/grpc-tools
node-pre-gyp ERR! node -v v8.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok 
unable to get local issuer certificate
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.
npm ERR! Linux 5.4.0-40-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "grpc-tools@1.11.0"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! grpc-tools@1.11.0 install: `node-pre-gyp install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc-tools@1.11.0 install script 'node-pre-gyp install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc-tools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs grpc-tools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls grpc-tools
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log
The command '/bin/sh -c npm install grpc-tools@1.11.0' returned a non-zero code: 1

Environment

  • Linux Ubuntu 18.04 amd64
  • Node version 8.10.0
  • Node installation method: apt
  • Package name and version grpc-tools@1.11.0

Additional context

Also on stackoverflow: https://stackoverflow.com/questions/67114242/how-to-install-grpc-tools-js-package-on-ubuntu-18-04-with-npm

@murgatroid99
Copy link
Member

You are using an old version of Node, that might be part of the problem. Node 8 has been past end of life for almost a year.

@PolyProgrammist
Copy link
Author

You are using an old version of Node, that might be part of the problem. Node 8 has been past end of life for almost a year.

@murgatroid99 Thanks, that solves the problem. Updated with:

npm cache clean -f
npm install -g n
n stable

@PolyProgrammist
Copy link
Author

Hello, there is still a problem.

Despite it does work, it doesn't work under corporate proxy. Most probably this is not an issue with grpc-tools, but could you please take a look?

While trying to install grpc-tools 1.9.0 under corporate proxy the error arises: Node.js: Error: 500 status code downloading tarball

https://stackoverflow.com/questions/67127855/node-js-error-500-status-code-downloading-tarball

@murgatroid99
Copy link
Member

A 500 error should be temporary. Wait a bit and try again.

@PolyProgrammist
Copy link
Author

Unfortunately it is not temporrarily and is reproduced always. I see that here https://node-precompiled-binaries.grpc.io/ 1.6.6 is present, but 1.9.0 is not

@murgatroid99
Copy link
Member

Your original issue said that the installation succeeded on Ubuntu 20.04, but failed on Ubuntu 18.04. That's not an issue with a file not existing on the server. And I don't know how that XML file is generated, but it's definitely not complete. You can open the URL from the error message yourself and see that the file exists.

A 500 error is an internal server error, and I don't know why you would be getting that consistently from Cloudflare or Google Cloud Storage.

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

2 participants