getting error while running npm install xml2json in windows cmd
resolved python & .net dependency but stuck in "fatal error C1060: compiler is out of heap space"
cannot install in any node js project throughout my windows system
npm install simple-xml2json & parallel-xml2json are working fine
>npm install xml2json --save request
npm WARN package.json # No description
npm WARN package.json # No repository field.
npm WARN package.json # No README data
npm WARN package.json # No license field.
-
> node-expat#2.3.13 install xxxxxxxxxxxxxxxxxxxxxxxxxxx\xml2json\node_modules\node-expat
> node-gyp rebuild
xxxxxxxxxxxxxxxxxxxxx\xml2json\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Program Files\nodej
s\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.
xmlparse.c
xmltok.c
xmlrole.c
win_delay_load_hook.c
..\..\..\deps\libexpat\lib\xmlparse.c(1844): warning C4244: 'return' : conversion from '__int64' to 'XML_Index', possible loss of data [xxxxxxxxxxxx\xml2json\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
expat.vcxproj -> xxxxxxxxxxxxxxxx\xml2json\node_modules\node-expat\build\Release\\libexpat.lib
node-expat.cc
xxxxxxxxxxxxxxxxxx\xml2json\node_modules\node-expat\node_modules\nan\nan.h(72): fatal error C1060: compiler is out
of heap space [xxxxxxxxxxxxxxxxxxxxxxxxxx\xml2json\node_modules\node-expat\build\node_expat.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: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 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebui
ld"
gyp ERR! cwd xxxxxxxxxxxxxxxxxxxxxxxxxxxxxs\xml2json\node_modules\node-expat
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "xml2json" "--save" "req
uest"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! node-expat#2.3.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.13 install script 'node-gyp rebuild'.
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 information on how to open an issue for this project >with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
Some libraries which are based on C/C++ based libraries require to install additional libraries on an OS. Sometimes even yarn need extra permissions to add such libraries.
Follow this guide to install extra dependencies. Or use some other XML to JS/JSON parser library, like fast-xml-parser which is purely based JS regx.
I have solved this. If you notice this part of the command else (node "" rebuild ) what I think is happening is that it is incorrectly evaluating if not defined npm_config_node_gyp as false and trying to run nothing instead of node-gyp. What you need to do is define your npm_config_node_gyp variable. You can do this like so:
export npm_config_node_gyp=<PATH_TO_NODE_GYP_PACKAGE_FOLDER> remember that Windows will need double backslashes. For me, it looked like this:
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp
Edit:
There is another step after my fix. When executing my code, the expat bindings were missing. To fix it, add the bin folder and node-gyp executable to the npm_config_node_gyp variable and run node-gyp rebuild in the node_modules\node-expat folder. e.g.
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp\\bin\\node-gyp.js
cd node_modules\node-expat
node-gyp rebuild
Related
I'm trying to do a npm install for a cloned project that uses nodejs and node-gyp. Experienced a lot of version mismatch issues (especially with Visual Studio) and got to a point where node-gyp rebuild fails on rebuild.
Installed Python 2.7, uninstalled VS2013 and installed VS2015 Community edition with Visual C++ 2015. Changed the environment variable GYP_MSVS_VERSION to 2015 using SET GYP_MSVS_VERSION=2015, did npm config set msvs_version 2015 --global, ran npm install -g --msvs_version=2015 and got the following errors. Nothing I did moved the process further at this point and have been trying for 5+ hours!
I'm using Cmder (running as administrator), npm v3.6.0, node v5.7.0 and node-gyp v3.3.1 (running node-gyp -v results in v3.3.1).
I'm on Windows 10 x64.
Anyone has any idea what's causing these errors?
..\src\WebWorkerThreads.cc(231): error C2660: 'v8::Isolate::New': function does not take 0 arguments [C:\Users \ramtin\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads\build\WebWorkerThr eads.vcxproj]
..\src\WebWorkerThreads.cc(540): warning C4996: 'node::FatalException': was declared deprecated [C:\Users\ramt in\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads\build\WebWorkerThreads. vcxproj]
C:\Users\ramtin\.node-gyp\5.7.0\include\node\node.h(282): note: see declaration of 'node::FatalException'
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ramtin\AppData\Roaming\npm\node_modules\troop-node-enforcer\node_modules\webworker-threads
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
C:\Users\ramtin\AppData\Roaming\npm
`-- (empty)
npm WARN optional Skipping failed optional dependency /troop-node-enforcer/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.8
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "--msvs_version=2015"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! webworker-threads#0.5.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads#0.5.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 webworker-threads 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 webworker-threads
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls webworker-threads
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ramtin\trooptraining\troop\troop-node-enforcer\npm-debug.log
npm ERR! code 1
The problem is that the version of troop-node-enforcer being installed is depending on an older version of the webworker-threads module which is outdated. The npm log shows it installing v0.5.7 whereas the newest version is v0.7.1 and has had many fixes since the older version.
I have tried to run
npm install asyncawait --save
On my project , and it first failed and i needed to install python , now its outputting this errors:
D:\Projects\Lounge\Lounge>npm install asyncawait --save
> fibers#1.0.7 install D:\Projects\Lounge\Lounge\node_modules\fibers
> node build.js || nodejs build.js
D:\Projects\Lounge\Lounge\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node rebuild --release )
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\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number.
[D:\Projects\Lounge\Lounge\node_modules\fibers\build\fibers.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [D:\Projects\Lounge\Lou
nge\node_modules\fibers\build\fibers.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:\Projects\Lounge\Lounge\node_modules\fibers
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
Lounge#0.0.0 D:\Projects\Lounge\Lounge
└── (empty)
npm WARN EPACKAGEJSON Lounge#0.0.0 No repository field.
npm WARN EPACKAGEJSON Lounge#0.0.0 No license field.
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "asyncawait" "--save"
npm ERR! node v4.1.0
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! fibers#1.0.7 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#1.0.7 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Projects\Lounge\Lounge\npm-debug.log
npm ERR! code 1
Im using visual studios 2015 , have c++ compilers (2010-2015 both 64 and 32 bit)
node 4.1.0.
I am running nearly the same stack and when I got the errors to that point, updating NPM using npm-windows-upgrade got everything worked out (just to note, the author is a Microsoft employee).
Basic usage from a PowerShell prompt:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
then
npm install -g npm-windows-upgrade
npm-windows-upgrade
Turns out i needed to install some optional c++ stuff for vs 2015 , which were not included , and it all worked after it.
Here's what it returns when I try install contextify:
npm install contextify
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
> contextify#0.1.14 install F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify
> node-gyp rebuild
F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp: F:\Program Files (x86)\nodejs\common.gypi not found (cwd: F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify) while reading includes of binding.gyp 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 (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:357:16)
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.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "contextify"
npm ERR! node v0.12.7
npm ERR! npm v3.3.1
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.14 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! F:\_vms\HomesteadCode\_live\misc\web-react\npm-debug.log
UPDATE:
Got it installed... perhaps the hard way.
Installed Visual Studio 2013 (removed 2015)
Made sure I have latest nodejs
Cleaned up environment paths. (Checkout Rapidee)
Add a system variable: (mine: set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120)
From my global node_modules (for me F:\Program Files\nodejs\node_modules\npm\node_modules) I cloned repo git clone git#github.com:brianmcd/contextify.git. CD into then rm -rf .git.
I had to next npm i nan
node-gyp rebuild
It installed without any more complaints!!!!
I hope that someone comes up with a better solution than this!!!
This is problem with python on windows ( https://github.com/nodejs/node-gyp/issues/629 )
There is probably not much you can do about this. You can try some workarounds, that they suggest in comments, but I do not know how much it'll help you.
Look at this link:
common.gypi not found error in node.js
Seems to be a common issue these days.
You can check https://github.com/TooTallNate/node-gyp/issues/313 and
https://github.com/TooTallNate/node-gyp/issues/376 to see if any of
these solutions solve your issue.
Particularly, you can:
Remove old dir ~/.node_gyp and run npm install
Copy an older version (ex: ~/.node-gyp/0.10.11/) to the complying path.
Copy the latest version to the complying path.
Chime in this thread to get help.
PS:
When I tried installing on Windows, I get a completely different error:
d:\temp>npm install -g contextify
> contextify#0.1.14 install C:\Users\paulsm\AppData\Roaming\npm\node_module\contextify
> node-gyp rebuild
C:\Users\paulsm\AppData\Roaming\npm\node_modules\contextify>node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (D:\Program Files\nodejs\node_module\npm\node_modules\node-gyp\lib\configure.js:103:14)
<= NOTE: This is *not* your problem
When I ran sudo npm install -g contextify on a Linux box ... "everything worked".
Again - please review the links above, and see if they help.
When I attempt to install the zerorpc library using npm as follows:
npm install zerorpc
I get the following error:
C:\Users\Jeff\AppData\Roaming\npm\node_modules\zerorpc\node_modules\msgpack>node "C:\Program Files (x86)\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.
object.cpp
objectc.c
unpack.c
vrefbuffer.c
zone.c
version.c
libmsgpack.vcxproj -> C:\Users\Jeff\AppData\Roaming\npm\node_modules\zerorpc\node_modules\msgpack\build\Release\\
libmsgpack.lib
msgpack.cc
..\src\msgpack.cc(181): error C2466: cannot allocate an array of constant size 0 [C:\Users\Jeff\AppData\Roaming\npm
\node_modules\zerorpc\node_modules\msgpack\build\msgpackBinding.vcxproj]
..\src\msgpack.cc(181): error C2440: 'initializing' : cannot convert from 'int' to 'v8::Handle<v8::Value>' [C:\User
s\Jeff\AppData\Roaming\npm\node_modules\zerorpc\node_modules\msgpack\build\msgpackBinding.vcxproj]
Constructor for class 'v8::Handle<v8::Value>' is declared 'explicit'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\
build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.j
s" "rebuild"
gyp ERR! cwd C:\Users\Jeff\AppData\Roaming\npm\node_modules\zerorpc\node_modules\msgpack
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
And at the end of the installation process, I get the following errors:
npm ERR! msgpack#0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msgpack#0.1.8 install script.
npm ERR! This is most likely a problem with the msgpack 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 msgpack
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\
bin\\npm-cli.js" "install" "-g" "zerorpc"
npm ERR! cwd C:\node\pythontest
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\node\pythontest\npm-debug.log
npm ERR! not ok code 0
I'm running a clean install of Node.js on Windows 7 (x64).
Has anyone encountered this error before, and if so, how should I go about fixing it?
Thanks!
Edit:
When I install msgpack separately as follows:
npm install msgpack
It installs successfully:
C:\node\pythontest\node_modules\msgpack>node "C:\Program Files (x86)\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.
gcc_atomic.cpp
object.cpp
objectc.c
unpack.c
vrefbuffer.c
zone.c
version.c
libmsgpack.vcxproj -> C:\node\pythontest\node_modules\msgpack\build\Release\\libmsgpack.lib
msgpack.cc
C:\Users\Jeff\.node-gyp\0.10.31\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Pe
rsistent<v8::Object> v8::Persistent<v8::Object>::New(v8::Handle<v8::Object>)' [C:\node\pythontest\node_modules\msgp
ack\build\msgpackBinding.vcxproj]
C:\Users\Jeff\.node-gyp\0.10.31\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Pe
rsistent<v8::FunctionTemplate> v8::Persistent<v8::FunctionTemplate>::New(v8::Handle<v8::FunctionTemplate>)' [C:\nod
e\pythontest\node_modules\msgpack\build\msgpackBinding.vcxproj]
Creating library C:\node\pythontest\node_modules\msgpack\build\Release\msgpackBinding.lib and object C:\node\p
ythontest\node_modules\msgpack\build\Release\msgpackBinding.exp
Generating code
c:\node\pythontest\node_modules\msgpack\src\msgpack.cc(360): warning C4715: 'unpack' : not all control paths return
a value [C:\node\pythontest\node_modules\msgpack\build\msgpackBinding.vcxproj]
Finished generating code
msgpackBinding.vcxproj -> C:\node\pythontest\node_modules\msgpack\build\Release\\msgpackBinding.node
msgpack#0.2.4 node_modules\msgpack
└── nan#1.0.0
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