Closed marcellodesales closed 9 years ago
Just as a second note... The installation works properly on Ubuntu
mdesales@ubuntu [05/30/201511:42:56] /tmp $ uname -a
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
mdesales@ubuntu [05/29/201518:13:40] /tmp $ npm install xxhash
/
> xxhash@0.2.2 install /tmp/node_modules/xxhash
> node-gyp rebuild
make: Entering directory `/tmp/node_modules/xxhash/build'
CXX(target) Release/obj.target/hash/src/hash.o
CC(target) Release/obj.target/hash/deps/xxhash/xxhash.o
SOLINK_MODULE(target) Release/obj.target/hash.node
SOLINK_MODULE(target) Release/obj.target/hash.node: Finished
COPY Release/hash.node
make: Leaving directory `/tmp/node_modules/xxhash/build'
xxhash@0.2.2 node_modules/xxhash
├── nan@1.8.4
└── readable-stream@1.0.33 (inherits@2.0.1, isarray@0.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
It looks like this is an npm Enterprise issue that has to do with wrong permissions based on your linked issue. It looks like npm tries to install to a totally different directory in that case and I'm guessing that the appropriate symlink isn't created inside node_modules
so that require('nan')
works.
So you might check that root has the appropriate permissions to /root/.node-gyp/0.10.36
.
Hi @mscdex
Wait... Even if I'm installing in a different directory???
The node-gyp has permission for the root user set...
[root@pppdc9prd8jb npme-installer]# ls -la ~/.node-gyp/0.10.36/
total 0
drwx------. 2 root root 6 May 30 02:24 .
drwx------. 3 root root 20 May 30 02:24 ..
I will try to add permissions to the group and others...
Hi @mscdex
I think it has to do with installing your module using the root user... I can install your module using another user other than root... Could you verify?
[mdesales@pppdc9prd8jb ~]$ npm install xxhash
-
> xxhash@0.2.2 install /export/home/mdesales/node_modules/xxhash
> node-gyp rebuild
make: Entering directory `/export/home/mdesales/node_modules/xxhash/build'
CXX(target) Release/obj.target/hash/src/hash.o
CC(target) Release/obj.target/hash/deps/xxhash/xxhash.o
SOLINK_MODULE(target) Release/obj.target/hash.node
SOLINK_MODULE(target) Release/obj.target/hash.node: Finished
COPY Release/hash.node
make: Leaving directory `/export/home/mdesales/node_modules/xxhash/build'
xxhash@0.2.2 node_modules/xxhash
├── nan@1.8.4
└── readable-stream@1.0.33 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
@marcellodesales Does root also have the right permissions on the parent directories too?
Unfortunately I do not have a RHEL7 setup nor do I install modules as root (the thought makes me cringe).
Yeah I agree... I'm just lazy to get it done with the proper non-root user... I just want to understand why it fails with the root user...
I really don't know, I'm just guessing. The npm team would be able to help you more with this than I could though.
The installation process of "npme" depends on this package on RHEL7...
Trying to install it from npm triggers an error trying to find the module
nan
. See https://github.com/npm/npme-installer/issues/61However, when I clone and build, everything works fine...
I even tried to call the
node-gyp
and it works as expected...Could you please help!!!?!?! thanks Marcello