0
votes
[email protected] install /usr/local/lib/node_modules/hdf5
node-gyp rebuild --jobs max

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/hdf5/build' gyp ERR! System Darwin 17.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--jobs" "max" gyp ERR! cwd /usr/local/lib/node_modules/hdf5 gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild --jobs max npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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!
/Users/abc/.npm/_logs/2018-07-20T21_24_19_576Z-debug.log

1

1 Answers

0
votes

Your error clearly says: Error: EACCES: permission denied, mkdir which is a permissions issue. Looks likes it trying to create directory called build inside /usr/local/lib/node_modules/hdf5/.

To fix it, just run the same command with sudo at the beginning.

But, I would not recommend it unless you install global package. Do you try to install a local package ? if so, make sure the permissions of the node_modules is not root. If it does, either chown it or remove it and do npm install with non-root user.