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.
Related
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
Sorry, I'm a newbie of nodejs. I'd like to try the package win32ole in nodejs under Windows7, but when I run the installation command npm install win32ole in a command prompt window opened as administrator, many errors pop up.
My configuration is:
Windows 7 64 bit (version 6.1.7601)
Microsoft Visual Studio Express 2015 for Windows Desktop - ENU (imho having to install 20GB of software to try to make node-gyp work is like a certification of failure for a certain IT model)
Microsoft .NET Framework 4.6
both Python 2.7.9 and 3.4.3 installed, but I made python command point to 2.7.9
nodejs version 4.2.1
npm version 2.14.7
node-gyp 3.0.3
PYTHON environment variable set to C:\Python27\python.exe
told to node-gyp where to find Python with command node-gyp --python C:\Python27\
told to npm where to find Python with command npm config set python C:\Python27\python.exe
Here's the console output:
C:\Windows\system32
>npm install win32ole
Impossibile trovare il percorso specificato.
npm WARN engine win32ole#0.1.3: wanted: {"node":">= 0.8.18 && < 0.9.0"} (current: {"node":"4.2.1","npm":"2.14.7"})
\
> ref#1.2.0 install C:\Windows\system32\node_modules\win32ole\node_modules\ref
> node-gyp rebuild
C:\Windows\system32\node_modules\win32ole\node_modules\ref
>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 ) else (node rebuild )
Impossibile trovare il percorso specificato.
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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16)
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.1.7601
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:\Windows\system32\node_modules\win32ole\node_modules\ref
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
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" "win32ole"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! ref#1.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref#1.2.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ref 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 ref
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log
Any clue on what I'm doing wrong?
FOLLOW UP
I guess there is nothing I'm doing wrong, the package node-gyp under Windows, as pointed out in a comment, has some issues: https://github.com/nodejs/node-gyp/issues/629
It's not possible with up to date node.js versions.
Use node winax
First of all you have a warning due to the node version
npm WARN engine win32ole#0.1.3: wanted: {"node":">= 0.8.18 && < 0.9.0"} (current: {"node":"4.2.1","npm":"2.14.7"})
It should be lower than 0.9.0
Have you installed node-gyp? I'm seeing a lot of error complaining it.
If not you can install it with this command
npm install -g node-gyp
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.
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.
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