When I attempt to install memwatch from npm with npm install memwatch I receive these errors before it fails completely:
gyp WARN EACCES user does not have permission to access the dev dir "~/.node-gyp/0.12.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/folders/bf/_rxhpvq936b1vxf9ylygj86r0000gn/T/.node-gyp"
and
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:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cmlewis95/Dropbox/Programming/Projects/Markdown/node_modules/memwatch
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "memwatch"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! memwatch#0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch#0.2.2 install script 'node-gyp rebuild'.
When I go to the location which it says it doesn't have access to, the version number listed in the error is not a directory. I only have a 0.10.13 folder there. I assumed I just needed to update node-gyp but all of the documentation I found on that did not solve the issue. Thanks.
If you happened to use Window, make it sure your opening commanding prompt as administrators access. By most chances if you using either Linux or OSX, try add a prefix sudo in front of your command,
sudo npm install memwatch
Related
I tried to install bcrypt to my Node JS project, but it went wrong.
I am using NodeJS version 4.5.0 and npm 3.10.7.
My operating system is Windows 10 anniversary 64 bit.
Here is error in CMD:
C:\Users\kim\Documents\college\Skripsi\jti-test\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Users\kim\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
file specified. [C:\Users\kim\Documents\college\Skripsi\jti-test\node_mo
dules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\kim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kim\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\kim\Documents\college\Skripsi\jti-test\node_modules\bcrypt
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kim\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"
npm ERR! node v4.5.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\kim\Documents\college\Skripsi\jti-test\npm-debug.log
This is the full log file: link
I'm trying to install the nodetime module (for node), but when I do, I get the following compilation error:
make: *** [Release/obj.target/nodetime_native/src/nodetime_native.o]
Error 1 make: Leaving directory
/home/fernando/node_modules/nodetime-native/build' gyp ERR! build
error gyp ERR! stack Error:make` failed with exit code: 2 gyp ERR!
stack at ChildProcess.onExit
(/home/fernando/apps/node-v0.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR!
stack at Process.ChildProcess._handle.onexit
(child_process.js:1074:12) gyp ERR! System Linux 3.13.0-53-generic gyp
ERR! command "node"
"/home/fernando/apps/node-v0.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" gyp ERR! cwd /home/fernando/node_modules/nodetime-native gyp
ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm
ERR! Linux 3.13.0-53-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "i" "nodetime-native" npm ERR! node v0.12.2 npm
ERR! npm v2.7.4 npm ERR! code ELIFECYCLE
npm ERR! nodetime-native#0.1.0 install: node-gyp rebuild npm ERR!
Exit status 1 npm ERR! npm ERR! Failed at the nodetime-native#0.1.0
install script 'node-gyp rebuild'. npm ERR! This is most likely a
problem with the nodetime-native 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 nodetime-native npm ERR! There is likely
additional logging output above.
Looking around, it would seem like I need to have Python installed, which I do (both 2.7 and 3.4) and make and gcc, which I do.
What else could be happening here?
You also need to make sure the Python executable you reach via your PATH environment variable leads to the 2.x version.
I believe node-gyp isn't working well with the 3.x version of Python.
I am trying to use waterlock for authentication. i have installed waterlock but failing to install waterkick-local-auth. the error message is shown bellow:
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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.13.0-34-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/developer/Desktop/Sails/AuthTest/node_modules/waterlock-local-auth/node_modules/bcrypt
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.13.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "waterlock-local-auth"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.7.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.7.8 install script 'node-gyp rebuild'.
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! Please include the following file with any support request:
npm ERR! /home/developer/Desktop/Sails/AuthTest/npm-debug.log
By studying the documentation of the waterlock local auth i have come to an solution is that the problem is caused for the dependencies of waterlock local auth.
I am using the latest node version.
And to make this work i need to downgrade the node version. And then all the dependencies will work.
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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Linux 3.2.0-40-virtual
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/grooform/fungroo/node_modules/bcrypt
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! bcrypt#0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.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 Linux 3.2.0-40-virtual
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/grooform/fungroo
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/grooform/fungroo/npm-debug.log
npm ERR! not ok code 0
I have installed libcurl4-openssl-dev too but still m getting same error
also i have installed python and set HOME to point to /home/ubuntu
can you please help..
TRIED ON A FRESH UBUNTU
getting following error
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
npm http 304 https://registry.npmjs.org/pause/0.0.1
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.13.0-36-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/fungroo/node_modules/bcrypt
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
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! weird error 1
nan has issues with some (older) versions of the node v0.11 unstable branch, so you will need to upgrade your unstable node version (v0.11.14 is the latest as of this writing) or use a stable version of node (v0.10.33 as of this writing).
I'm trying to install opencv for node. I don't think this has anything to do with opencv directly, rather it has to do with node-gyp.
I had success in installing opencv on my mac but when I try to do the exact same on Ubuntu server I get the following error after doing 'npm install opnecv':
npm http GET https://registry.npmjs.org/opencv
npm http 304 https://registry.npmjs.org/opencv
> opencv#0.0.7 preinstall /home/demo/node_modules/opencv
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/node-gyp/lib/install.js:69:16)
gyp ERR! stack at Object.commands.forEach.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/node-gyp/lib/node-gyp.js:56:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/node-gyp/lib/configure.js:181:20)
gyp ERR! stack at /usr/local/lib/node_modules/node-gyp/lib/configure.js:101:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:538:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Process._handle.onexit (child_process.js:680:5)
gyp ERR! System Linux 3.2.0-29-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/demo/node_modules/opencv
gyp ERR! node -v v0.8.13-pre
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! opencv#0.0.7 preinstall: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the opencv#0.0.7 preinstall script.
npm ERR! This is most likely a problem with the opencv 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 opencv
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-29-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "opencv"
npm ERR! cwd /home/demo
npm ERR! node -v v0.8.13-pre
npm ERR! npm -v 1.1.63
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/demo/npm-debug.log
npm ERR! not ok code 0
I also tried downloading the source code and doing 'node-gyp rebuild' with similar results:
demo#camera:~/src/node$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp#0.7.1
gyp info using node#0.8.13-pre | linux | x64
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/node-gyp/lib/install.js:69:16)
gyp ERR! stack at Object.commands.forEach.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/node-gyp/lib/node-gyp.js:56:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/node-gyp/lib/configure.js:181:20)
gyp ERR! stack at /usr/local/lib/node_modules/node-gyp/lib/configure.js:101:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:538:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Process._handle.onexit (child_process.js:680:5)
gyp ERR! System Linux 3.2.0-29-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/demo/src/node
gyp ERR! node -v v0.8.13-pre
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
Has anyone had this issue before?
I was also able to solve this by upgrading my version of node to a stable version (e.g. not a "pre" version - your version is 0.8.13-pre) with the following:
sudo npm install -g n # install node version manager "n"
sudo n stable # install the latest stable version of node
Use npm install --nodedir=/path/to/node opencv, where /path/to/node is a path to current nodejs source code.
It happens because node-gyp can't find source to your custom build, and here is the discussion about it: https://github.com/TooTallNate/node-gyp/issues/86
You can commonly fix this by creating a symbolic link if you have super user permissions.
chmod a+r /path/to/node -R
cd /usr/lib
sudo ln -s /path/to/node node
Then npm install again, and it will likely find it. Don't do this if /usr/lib/node already exists, as other software may depend on it.