Closed kulicuu closed 10 years ago
As suggested by the error, normal non-sudo non-global install works fine.
It might be worth keeping this open if it's worth investigating, but it's no longer critical for me, as I'll just switch away from global installs for these items.
btw: Thanks for the great software !
+1 same problem in my server.
:+1: big problem for me running my node.js application on elastic beanstalk
Perhaps we should add a check for when the "temporary dev dir" matches the default dev dir and then throw an error or something.
The real solution though is to not run node-gyp
as root... ever...
well I take it back - Maybe something else is causing my problem because elastic beanstalk is not running anything as root.
I was trying to manually run the deployment scripts when I got this error.. after noticing node-gyp running for 20 min during the deployment process...
'big problem for me running my node.js application on elastic beanstalk'
+1
I got nailed by this again last night....
Ah wow haven't seen this in awhile.
I know how to fix this now!
At least this worked for me:
sudo npm --unsafe-perm=true install -g [...]
You need to do that --unsafe-perm=true
flag set to true. I forget why. It works.
@kulicuu this worked perfectly for me on ASW Elastic Beanstalk NPM_CONFIG_UNSAFE_PERM=true ftw.
Ha great. So I'll be cautiously optimistic that this fix will work for everyone and close the issue.
See (closed) issue #407
from builderror.log [...] gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/wylie/tmp/.node-gyp/0.10.25" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/wylie/tmp/.node-gyp" gyp verb command install [ 'v0.10.25' ] gyp verb install input version string "v0.10.25" gyp verb install installing version: 0.10.25 gyp verb install --ensure was passed, so won't reinstall if already installed gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/wylie/tmp/.node-gyp/0.10.25" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/wylie/tmp/.node-gyp" gyp verb command install [ 'v0.10.25' ] gyp verb install input version string "v0.10.25" gyp verb install installing version: 0.10.25 gyp verb install --ensure was passed, so won't reinstall if already installed gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/wylie/tmp/.node-gyp/0.10.25" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/wylie/tmp/.node-gyp" gyp verb command install [ 'v0.10.25' ] gyp verb install input version string "v0.10.25" [...]