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.
Related
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 am trying to install a printer module for node on a lubuntu system, but making the npm installation, I get this:
gyp: Call to 'cups-config --libs' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-23-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/puesto1/app/node_modules/printer
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! printer#0.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the printer#0.1.1 install script.
npm ERR! This is most likely a problem with the printer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls printer
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/puesto1/app
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/puesto1/app/npm-debug.log
npm ERR! not ok code 0
It is a recently installed lubuntu, and I donĀ“t know what to do. Any suggestion to solve the problem?? Any other module to print??
Thank you.
I think node-gyp is not up to date in your system and also cups-config is not installed, try to re-install node-gyp using apt-get with this command : sudo apt-get install node-gyp and install cups-config using command : sudo apt-get install libcups2-dev
I am new to node. Can someone please tell me why this is failing?
sudo su
nvm use 0.10
git clone https://github.com/bitpay/insight.git && cd insight
npm install
...output omitted...
> leveldown#0.10.2 install /insight/node_modules/insight-bitcore-api/node_modules/leveldown
> node-gyp rebuild
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.11.0-19-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /insight/node_modules/insight-bitcore-api/node_modules/leveldown
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
...
npm ERR! Error: ENOENT, lstat '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.11.0-19-generic
npm ERR! command "/root/.nvm/v0.10.26/bin/node" "/root/.nvm/v0.10.26/bin/npm" "install"
npm ERR! cwd /insight
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat
npm ERR! fstream_path /insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/crypto-browserify/test/vectors/byte0002.dat
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /root/.nvm/v0.10.26/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process'
npm ERR! error rolling back insight-bitcore-api#0.1.9 { [Error: ENOTEMPTY, rmdir '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/insight/node_modules/insight-bitcore-api/node_modules/bitcore/node_modules/browserify/node_modules/timers-browserify/node_modules/process' }
npm ERR! leveldown#0.10.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leveldown#0.10.2 install script.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-19-generic
npm ERR! command "/root/.nvm/v0.10.26/bin/node" "/root/.nvm/v0.10.26/bin/npm" "install"
npm ERR! cwd /insight
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
Any insight into this is appreciated! I'm only listing the first ERR blocks...
This line:
/bin/sh: 1: node: not found
leads me to believe node isn't properly installed.. What happens when you type 'node' on a command line?
You need to have nodejs to be accessible with node in the command line.
But: In the Ubuntu repos there is a confusion/conflict between nodejs and ax25-node, the latter occupying the /usr/bin/node path. When you never installed node aka ax25-node you can simply
sudo aptitude install nodejs-legacy
This installs nodejs and creates a symbolic link to /usr/bin/node.
Now npm installs run without any error messages.
In my case the same error as yours appeared when trying to
npm install -g Haraka
The solution is from a fairly unrelated stackoverflow post:
nodejs vs node on ubuntu 12.04
I ran npm install node (even though it was already installed to some degree) and the issue was resolved.
I'm trying to install zeromq.node using:
$ npm install zmq
However, I keep getting the error below. Any help would be much appreciated.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Linux 3.2.0-29-generic
gyp ERR! command "node" "/usr/share/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/robot/code/game/node_modules/zmq
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
npm ERR! zmq#2.1.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the zmq#2.1.0 install script.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-29-generic
npm ERR! command "nodejs" "/usr/bin/npm" "install" "zmq"
npm ERR! cwd /home/robot/code/game/test/amqp
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/robot/code/game/test/amqp/npm-debug.log
npm ERR! not ok code 0
gyp bulid error removed libzmq dev and its dependencies and tried below steps..it worked for me
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install libzmq-dev
$ npm install zmq
I managed to solve this by following this tutorial for installing the python-client. After completing each of the steps I found I was then able to install the node.zeromq module through npm using:
$ npm install zmq
I'm guessing this is due to missing some of the required files. Most likely libzmq-dev.