Why do I get this error when installing npm now package? - node.js

When I try to install now package it is giving me following error:
npm install now
npm WARN package.json Paint_HTML5_multi#0.3.0 No repository field.
npm WARN package.json Paint_HTML5_multi#0.3.0 No README data
npm http GET https://registry.npmjs.org/now
npm http 304 https://registry.npmjs.org/now
npm http GET https://registry.npmjs.org/node-proxy
npm http 304 https://registry.npmjs.org/node-proxy
npm WARN engine node-proxy#0.8.0: wanted: {"node":">=0.11.x","npm":">= 1.1.17"} (current: {"node":"v0.10.25","npm":"1.3.24"})
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
> node-proxy#0.8.0 install /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy
> node-gyp configure build
make: Entering directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/build'
CXX(target) Release/obj.target/nodeproxy/src/node-proxy.o
make: g++: Command not found
make: *** [Release/obj.target/nodeproxy/src/node-proxy.o] Error 127
make: Leaving directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
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.8.0-35-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! node-proxy#0.8.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-proxy#0.8.0 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "now"
npm ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/npm-debug.log
npm ERR! not ok code 0
I'm getting the above error; how can I fix it?

You need build tools installed on your system. Based on the directory paths, I can assume you're using linux. On ubuntu, for example, you can install build tools like so: sudo apt-get install -y build-essential, otherwise view this README to see what tools are required to be installed.

Related

Error installing zmq Node Module

When installing the zmq node module, I get the following error.
I have the latest stable version of node installed.
I am running a Mac on OS X 10.9.3
npm http GET https://registry.npmjs.org/zmq
npm http 304 https://registry.npmjs.org/zmq
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
> zmq#2.7.0 install /Users/mario/node_modules/zmq
> node-gyp rebuild
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config libzmq --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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mario/node_modules/zmq
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! zmq#2.7.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq#2.7.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 Darwin 13.2.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "zmq"
npm ERR! cwd /Users/mario/messaging
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/mario/messaging/npm-debug.log
npm ERR! not ok code 0
Why do I get this error and what should I do to fix it?
Looks like you need to install pkg-config:
/bin/sh: pkg-config: command not found
Try brew install pkg-config

Install ctags from npm: no such option --no-parallel

I recently installed node and npm to try it out but during an installation of a module it stuck on the ctags package which it depended on. Trying to only install ctags resulted in a weird error which I could not find a solution for.
henje#mymachine:~/test/node-ctags$ npm install
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/grunt-contrib-coffee
npm http GET https://registry.npmjs.org/event-stream
npm http GET https://registry.npmjs.org/grunt-shell
npm http GET https://registry.npmjs.org/node-gyp
[...]
> ctags#0.11.0 install /home/henje/test/node-ctags
> node-gyp rebuild
Usage: gyp_main.py [options ...] [build_file ...]
gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340: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 2.6.36.4-vs2.3.0.36.39-nc
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/henje/test/node-ctags
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! ctags#0.11.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ctags#0.11.0 install script.
npm ERR! This is most likely a problem with the ctags 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 ctags
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.36.4-vs2.3.0.36.39-nc
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/henje/test/node-ctags
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.6
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/henje/test/node-ctags/npm-debug.log
npm ERR! not ok code 0
I am not sure if this is a general issue or just. I tried npm install ctags as well as cloning from github. I also checked if I have a recent gcc, etc. for gyp and have no idea left. I appreciate any answers.
I have also faced this issue while trying to install pm2 module.
As a workaround, removing gyp solved this problem for me:
sudo apt-get remove gyp
Here is the issue itself listed in pm2 repository: https://github.com/Unitech/pm2/issues/434

node-expat install error on ubuntu VM

I could not find anything yet in order to solve my issues, ive read all google and still no anwer, did anyone had issues installing this package and could solve it? I need help with this.
ubuntu#ubuntu:~/Desktop/nodeEjabberd$ npm cache clean
ubuntu#ubuntu:~/Desktop/nodeEjabberd$ sudo npm install node-expat
npm http GET https://registry.npmjs.org/node-expat
npm http 200 https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/node-expat/-/node-expat-2.1.4.tgz
npm http 200 https://registry.npmjs.org/node-expat/-/node-expat-2.1.4.tgz
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/nan/-/nan-0.6.0.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-0.6.0.tgz
> node-expat#2.1.4 install /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat
> node-gyp rebuild
gyp: /home/ubuntu/.node-gyp/0.10.24/common.gypi not found (cwd: /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat) while reading includes of binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.5.0-45-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! node-expat#2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.1.4 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.5.0-45-generic
npm ERR! command "node" "/usr/bin/npm" "install" "node-expat"
npm ERR! cwd /home/ubuntu/Desktop/nodeEjabberd
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/Desktop/nodeEjabberd/npm-debug.log
npm ERR! not ok code 0
'.node-gyp/0.10.24/common.gypi not found' suggests that something went wrong when node-gyp tried to install headers of nodejs 0.10.24.
Delete /home/ubuntu/.node-gyp directory and try again.

Error: not found: make

I can't install any packages that requires node-gyp. The error message goes like this
$ npm install node-protobuf
info trying registry request attempt 1 at 22:43:57
http GET https://registry.npmjs.org/node-protobuf
http 200 https://registry.npmjs.org/node-protobuf
npm http GET https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.8.tgz
npm http 200 https://registry.npmjs.org/node-protobuf/-/node-protobuf-1.0.8.tgz
> node-protobuf#1.0.8 install /home/whs/node_modules/node-protobuf
> node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 2.6.32-5-amd64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/whs/node_modules/node-protobuf
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! node-protobuf#1.0.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-protobuf#1.0.8 install script.
npm ERR! This is most likely a problem with the node-protobuf 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 node-protobuf
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-5-amd64
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-protobuf"
npm ERR! cwd /home/whs/
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/whs/npm-debug.log
npm ERR! not ok code 0
I also tried the protobuf package and got the exact same result.
Most search result says that this error is from missing make but in my case I have make installed. The node installation is even built from source manually on the machine.
Additional info:
Path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Make: GNU Make 3.81 installed in /usr/bin/make (from official Debian package)
Distro: Debian 6.0.8
Arch: amd64
Build-essential package: installed
Node: Manually built from source
Installation of non-gyp packages: work normally
I have found that I set 0754 permission on /usr/bin/make and a bug in which skip the file due to user's primary group is not the same as make's. I have filed a bug in node-which.

ELIFECYCLE error when installing bcrypt on node. CXX Error?

After installing OS X Mountain Lion and XCode, I'm getting this error:
Jonathans-MacBook-Air:fme jong$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt/0.7.0
npm http 304 https://registry.npmjs.org/bcrypt/0.7.0
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
> bcrypt#0.7.0 install /Users/jong/Workspace/fme/node_modules/bcrypt
> node-gyp rebuild
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: c++: No such file or directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/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 Darwin 12.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jong/Workspace/fme/node_modules/bcrypt
gyp ERR! node -v v0.8.4
gyp ERR! node-gyp -v v0.6.1
gyp ERR! not ok
npm ERR! bcrypt#0.7.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the bcrypt#0.7.0 install script.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /Users/jong/Workspace/fme
npm ERR! node -v v0.8.4
npm ERR! npm -v 1.1.45
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jong/Workspace/fme/npm-debug.log
npm ERR! not ok code 0
I have a feeling that it doesn't know which compiler to use. How do I fix this?
Apparently I just need to install the Command Line Tools from the downloads panel in XCode
xCode doesn't bundle command-line tools by default. Apple explains it in their documentation.
The problem may be that your Node.Js is version 0.10 and some modules only work with the previous 0.8.22 version which you can get here: http://blog.nodejs.org/2013/03/06/node-v0-8-22-stable/

Resources