I have been trying to get node and git working for a web project I am working on without any luck.
I have installed node from their website. When I try to do npm install on the git project I am working on it gives me the following error
C:\Users\Jibran\Desktop\ekhadim\ekhadimweb>npm install
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
> bcrypt#0.7.8 install C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\b
crypt
> node-gyp rebuild
C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\bcrypt>node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\
node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'bcrypt_lib.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you are tryin
g to build a project without a solution file, and have specified a non-default
Platform that doesn't exist for this project. [C:\Users\Jibran\Desktop\ekhadim\
ekhadimweb\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\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:807:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\bcrypt
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
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.
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 Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\Jibran\Desktop\ekhadim\ekhadimweb
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\npm-debug.log
npm ERR! not ok code 0
I have installed python, VC++ 2008 and 2010 and OpenSSL but nothing has worked for me yet.
Any help will be appreciated.
Thanks
Jibran
Installing windows build tools worked for me:
npm install --global --production windows-build-tools
Follow : https://github.com/nodejs/node-gyp#installation
Installing windows-build-tools didn't work for me. What did the trick was directly downloading and installing Python.
Related
I am trying to install "truffle" with npm, but I am not familiar with NodeJS and cant figure out why npm wont install it. I try npm install -g truffle in Powershell with Admin rights and after a few lines of output I get this block of error messages:
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 (F:\nodeJS\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 "F:\\nodeJS\\node.exe" "F:\\nodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Max\AppData\Roaming\npm\node_modules\truffle\node_modules\ether-pudding\node_modules\ethereumjs-testrpc\node_modules\ethereumjs-wallet\node_modules\scrypt.js\node_modules\scrypt
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok\
And then after many many yellow lines I finally get this:
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "F:\\nodeJS\\node.exe" "F:\\nodeJS\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "truffle"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
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 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the scrypt 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 scrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls scrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! F:\eth_truffle\npm-debug.log
After that nothing else happens and after a while it just terminates. There are no files (other than a single log file) in the directory I am currently in and the keyword "truffle" can also not be found by cmd/powershell.
As I said I have never worked with NodeJS before and have no idea what all this means. What I can do to get truffle running?
Your install is failing at node-gyp rebuild. Solutions to this problem are listed on the node-gyp repo. The quickest is:
"Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator)." This will install Python and Visual Studio correctly.
Also, you are using Node 4.5. The recommended version is 5+, according to the Truffle Docs
I was also facing the same problem...
Solution:
Run as administrator
npm install --global windows-build-tools
npm install -g truffle
i have project with nodejs & java code , the project working fine on MAC but
when trying to install project on Windows7 64 bit i get the following error :
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\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 Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HDaghash\Documents\QosAdministration\node_modules\java
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! java#0.6.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java#0.6.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the java 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 java
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\HDaghash\Documents\QosAdministration\npm-debug.log
i tried to install visual studio 2012 instead of 2013 as i read in some tickets on github but the same issue still exist.
any one can help with this issue ?
Thanks in advance .
It has a dependency on node-gyp node module and node-gyp does not install in windows.
Here is the solution ...
Java Setup
npm install -g node-gyp
Run
in administrator privileged command prompt window
npm install --global --production windows-build-tools
npm update
npm install java
I am learning sails.js. So I just want to encrypt password using node module bcrypt.
npm install bcrypt is the command what I use to install bcrypt modules, I came to know that it has many dependencies, I intalled node-gyp as well npm install -g node-gyp
Can anyone suggest how can I get it resolved?
Error :
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
blowfish.cc
bcrypt.cc
bcrypt_node.cc
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning
C4530: C++ exception handler used, but unwind semantics are not enabled. Specif
y /EHsc [c:\Users\Aditya Sethi\Documents\backup\My-Twitter\node_modules\bcrypt\
build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(38): fatal error C1083: Cannot open include file: 'openss
l/rand.h': No such file or directory [c:\Users\Aditya Sethi\Documents\backup\My
-Twitter\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files\nodejs\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:789:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Users\Aditya Sethi\Documents\backup\My-Twitter\node_modules\bcry
pt
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm ERR! bcrypt#0.7.7 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.7.7 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 Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"
npm ERR! cwd c:\Users\Aditya Sethi\Documents\backup\My-Twitter
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Users\Aditya Sethi\Documents\backup\My-Twitter\npm-debug.log
npm ERR! not ok code 0
I had pretty much the same problem on Ubuntu 13.10, the error log looked the same and the bcrypt installation stopped at node-gyp rebuild. After some searching and updating node and npm I still had the same issues.
I found a solution finally here: https://github.com/ncb000gt/node.bcrypt.js/issues/90 and the problem was the ~/.node-gyp directory which had unsufficient access rights and simply deleting it did the trick. This is where gyp stores headers and other build files during compilation and if it's gone, gyp will just recreate it.
Try to install global windows build tool if you are using windows,
follow this link bcrypt install instruction
npm install --global --production windows-build-tools
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
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.