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

Global install fails #24

Closed
goloroden opened this issue Feb 11, 2015 · 3 comments
Closed

Global install fails #24

goloroden opened this issue Feb 11, 2015 · 3 comments

Comments

@goloroden
Copy link

Basically, this is the same issue as nodejs/docker-node#10:

When I run the container iojs:1.1.0 using

$ docker run -it iojs:1.1.0 bash

and then inside if the container run

# npm install -g pm2-web

I get an error message by node-gyp telling me that the user is undefined:

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/1.1.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/pm2-web/node_modules/mdns2/.node-gyp"

How do I fix that?

@goloroden
Copy link
Author

I found out that using

# export USER=root && npm install -g pm2-web

at least sets the user to root instead of undefined. Nevertheless, the error is still there.

@retrohacker
Copy link
Contributor

Initial run through makes me think this may be a problem with pm2-web's native module dependency mdns2.

npm install -g forever http-server browserify uglify-js ngist jshint goingnative succeeds.

Those errors you listed are only warnings (although bizarre) and it appears it succeeds in installing to the temp directory.

I believe the thread you link to indicates the same thing.

After an apt-get install libavahi-compat-libdnssd-dev the build succeeds and pm2-web does start, although it throws some concerning errors about v8 while running node-gyp for mdns2. It looks like mdns2 expects a specific version of v8.

@retrohacker
Copy link
Contributor

Interestingly enough, it appears that some of pm2-web's deps want node 0.8.X while others require =>.10. Running on node:0.8 fails, but running on node:0.10 appears to succeed.

mdns2 requires the version of v8 that shipped with node v0.10. You must run this package on node v0.10 in order for it to compile correctly.

docker run -it node:0.10 apt-get update && apt-get install libavahi-compat-libdnssd-dev && npm install -g pm2-web && pm2-web

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