Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

npm WARN cannot run in wd node-gyp #72

Closed
corbinu opened this issue Jul 1, 2015 · 3 comments
Closed

npm WARN cannot run in wd node-gyp #72

corbinu opened this issue Jul 1, 2015 · 3 comments

Comments

@corbinu
Copy link

corbinu commented Jul 1, 2015

I am canot get node-gyp rebuild to run as an install step within the docker container:

npm install @corbinu/couchbase

gives the error
npm WARN cannot run in wd node-gyp @corbinu/couchbase@2.0.11 node-gyp rebuild

Any ideas?

@Starefossen
Copy link
Member

This is a npm issue npm/npm#3497 since the Docker image runs as root by default.

You can either run the image as a non-root user or npm install --unsafe-perm.

@corbinu
Copy link
Author

corbinu commented Jul 2, 2015

OK so perhaps I should issue a pull request to here then to set the default .npmrc to have

unsafe-perm = true

Or would it be better to open an issue with npm?

Is it possible to configure NPM with an environment var? maybe issue a PR there that detect something like NPM_UNSAFE_PERM=true and then set that by default in the iojs and node docker containers?

@Starefossen
Copy link
Member

Yes, setting this via environment variables would be the best. Not sure if we should do this by default since it introduces some security issues.

We want to investigate how to best run these images under a non-root user.

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

2 participants