hdf5#0.3.3 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! hdf5#0.3.3 install:
node-gyp rebuild --jobs max npm ERR! Exit status 1 npm ERR! npm ERR!
Failed at the hdf5#0.3.3 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
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.
Related
I want to install mechanic on my nginx server.
I got this error when I execute sudo npm install -g mechanic:
tigaron#galaxybrainpower:/var/www/tigaron$ sudo npm install -g mechanic
/usr/bin/mechanic -> /usr/lib/node_modules/mechanic/bin/mechanic
> fs-ext#2.0.0 install /usr/lib/node_modules/mechanic/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/tigaron/.cache/node-gyp/10.20.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp'
gyp ERR! System Linux 4.15.0
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/lib/node_modules/mechanic/node_modules/fs-ext
gyp ERR! node -v v10.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fs-ext#2.0.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fs-ext#2.0.0 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! /home/tigaron/.npm/_logs/2020-05-24T06_29_26_857Z-debug.log
What is happening here? How to fix this error and proceed with the installation?
This answer solved the same issue I had when installing a different package.
Apparently the nobody user is used when building packages globally, but the directories are owned by root so it fails permissions. Configuring npm to use root with the following command is what the answer recommends.
npm -g config set user root
Node: 12.6.0,
Npm:6.10.1,
Ubuntu: 19.04
I got this huge error when I run
npm i <package-name> Error Link https://textsaver.flap.tv/lists/2s4g
When I include sudo sudo i <package-name> I got this error
usama#usama:~/Learn/back-end/advance-nodejs/section two$ sudo npm i webworker-threads
> webworker-threads#0.7.17 install /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads/build'
gyp ERR! System Linux 5.0.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! not ok
npm WARN section-two#1.0.0 No description
npm WARN section-two#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webworker-threads#0.7.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads#0.7.17 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! /home/usama/.npm/_logs/2019-07-13T15_25_15_922Z-debug.log
usama#usama:~/Learn/back-end/advance-nodejs/section two$
Using yarn instead of npm solve the issue.
Actually I am trying to install express-basic-auth, but it fails due to the installation of scrypt#6.0.3. I already tried:
sudo apt-get install build-essential
and also tried deleting ~/.node-gyp as stated here: https://github.com/nodejs/node-gyp/issues/809, but none of the suggestions helped. I still get the same error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/a/b/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/a/b/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN b#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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! /home/user/.npm/_logs/2018-12-30T20_52_24_060Z-debug.log
Can anybody help?
I solved this problem by installing an earlier version of node locally, in my case the node 8.10.0 version. I stopped getting the same error you are getting here. Delete your node modules and package-lock.json then run
npm install --save node#earlierversion
npm install rest of packages
That's what I did to rebuild my node modules and prevent this error.
I'm trying to install npm lame on a raspberry pi 0. I've googled everything but keep getting this error:
Not really sure what else to do.
pi#raspberrypi:~/twotone $ sudo npm install lame
> lame#1.2.4 install /home/pi/twotone/node_modules/lame
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/twotone/node_modules/lame/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/twotone/node_modules/lame/.node-gyp'
gyp ERR! System Linux 4.14.79+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/twotone/node_modules/lame
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN twotone#1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lame#1.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lame#1.2.4 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! /root/.npm/_logs/2019-01-06T22_12_04_380Z-debug.log
You might have to add --unsafe-perm to the npm install command
I have this error when i try to update my meteor project from Meteor 1.3.5.1 to METEOR 1.4. I don't know why i have this error. I have already try to do a chown to .meteor and .np floder.
=> Errors while initializing project:
While loading package npm-bcrypt#0.8.7:
error: Command failed:
/home/noob/.meteor/packages/meteor-tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm
rebuild --no-bin-links --update-binary
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 3.16.0-38-generic
gyp ERR! command
"/home/noob/.meteor/packages/meteor-tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/noob/.meteor/packages/meteor-tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/noob/.meteor/packages/npm-bcrypt/.0.8.7.1np1i1l++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-140iag7/node_modules/bcrypt
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv
"/home/noob/.meteor/packages/meteor-tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/noob/.meteor/packages/meteor-tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm"
"rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
.....
It was an permission error
I do a sudo chown -R $USERNAME /home/noob and now all work fine
Look more like a Node-gyp problem.
Extracted from Meteor docs:
If you have binary npm packages in your application node_modules
directory, you should run meteor npm rebuild (after meteor update) in
your application directory to recompile those packages.
If it still doesn't work, try removing your ~/.node-gyp file and then npm update.
Had to delete bcrypt directory
rm -r $HOME/.meteor/packages/npm-bcrypt/.0.7.8_2.f294j7++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/bcrypt