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

grpc install fails: "node-pre-gyp: Permission denied" but for global install only? #188

Closed
stephenplusplus opened this issue Feb 19, 2018 · 3 comments

Comments

@stephenplusplus
Copy link
Member

Copied from original issue: googleapis/nodejs-speech#29

@talkingnews
February 19, 2018 4:36 PM

Environment details

Steps to reproduce

  1. npm install -g @google-cloud/speech

Results below - this looks like the same issue as these:
grpc/grpc#13928
googleapis/gax-nodejs#173

Strangely, installing it locally (without -g) works, but with -g, I get the following:

> grpc@1.7.3 install /root/.nvm/versions/node/v8.9.4/lib/node_modules/@google-cloud/speech/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

sh: 1: node-pre-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! grpc@1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc@1.7.3 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!     /root/.npm/_logs/2018-02-19T16_16_46_264Z-debug.log

2018-02-19T16_16_46_264Z-debug.log

@murgatroid99
Copy link
Member

This looks like a file system permission problem. I don't know if there's anything we can change in the package to fix that.

@murgatroid99
Copy link
Member

@talkingnews I have figured out how to reproduce this failure: it only happens if I run the command as root. If that is what you are seeing, then you should be able to fix it either by running as a different user, or by running with the --unsafe-perm option.

@talkingnews
Copy link

Tada! Success - thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants