Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-gyp with Windows 8 and Visual Studio 2012 #168

Closed
KevinBurton opened this issue Nov 30, 2012 · 65 comments
Closed

node-gyp with Windows 8 and Visual Studio 2012 #168

KevinBurton opened this issue Nov 30, 2012 · 65 comments
Labels

Comments

@KevinBurton
Copy link

Is there a way that i can configure or rebuild node-gyp to use VS 2012 and the associated SDK? This is the only tool that I have that uses the two year old VS 2010 so to install this suite, its patches, the SDK that is for this compiler, and the patches for the SDK has become troublesome. Right now I am on Windows 8 with VS 2012 and I cannot install the 7.1 SDK because it says it will not install a file that already exists. All in all this is alot of headache to install all of these tools just for node-gyp. Any ideas?

@TooTallNate
Copy link
Contributor

What version of node-gyp are you using? Visual Studio 2012 on Windows 8 works for me using the latest version of node-gyp.

@KevinBurton
Copy link
Author

I am using 0.8.1

node-gyp -v -> v0.8.1

I am getting the error:

C:\Users\Kevin>npm install msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

msnodesql@0.2.0 install C:\Users\Kevin\node_modules\msnodesql
node-gyp rebuild

C:\Users\Kevin\node_modules\msnodesql>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 'sqlserver.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you are trying
to build a project without a solution file, and have specified a non-default P
latform that doesn't exist for this project. [C:\Users\Kevin\node_modules\msnod
esql\build\sqlserver.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:236:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
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\Kevin\node_modules\msnodesql
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! msnodesql@0.2.0 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.0 install script.
npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
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" "msnodesql"
npm ERR! cwd C:\Users\Kevin
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Kevin\npm-debug.log
npm ERR! not ok code 0

@KevinBurton
Copy link
Author

Do you have VS 2010 installed with VS 2012?

@Tadimsky
Copy link

Tadimsky commented Dec 1, 2012

I'm having the same issue and I have both 2012 and 2010 installed. Anyway to get around this issue?

@chrisco512
Copy link

I'm also having this issue. Same config.

@andwaal
Copy link

andwaal commented Dec 4, 2012

Same issue here when trying to install msnodesql ( @jguerin ) .
Windows 8 and Visual studio 2012. Node.js x64

C:\Users\Andreas>npm install msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

msnodesql@0.2.0 install C:\Users\Andreas\node_modules\msnodesql
node-gyp rebuild

C:\Users\Andreas\node_modules\msnodesql>node "C:\Program Files\nodejs\node_modul
es\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
Traceback (most recent call last):
File "C:\Users\Andreas.node-gyp\0.8.14\tools\gyp\gyp", line 15, in
import gyp
File "C:\Users\Andreas.node-gyp\0.8.14\tools\gyp\pylib\gyp__init__.py", line
8, in
import gyp.input
File "C:\Users\Andreas.node-gyp\0.8.14\tools\gyp\pylib\gyp\input.py", line 18
, in
import shlex
File "C:\Python27\lib\shlex.py", line 12, in
from collections import deque
File "C:\Python27\lib\collections__init__.py", line 369
exec(class_definition, namespace)
SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contain
s a nested function with free variables
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_module
s\npm\node_modules\node-gyp\lib\configure.js:350:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
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"

@jguerin
Copy link

jguerin commented Dec 4, 2012

Are you launching this from the Visual Studio Command Prompt? I just tried on Windows 8 using Visual Studio 2012 Express for Windows Desktop compiler (without the Windows 8 SDK installed), and it worked fine:

C:\Users\jguerin\Desktop>npm install msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

> msnodesql@0.2.0 install C:\Users\jguerin\Desktop\node_modules\msnodesql
> node-gyp rebuild


C:\Users\jguerin\Desktop\node_modules\msnodesql>node "C:\Program Files (x86)\nod
ejs\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.
  stdafx.cpp
  Connection.cpp
  Column.cpp
  OdbcError.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
..\src\Column.cpp(162): warning C4244: '=' : conversion from 'const int64_t' to
 'SQLUSMALLINT', possible loss of data [C:\Users\jguerin\Desktop\node_modules\m
snodesql\build\sqlserver.vcxproj]
..\src\Column.cpp(163): warning C4244: '=' : conversion from 'const int64_t' to
 'SQLUSMALLINT', possible loss of data [C:\Users\jguerin\Desktop\node_modules\m
snodesql\build\sqlserver.vcxproj]
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
  Utility.cpp
  ResultSet.cpp
  OdbcOperation.cpp
  OdbcConnection.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.
vcxproj]
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
c:\users\jguerin\desktop\node_modules\msnodesql\src\stdafx.h(42): warning C4005
: 'interface' : macro redefinition [C:\Users\jguerin\Desktop\node_modules\msnod
esql\build\sqlserver.vcxproj]
          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
  (199) : see previous definition of 'interface'
..\src\OdbcOperation.cpp(211): warning C4101: 'tm' : unreferenced local variabl
e [C:\Users\jguerin\Desktop\node_modules\msnodesql\build\sqlserver.vcxproj]
     Creating library C:\Users\jguerin\Desktop\node_modules\msnodesql\build\Rel
  ease\sqlserver.lib and object C:\Users\jguerin\Desktop\node_modules\msnodesql
  \build\Release\sqlserver.exp
  Generating code
  Finished generating code
  sqlserver.vcxproj -> C:\Users\jguerin\Desktop\node_modules\msnodesql\build\Re
  lease\\sqlserver.node
msnodesql@0.2.0 node_modules\msnodesql

@KevinBurton
Copy link
Author

That was the initial question. I can get it to work if I install VS 2010 (since it is 64-bit I have to install the SDK) and the patch for VS 2010 and the VS 2010 SDK (7.1) and the patch for the SDK. But all of that takes over an hour and all of this is onlly installed for msnodesql. Since the other memers of my team have long ago moved on to VS 2012 to ask everyone to install all of this just for msnodesq is not practical. Since node-gyp runs OK on Linux I was hoping that there was some way to configure node-gyp to use VS 2012 and its associated SDK rather than having a dependency on VS 2010. Is that possible?

@TooTallNate
Copy link
Contributor

I was hoping that there was some way to configure node-gyp to use VS 2012 and its associated SDK rather than having a dependency on VS 2010. Is that possible?

Visual Studio 2012 on Windows 8 works for me using the latest version of node-gyp.

@KevinBurton
Copy link
Author

I install node-gyp so I know I have the latest:
C:\Users\kevinb>npm install node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 200 https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/node-gyp/-/node-gyp-0.8.1.tgz
npm http 200 https://registry.npmjs.org/node-gyp/-/node-gyp-0.8.1.tgz
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/request
npm http 200 https://registry.npmjs.org/nopt
npm http 200 https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/npmlog
npm http 200 https://registry.npmjs.org/osenv
npm http 200 https://registry.npmjs.org/glob
npm http 200 https://registry.npmjs.org/fstream
npm http 200 https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/semver
npm http 200 https://registry.npmjs.org/minimatch
npm http 200 https://registry.npmjs.org/tar
npm http 200 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/request
npm http 200 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz
npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm http 200 https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz
npm http GET https://registry.npmjs.org/npmlog/-/npmlog-0.0.2.tgz
npm http GET https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
npm http GET https://registry.npmjs.org/tar/-/tar-0.1.14.tgz
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.4.tgz
npm http GET https://registry.npmjs.org/glob/-/glob-3.1.14.tgz
npm http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz
npm http GET https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http GET https://registry.npmjs.org/fstream/-/fstream-0.1.19.tgz
npm http GET https://registry.npmjs.org/semver/-/semver-1.1.1.tgz
npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.0.2.tgz
npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm http 200 https://registry.npmjs.org/glob/-/glob-3.1.14.tgz
npm http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz
npm http 200 https://registry.npmjs.org/which/-/which-1.0.5.tgz
npm http 200 https://registry.npmjs.org/npmlog/-/npmlog-0.0.2.tgz
npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.14.tgz
npm http 200 https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz
npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.19.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.1.1.tgz
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.0.2.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.4.tgz
npm http GET https://registry.npmjs.org/ansi
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/ansi
npm http 200 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/ansi/-/ansi-0.1.2.tgz
npm http GET https://registry.npmjs.org/abbrev/-/abbrev-1.0.3.tgz
npm http 200 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http 200 https://registry.npmjs.org/block-stream
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz
npm http 200 https://registry.npmjs.org/sigmund
npm http 200 https://registry.npmjs.org/ansi/-/ansi-0.1.2.tgz
npm http GET https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/abbrev/-/abbrev-1.0.3.tgz
npm http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache
npm http 200 https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz
npm http GET https://registry.npmjs.org/lru-cache/-/lru-cache-2.0.4.tgz
npm http 200 https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 https://registry.npmjs.org/lru-cache/-/lru-cache-2.0.4.tgz
npm WARN prefer global node-gyp@0.8.1 should be installed with -g
node-gyp@0.8.1 node_modules\node-gyp
├── osenv@0.0.3
├── graceful-fs@1.1.14
├── which@1.0.5
├── rimraf@2.0.2
├── semver@1.1.1
├── mkdirp@0.3.4
├── request@2.9.203
├── fstream@0.1.19 (inherits@1.0.0)
├── glob@3.1.14 (inherits@1.0.0)
├── nopt@2.0.0 (abbrev@1.0.3)
├── npmlog@0.0.2 (ansi@0.1.2)
├── tar@0.1.14 (inherits@1.0.0, block-stream@0.0.6)
└── minimatch@0.2.9 (sigmund@1.0.0, lru-cache@2.0.4)

But when I install msnodesql I see the VS 2010 dependency:

C:\Users\kevinb>npm install msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

msnodesql@0.2.0 install C:\Users\kevinb\node_modules\msnodesql
node-gyp rebuild

C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
s\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\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+

  • Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
    0 build tools. [C:\Users\kevinb\node_modules\msnodesql\build\sqlserver.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:236:23)
    gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
    gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
    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\kevinb\node_modules\msnodesql
    gyp ERR! node -v v0.8.15
    gyp ERR! node-gyp -v v0.7.1
    gyp ERR! not ok
    npm ERR! msnodesql@0.2.0 install: node-gyp rebuild
    npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
    npm ERR!
    npm ERR! Failed at the msnodesql@0.2.0 install script.
    npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
    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" "msnodesql"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link
Contributor

@KevinBurton You're most likely not updating npm's internal copy of node-gyp: https://github.com/TooTallNate/node-gyp/wiki/Updating-npm's-bundled-node-gyp

@KevinBurton
Copy link
Author

I tried this:

C:\Program Files\nodejs\node_modules\npm>npm install node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 304 https://registry.npmjs.org/node-gyp
npm WARN prefer global node-gyp@0.7.3 should be installed with -g
node-gyp@0.7.3 node_modules\node-gyp

C:\Program Files\nodejs\node_modules\npm>npm install -g node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 304 https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/npmlog
npm http 304 https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/osenv
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/ansi
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/ansi
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/inherits
C:\Users\kevinb\AppData\Roaming\npm\node-gyp -> C:\Users\kevinb\AppData\Roaming
npm\node_modules\node-gyp\bin\node-gyp.js
node-gyp@0.8.1 C:\Users\kevinb\AppData\Roaming\npm\node_modules\node-gyp
├── graceful-fs@1.1.14
├── which@1.0.5
├── osenv@0.0.3
├── rimraf@2.0.2
├── semver@1.1.1
├── mkdirp@0.3.4
├── request@2.9.203
├── npmlog@0.0.2 (ansi@0.1.2)
├── fstream@0.1.19 (inherits@1.0.0)
├── nopt@2.0.0 (abbrev@1.0.3)
├── glob@3.1.14 (inherits@1.0.0)
├── minimatch@0.2.9 (lru-cache@2.0.4, sigmund@1.0.0)
└── tar@0.1.14 (inherits@1.0.0, block-stream@0.0.6)

Notice the prompt that show the directory that I am executing from.

But I still get the error that indicates a dependency:

C:\Users\kevinb>npm install msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

msnodesql@0.2.0 install C:\Users\kevinb\node_modules\msnodesql
node-gyp rebuild

C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
s\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\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+

  • Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
    0 build tools. [C:\Users\kevinb\node_modules\msnodesql\build\sqlserver.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:232:23)
    gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
    gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
    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\kevinb\node_modules\msnodesql
    gyp ERR! node -v v0.8.15
    gyp ERR! node-gyp -v v0.7.3
    gyp ERR! not ok
    npm ERR! msnodesql@0.2.0 install: node-gyp rebuild
    npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
    npm ERR!
    npm ERR! Failed at the msnodesql@0.2.0 install script.
    npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
    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" "msnodesql"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link
Contributor

Oh, it's installing the version of node-gyp specified in npm's package.json file (0.7.3 in this case). Instead do this as the final step:

$ npm install node-gyp@latest

@KevinBurton
Copy link
Author

Thank you for the further suggestions but unfortunately I still get the same error when I install msnodesql.

@KevinBurton
Copy link
Author

Is it possible that it is still using the "internal" version? Looking at the console I see:

C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
s\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild

This seems to be going after node-gyp-bin. I only went to C:\Program Files\nodejs\node_module\npm and then did:

npm install node-gyp@latest

@TooTallNate
Copy link
Contributor

@KevinBurton Try using the --msvs_version switch like described here: #172 (comment)

@KevinBurton
Copy link
Author

I issued 'npm install msnodesql --msvs_version=auto' with the same error:

C:\Users\kevinb>npm install msnodesql --msvs_version=auto
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

msnodesql@0.2.0 install C:\Users\kevinb\node_modules\msnodesql
node-gyp rebuild

C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
s\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\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+

  • Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
    0 build tools. [C:\Users\kevinb\node_modules\msnodesql\build\sqlserver.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:232:23)
    gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
    gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
    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\kevinb\node_modules\msnodesql
    gyp ERR! node -v v0.8.15
    gyp ERR! node-gyp -v v0.8.1
    gyp ERR! not ok
    npm ERR! msnodesql@0.2.0 install: node-gyp rebuild
    npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
    npm ERR!
    npm ERR! Failed at the msnodesql@0.2.0 install script.
    npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
    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" "msnodesql" "--msvs_version=a
uto"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link
Contributor

My bad, try --msvs_version=2012.

@KevinBurton
Copy link
Author

Better now it is not complaining about VS 2010 but the build fails:

C:\Users\kevinb>npm install msnodesql --msvs_version=2012
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:232:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
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\kevinb\node_modules\msnodesql
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.8.1
gyp ERR! not ok
npm ERR! msnodesql@0.2.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.0 install script.
npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
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" "msnodesql" "--msvs_version=2
012"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

I have removed alot of the warnings and compile errors but thie gist is that the build fails to compile. This is probably a issue that needs to go to the msnodesql package maintainers. But, before you go is there any way that I can make the --msvs_version "standard".? In other words default to using VS 2012?

@TooTallNate
Copy link
Contributor

Well show me the full output with --verbose and maybe I'll have a better idea of what's going on.

@KevinBurton
Copy link
Author

The compiler errors seem to be too long for github.com. When I paste them in my page goes down. Here is the rest of the output:

C:\Users\kevinb>npm install msnodesql --msvs_version=2012 >out.txt
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:232:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
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\kevinb\node_modules\msnodesql
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.8.1
gyp ERR! not ok
npm ERR! msnodesql@0.2.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.0 install script.
npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
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" "msnodesql" "--msvs_version=2
012"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

C:\Users\kevinb>notepad out.txt

C:\Users\kevinb>npm install msnodesql --msvs_version=2012 --verbose >out.txt
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   'msnodesql',
npm verb cli   '--msvs_version=2012',
npm verb cli   '--verbose' ]
npm info using npm@1.1.66
npm info using node@v0.8.15
npm verb node symlink C:\Program Files\nodejs\\node.exe
npm verb read json C:\Users\kevinb\package.json
npm verb read json C:\Users\kevinb\node_modules\azure\package.json
npm verb read json C:\Users\kevinb\node_modules\express\package.json
npm verb read json C:\Users\kevinb\node_modules\mongodb\package.json
npm verb read json C:\Users\kevinb\node_modules\node-gyp\package.json
npm verb read json C:\Users\kevinb\node_modules\redis\package.json
npm verb read json C:\Users\kevinb\package.json
npm verb cache add [ 'msnodesql', null ]
npm verb parsed url { pathname: 'msnodesql', path: 'msnodesql', href: 'msnodesql
' }
npm verb lock msnodesql C:\Users\kevinb\AppData\Roaming\npm-cache\36f1ebb8-msnod
esql.lock
npm verb addNamed [ 'msnodesql', '' ]
npm verb addNamed [ null, '' ]
npm verb lock msnodesql@ C:\Users\kevinb\AppData\Roaming\npm-cache\0cd57691-msno
desql.lock
npm verb url raw msnodesql
npm verb url resolving [ 'https://registry.npmjs.org/', './msnodesql' ]
npm verb url resolved https://registry.npmjs.org/msnodesql
npm info trying registry request attempt 1 at 14:42:29
npm verb etag "6D9AK0JXTLR9AAC0C65AH5699"
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql
npm verb etag msnodesql from cache
npm verb addNamed [ 'msnodesql', '0.2.0' ]
npm verb addNamed [ '0.2.0', '0.2.0' ]
npm verb lock msnodesql@0.2.0 C:\Users\kevinb\AppData\Roaming\npm-cache\5c09b1cc
-msnodesql-0-2-0.lock
npm verb read json C:\Users\kevinb\AppData\Roaming\npm-cache\msnodesql\0.2.0\pac
kage\package.json
npm info install msnodesql@0.2.0 into C:\Users\kevinb
npm info installOne msnodesql@0.2.0
npm verb from cache C:\Users\kevinb\AppData\Roaming\npm-cache\msnodesql\0.2.0\pa
ckage\package.json
npm info C:\Users\kevinb\node_modules\msnodesql unbuild
npm verb read json C:\Users\kevinb\node_modules\msnodesql\package.json
npm verb tar unpack C:\Users\kevinb\AppData\Roaming\npm-cache\msnodesql\0.2.0\pa
ckage.tgz
npm verb lock C:\Users\kevinb\node_modules\msnodesql C:\Users\kevinb\AppData\Roa
ming\npm-cache\94f2493e-rs-kevinb-node-modules-msnodesql.lock
npm verb read json C:\Users\kevinb\node_modules\msnodesql\package.json
npm info preinstall msnodesql@0.2.0
npm verb from cache C:\Users\kevinb\node_modules\msnodesql\package.json
npm verb readDependencies using package.json deps
npm verb from cache C:\Users\kevinb\node_modules\msnodesql\package.json
npm verb readDependencies using package.json deps
npm verb about to build C:\Users\kevinb\node_modules\msnodesql
npm info build C:\Users\kevinb\node_modules\msnodesql
npm verb from cache C:\Users\kevinb\node_modules\msnodesql\package.json
npm verb linkStuff [ false, false, false, 'C:\\Users\\kevinb\\node_modules' ]
npm info linkStuff msnodesql@0.2.0
npm verb linkBins msnodesql@0.2.0
npm verb linkMans msnodesql@0.2.0
npm verb rebuildBundles msnodesql@0.2.0
npm info install msnodesql@0.2.0
npm verb unsafe-perm in lifecycle true
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node
-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild' ]
gyp info using node-gyp@0.8.1
gyp info using node@0.8.15 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed for `%s` Error: not found: python
gyp verb `which` failed for `%s`     at F (C:\Program Files\nodejs\node_modules\
npm\node_modules\which\which.js:43:28)
gyp verb `which` failed for `%s`     at E (C:\Program Files\nodejs\node_modules\
npm\node_modules\which\which.js:46:29)
gyp verb `which` failed for `%s`     at C:\Program Files\nodejs\node_modules\npm
\node_modules\which\which.js:57:16
gyp verb `which` failed for `%s`     at Object.oncomplete (fs.js:297:15)
gyp verb `which` failed for `%s`  python [Error: not found: python]
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version `C:\Python27\python.exe -c "import platform; print
 platform.python_version();"` returned: "2.7.3\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: v0.8.15
gyp verb command install [ 'v0.8.15' ]
gyp verb install input version string "v0.8.15"
gyp verb installing legacy version? false
gyp verb install installing version: 0.8.15
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 0.8.15
gyp verb build dir attempting to create "build" dir: C:\Users\kevinb\node_module
s\msnodesql\build
gyp verb build dir "build" dir needed to be created? C:\Users\kevinb\node_module
s\msnodesql\build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\kevinb\node_modules
\msnodesql\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\kevinb\node_modules\msnode
sql\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\kevinb\node_modules\msnode
sql\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_module
s\\node-gyp\\gyp\\gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2012',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\kevinb\\node_modules\\msnodesql\\build\\config
.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_module
s\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\kevinb\\.node-gyp\\0.8.15\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\kevinb\\.node-gyp\\0.8.15',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\kevinb\\node_modules\\msnode
sql',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\kevinb\\node_modules\\msnodesql\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\kevinb\.node-gyp\0.8.15
gyp verb found first Solution file build/binding.sln
gyp verb `which` succeeded for `msbuild` C:\Windows\Microsoft.NET\Framework\v4.0
.30319\msbuild.EXE
gyp verb "Release" dir needed to be created? null
gyp verb copying "node.lib" for x64 C:\Users\kevinb\.node-gyp\0.8.15\Release\nod
e.lib
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:232:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
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\kevinb\node_modules\msnodesql
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.8.1
gyp ERR! not ok
npm info msnodesql@0.2.0 Failed to exec install script
npm info C:\Users\kevinb\node_modules\msnodesql unbuild
npm verb from cache C:\Users\kevinb\node_modules\msnodesql\package.json
npm info preuninstall msnodesql@0.2.0
npm info uninstall msnodesql@0.2.0
npm verb true,C:\Users\kevinb\node_modules,C:\Users\kevinb\node_modules unbuild
msnodesql@0.2.0
npm info postuninstall msnodesql@0.2.0
npm ERR! msnodesql@0.2.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.0 install script.
npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
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" "msnodesql" "--msvs_version=2
012" "--verbose"
npm ERR! cwd C:\Users\kevinb
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\kevinb\npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link
Contributor

gyp verb check python checking for Python executable "python" in the PATH

Looks like you don't have python installed...

@TooTallNate
Copy link
Contributor

Oh I take that back, you do. Is this the entire output?

@TooTallNate
Copy link
Contributor

Specifically it doesn't look like any output from msbuild.exe is being pasted here.

@andwaal
Copy link

andwaal commented Dec 5, 2012

Got a output very similar to @KevinBurton . Heres the entire output. Hope this can be of any help.

C:\Program Files\nodejs\node_modules>npm install msnodesql --msvs_version=2012 -
-verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   'msnodesql',
npm verb cli   '--msvs_version=2012',
npm verb cli   '--verbose' ]
npm info using npm@1.1.65
npm info using node@v0.8.14
npm verb node symlink C:\Program Files\nodejs\\node.exe
npm verb read json C:\Program Files\nodejs\package.json
npm verb read json C:\Program Files\nodejs\node_modules\node-gyp\package.json
npm verb read json C:\Program Files\nodejs\node_modules\npm\package.json
npm verb read json C:\Program Files\nodejs\node_modules\npm-debug.log\package.js
on
npm verb read json C:\Program Files\nodejs\package.json
npm verb cache add [ 'msnodesql', null ]
npm verb parsed url { pathname: 'msnodesql', path: 'msnodesql', href: 'msnodesql
' }
npm verb lock msnodesql C:\Users\Andreas\AppData\Roaming\npm-cache\36f1ebb8-msno
desql.lock
npm verb addNamed [ 'msnodesql', '' ]
npm verb addNamed [ null, '' ]
npm verb lock msnodesql@ C:\Users\Andreas\AppData\Roaming\npm-cache\0cd57691-msn
odesql.lock
npm verb url raw msnodesql
npm verb url resolving [ 'https://registry.npmjs.org/', './msnodesql' ]
npm verb url resolved https://registry.npmjs.org/msnodesql
npm info trying registry request attempt 1 at 21:44:58
npm verb etag "6D9AK0JXTLR9AAC0C65AH5699"
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql
npm verb etag msnodesql from cache
npm verb addNamed [ 'msnodesql', '0.2.0' ]
npm verb addNamed [ '0.2.0', '0.2.0' ]
npm verb lock msnodesql@0.2.0 C:\Users\Andreas\AppData\Roaming\npm-cache\5c09b1c
c-msnodesql-0-2-0.lock
npm verb read json C:\Users\Andreas\AppData\Roaming\npm-cache\msnodesql\0.2.0\pa
ckage\package.json
npm info install msnodesql@0.2.0 into C:\Program Files\nodejs
npm info installOne msnodesql@0.2.0
npm verb from cache C:\Users\Andreas\AppData\Roaming\npm-cache\msnodesql\0.2.0\p
ackage\package.json
npm info C:\Program Files\nodejs\node_modules\msnodesql unbuild
npm verb read json C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm verb tar unpack C:\Users\Andreas\AppData\Roaming\npm-cache\msnodesql\0.2.0\p
ackage.tgz
npm verb lock C:\Program Files\nodejs\node_modules\msnodesql C:\Users\Andreas\Ap
pData\Roaming\npm-cache\be6fec5d-es-nodejs-node-modules-msnodesql.lock
npm verb read json C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm info preinstall msnodesql@0.2.0
npm verb from cache C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm verb readDependencies using package.json deps
npm verb from cache C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm verb readDependencies using package.json deps
npm verb about to build C:\Program Files\nodejs\node_modules\msnodesql
npm info build C:\Program Files\nodejs\node_modules\msnodesql
npm verb from cache C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm verb linkStuff [ false, false, false, 'C:\\Program Files\\nodejs\\node_modul
es' ]
npm info linkStuff msnodesql@0.2.0
npm verb linkBins msnodesql@0.2.0
npm verb linkMans msnodesql@0.2.0
npm verb rebuildBundles msnodesql@0.2.0
npm info install msnodesql@0.2.0
npm verb unsafe-perm in lifecycle true

> msnodesql@0.2.0 install C:\Program Files\nodejs\node_modules\msnodesql
> node-gyp rebuild


C:\Program Files\nodejs\node_modules\msnodesql>node "C:\Program Files\nodejs\nod
e_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" reb
uild
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node
-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild' ]
gyp info using node-gyp@0.7.1
gyp info using node@0.8.14 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed for `%s` Error: not found: python
gyp verb `which` failed for `%s`     at F (C:\Program Files\nodejs\node_modules\
npm\node_modules\which\which.js:43:28)
gyp verb `which` failed for `%s`     at E (C:\Program Files\nodejs\node_modules\
npm\node_modules\which\which.js:46:29)
gyp verb `which` failed for `%s`     at C:\Program Files\nodejs\node_modules\npm
\node_modules\which\which.js:57:16
gyp verb `which` failed for `%s`     at Object.oncomplete (fs.js:297:15)
gyp verb `which` failed for `%s`  python [Error: not found: python]
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version `C:\Python27\python.exe -c "import platform; print
 platform.python_version();"` returned: "2.7.3\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: v0.8.14
gyp verb command install [ 'v0.8.14' ]
gyp verb install input version string "v0.8.14"
gyp verb installing legacy version? false
gyp verb install installing version: 0.8.14
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 0.8.14
gyp verb build dir attempting to create "build" dir: C:\Program Files\nodejs\nod
e_modules\msnodesql\build
gyp verb build dir "build" dir needed to be created? C:\Program Files\nodejs\nod
e_modules\msnodesql\build
gyp verb config.gypi creating config file
gyp verb config.gypi writing out config file: C:\Program Files\nodejs\node_modul
es\msnodesql\build\config.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Users\\Andreas\\.node-gyp\\0.8.14\\tools\\gyp\\gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2012',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\msnodesql\\build
\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_module
s\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Andreas\\.node-gyp\\0.8.14\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Andreas\\.node-gyp\\0.8.14',
gyp info spawn args   '-Dmodule_root_dir=C:\\Program Files\\nodejs\\node_modules
\\msnodesql',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\msnodesql\\build
',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\gyp", line 15, in <module>
    import gyp
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\pylib\gyp\__init__.py", line
 8, in <module>
    import gyp.input
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\pylib\gyp\input.py", line 18
, in <module>
    import shlex
  File "C:\Python27\lib\shlex.py", line 12, in <module>
    from collections import deque
  File "C:\Python27\lib\collections\__init__.py", line 369
    exec(class_definition, namespace)
SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contain
s a nested function with free variables
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_module
s\npm\node_modules\node-gyp\lib\configure.js:350:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
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:\Program Files\nodejs\node_modules\msnodesql
gyp ERR! node -v v0.8.14
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm info msnodesql@0.2.0 Failed to exec install script
npm info C:\Program Files\nodejs\node_modules\msnodesql unbuild
npm verb from cache C:\Program Files\nodejs\node_modules\msnodesql\package.json
npm info preuninstall msnodesql@0.2.0
npm info uninstall msnodesql@0.2.0
npm verb true,C:\Program Files\nodejs\node_modules,C:\Program Files\nodejs\node_
modules unbuild msnodesql@0.2.0
npm info postuninstall msnodesql@0.2.0
npm ERR! msnodesql@0.2.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.0 install script.
npm ERR! This is most likely a problem with the msnodesql 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 msnodesql
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" "msnodesql" "--msvs_version=2
012" "--verbose"
npm ERR! cwd C:\Program Files\nodejs\node_modules
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! code ELIFECYCLE
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Program Files\nodejs\node_modules\npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link
Contributor

SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contains a nested function with free variables

Well I'm not entirely sure what that's all about. I'm starting to think it's a gyp bug...

@KevinBurton
Copy link
Author

The output from msbuild is all of the build errors (there are over 300 errors and some 30 warnings). If I try to paste those in the window then I consistently get an error "gethub not responding". So I gave up and gave you an abbreviated listing. If you feel it would be useful I could try sending it to an email account.

@KevinBurton
Copy link
Author

One more comment. I have a 64-bit version of Node.js but in looking at the output it seems that a 32-bit compiler is being used. Do you think that is an issue?

@jguerin
Copy link

jguerin commented Dec 7, 2012

Yes, yes I do.

Why is it necessary that you run 64-bit Node.js? Any chance you could try to compile using the 32-bit version just to ease the troubleshooting for this?

Cheers,

Jonathan

@KevinBurton
Copy link
Author

It is not necessary for me but I just thought it should be made know since when you click on the 'INSTALL' button at nodejs.org it installs the 64-bit version (if you are running a 64-bit OS, which is more and more common). So in doesn't look like msnodesql will install with a 64-bit version of node.js. Isn't that the question of this thread?

@mgiota
Copy link

mgiota commented Feb 23, 2013

I googled this error and there are some solutions. I haven't tried them, because first I want to understand what was the problem with the previous error? Something was going wrong with paths?

@msuarz
Copy link

msuarz commented Mar 10, 2013

I got Windows 8 x64 n' VS 2012 ... tried npm install all over the place and kept getting error
MSB3411: Could not load the Visual C++ component "VCBuild.exe"

Running from VS command prompt worked like a charm

ty

@mscdex
Copy link
Contributor

mscdex commented Mar 28, 2013

Can you all please try node-gyp v0.9.3?

@Meligy
Copy link

Meligy commented Jun 1, 2013

I'm having similar issues with different packages.

On Windows 8 x64 (and Node, v0.10.9 x64), npm install -g jsbin (for example) fails, and several other packages show error. Some fail completely and some pass (the error is usually in some dependent packages).

I have complete VS 2012 premium, no VS 2010, no Python.

I already updated the internal npm version of node-gyp (0.9.6 at the time). I also tried the --msvs_version=2012 switch, which takes away the VS 2010 error, but I get instead some V8 errors.

Example error without the switch:

C:\Users\Mohamed\Desktop\test>npm install jsbin
npm http GET https://registry.npmjs.org/jsbin
npm http 304 https://registry.npmjs.org/jsbin
npm http GET https://registry.npmjs.org/asyncjs/0.0.7
npm http GET https://registry.npmjs.org/sqlite3/2.1.7
npm http GET https://registry.npmjs.org/hogan.js/2.0.0
npm http GET https://registry.npmjs.org/nodemailer/0.3.20
npm http GET https://registry.npmjs.org/bcrypt/0.7.5
npm http GET https://registry.npmjs.org/commander/1.0.0
npm http GET https://registry.npmjs.org/less/1.3.0
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/mysql
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/stylus/0.28.2
npm http GET https://registry.npmjs.org/soak/0.3.0
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/lynx/0.0.11
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/flatten.js/0.1.0
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/nodemailer/0.3.20
npm http 304 https://registry.npmjs.org/sqlite3/2.1.7
npm http 304 https://registry.npmjs.org/bcrypt/0.7.5
npm http 304 https://registry.npmjs.org/asyncjs/0.0.7
npm http 304 https://registry.npmjs.org/hogan.js/2.0.0
npm http 304 https://registry.npmjs.org/commander/1.0.0
npm http 304 https://registry.npmjs.org/less/1.3.0
npm WARN package.json less@1.3.0 No repository field.
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm WARN package.json jade@0.26.3 No readme data.
npm http 304 https://registry.npmjs.org/mysql
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/soak/0.3.0
npm http 304 https://registry.npmjs.org/stylus/0.28.2
npm http 304 https://registry.npmjs.org/grunt-contrib-uglify
npm http 304 https://registry.npmjs.org/lynx/0.0.11
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint
npm http 304 https://registry.npmjs.org/flatten.js/0.1.0
npm http 304 https://registry.npmjs.org/grunt-contrib-concat
npm http 304 https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/jshint
npm http GET https://registry.npmjs.org/mersenne
npm http GET https://registry.npmjs.org/statsd-parser
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/hashish/0.0.4

> sqlite3@2.1.7 install C:\Users\Mohamed\Desktop\bin\node_modules\jsbin\node_mod
ules\sqlite3
> node-gyp rebuild


C:\Users\Mohamed\Desktop\bin\node_modules\jsbin\node_modules\sqlite3>node "C:\Pr
ogram Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gy
p\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\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+
+ Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
0 build tools. [C:\Users\Mohamed\Desktop\bin\node_modules\jsbin\node_modules\sq
lite3\build\deps\sqlite3\sqlite3.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.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\Mohamed\Desktop\bin\node_modules\jsbin\node_modules\sqlite
3
gyp ERR! node -v v0.10.9
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/jshint
npm WARN package.json jshint@0.9.1 No repository field.
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Users\Mohamed\Desktop\bi
n\node_modules\jsbin'
npm ERR! error rolling back  jsbin@3.2.17 { [Error: ENOTEMPTY, rmdir 'C:\Users\M
ohamed\Desktop\bin\node_modules\jsbin']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Users\\Mohamed\\Desktop\\bin\\node_modu
les\\jsbin' }
npm ERR! weird error 1
npm http GET https://registry.npmjs.org/cli/0.4.3
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/statsd-parser
npm http 304 https://registry.npmjs.org/connect/2.7.2
npm http 304 https://registry.npmjs.org/mersenne
npm http 304 https://registry.npmjs.org/bindings/1.0.0
npm WARN package.json mersenne@0.0.3 No repository field.
npm WARN package.json mersenne@0.0.3 No readme data.

> bcrypt@0.7.5 install C:\Users\Mohamed\Desktop\bin\node_modules\jsbin\node_modu
les\bcrypt
> node-gyp rebuild


C:\Users\Mohamed\Desktop\bin\node_modules\jsbin\node_modules\bcrypt>node "C:\Pro
gram Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp
\bin\node-gyp.js" rebuild
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm WARN package.json range-parser@0.0.4 No repository field.
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm WARN package.json fresh@0.1.0 No repository field.
gyp: binding.gyp not found (cwd: C:\Users\Mohamed\Desktop\bin\node_modules\jsbin
\node_modules\bcrypt) 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_module
s\npm\node_modules\node-gyp\lib\configure.js:415: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 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\Mohamed\Desktop\bin\node_modules\jsbin\node_modules\bcrypt

gyp ERR! node -v v0.10.9
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/send/0.1.0
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json methods@0.0.1 No readme data.
npm WARN package.json cookie-signature@0.0.1 No repository field.
npm WARN package.json send@0.1.0 No repository field.
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/mailcomposer
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm http 304 https://registry.npmjs.org/simplesmtp
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm WARN package.json uglify-js@2.2.5 No repository field.
npm WARN package.json uglify-js@2.2.5 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/zlib-browserify/0.0.1
npm http GET https://registry.npmjs.org/mimelib
npm http GET https://registry.npmjs.org/mime/1.2.9
npm http GET https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/xoauth2
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http 304 https://registry.npmjs.org/eventemitter2
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json eventemitter2@0.4.11 No repository field.
npm WARN package.json eventemitter2@0.4.11 'repositories' (plural) Not supported
.
npm WARN package.json Please pick one as the 'repository' field
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/hooker
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/hashish/0.0.4
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/cli/0.4.3
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm WARN package.json pause@0.0.1 No repository field.
npm WARN package.json bytes@0.1.0 No repository field.
npm WARN package.json formidable@1.0.11 No repository field.
npm http 304 https://registry.npmjs.org/zlib-browserify/0.0.1
npm http 304 https://registry.npmjs.org/mimelib
npm http 304 https://registry.npmjs.org/mime/1.2.9
npm http 304 https://registry.npmjs.org/xoauth2
npm http 304 https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/encoding
npm http GET https://registry.npmjs.org/addressparser
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/encoding
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/addressparser
npm WARN package.json addressparser@0.1.3 No repository field.
npm http GET https://registry.npmjs.org/iconv-lite/0.2.7
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/iconv-lite/0.2.7
npm http 304 https://registry.npmjs.org/underscore
npm ERR! not ok code 0

Example error with the switch:

C:\Users\Mohamed\Desktop\test> npm install jsbin --msvs_version=2012
npm http GET https://registry.npmjs.org/jsbin
npm http 304 https://registry.npmjs.org/jsbin
npm http GET https://registry.npmjs.org/hogan.js/2.0.0
npm http GET https://registry.npmjs.org/asyncjs/0.0.7
npm http GET https://registry.npmjs.org/bcrypt/0.7.5
npm http GET https://registry.npmjs.org/sqlite3/2.1.7
npm http GET https://registry.npmjs.org/mysql
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/stylus/0.28.2
npm http GET https://registry.npmjs.org/commander/1.0.0
npm http GET https://registry.npmjs.org/nodemailer/0.3.20
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/less/1.3.0
npm http GET https://registry.npmjs.org/flatten.js/0.1.0
npm http GET https://registry.npmjs.org/lynx/0.0.11
npm http GET https://registry.npmjs.org/soak/0.3.0
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/bcrypt/0.7.5
npm http 304 https://registry.npmjs.org/asyncjs/0.0.7
npm http 304 https://registry.npmjs.org/hogan.js/2.0.0
npm http 304 https://registry.npmjs.org/mysql
npm http 304 https://registry.npmjs.org/sqlite3/2.1.7
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint
npm http 304 https://registry.npmjs.org/stylus/0.28.2
npm http 304 https://registry.npmjs.org/commander/1.0.0
npm http 304 https://registry.npmjs.org/nodemailer/0.3.20
npm http 304 https://registry.npmjs.org/grunt-contrib-uglify
npm http 304 https://registry.npmjs.org/less/1.3.0
npm http 304 https://registry.npmjs.org/flatten.js/0.1.0
npm WARN package.json less@1.3.0 No repository field.
npm http 304 https://registry.npmjs.org/soak/0.3.0
npm http 304 https://registry.npmjs.org/lynx/0.0.11
npm http 304 https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/grunt-contrib-concat
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm WARN package.json jade@0.26.3 No readme data.
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/jshint
npm http GET https://registry.npmjs.org/mersenne
npm http GET https://registry.npmjs.org/statsd-parser
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/mailcomposer
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/hashish/0.0.4

> sqlite3@2.1.7 install C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3
> node-gyp rebuild


C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http 304 https://registry.npmjs.org/jshint
npm WARN package.json jshint@0.9.1 No repository field.
npm http 304 https://registry.npmjs.org/statsd-parser
npm http GET https://registry.npmjs.org/cli/0.4.3
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.5 install C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\bcrypt
> node-gyp rebuild

npm http 304 https://registry.npmjs.org/connect/2.7.2

C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\bcrypt>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm WARN package.json range-parser@0.0.4 No repository field.
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm WARN package.json fresh@0.1.0 No repository field.
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json methods@0.0.1 No readme data.
  sqlite3.c
npm http 304 https://registry.npmjs.org/send/0.1.0
npm WARN package.json send@0.1.0 No repository field.
npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1
npm WARN package.json cookie-signature@0.0.1 No repository field.
npm http 304 https://registry.npmjs.org/mersenne
npm WARN package.json mersenne@0.0.3 No repository field.
npm WARN package.json mersenne@0.0.3 No readme data.
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/mailcomposer
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/simplesmtp
npm http GET https://registry.npmjs.org/mime/1.2.6
npm WARN package.json uglify-js@2.2.5 No repository field.
npm WARN package.json uglify-js@2.2.5 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/zlib-browserify/0.0.1
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
npm http 304 https://registry.npmjs.org/coffee-script
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of data [C:\User s\Mohamed\Desktop\test\node_modules\jsbin\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
npm http 304 https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/xoauth2
npm http GET https://registry.npmjs.org/mime/1.2.9
npm http GET https://registry.npmjs.org/mimelib
npm http 304 https://registry.npmjs.org/eventemitter2
npm WARN package.json eventemitter2@0.4.11 No repository field.
npm WARN package.json eventemitter2@0.4.11 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/hooker
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/glob
  sqlite3.vcxproj -> C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\Release\\sqlite3.lib
npm http 304 https://registry.npmjs.org/nopt
  database.cc
  node_sqlite3.cc
  statement.cc
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/cli/0.4.3
npm http 304 https://registry.npmjs.org/hashish/0.0.4
npm http 304 https://registry.npmjs.org/minimatch
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc (..\src\bcrypt_node.cc) [C:\Users\Mohamed\Desktop\test\node_module s\jsbin\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/zlib-browserify/0.0.1
..\src\bcrypt_node.cc(38): fatal error C1083: Cannot open include file: 'openssl/rand.h': No such file or directory [C: \Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/rai
npm http GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/xoauth2
npm http 304 https://registry.npmjs.org/mime/1.2.9
npm http gyp304  https://registry.npmjs.org/mimelib
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.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\bcrypt
gyp ERR! node -v v0.10.9
gyp ERR! node-gyp -v v0.9.6
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\lodash'
npm ERR! error rolling back  jsbin@3.2.17 { [Error: ENOTEMPTY, rmdir 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\lodash']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Users\\Mohamed\\Desktop\\test\\node_modules\\jsbin\\node_modules\\grunt\\node_modules\\lodash' }
npm ERR! weird error 1
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc (..\src\database.cc) [C:\Users\Mohamed\Desktop\test\node_modules\j sbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\lodash\lodash.underscore.js'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc (..\src\node_sqlite3.cc) [C:\Users\Mohamed\Desktop\test\node_modul npmes\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
 ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR!C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): warning C4530: C++ exception handler used,
  but unwind semantics are not enabled. Specify /EHsc (..\src\statement.cc) [C:\Users\Mohamed\Desktop\test\node_modules\

npm -vjsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\lodash\lodash.underscore.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\lodash\lodash.underscore.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, chmod 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt-contrib-jshint\node_modules\jshint\node_modules\cli\examples\sort.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt-contrib-jshint\node_modules\jshint\node_modules\cli\examples\sort.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt-contrib-jshint\node_modules\jshint\node_modules\cli\examples\sort.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mimelib\README.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mimelib\README.md
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mimelib\README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, open 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\simplesmtp\node_modules\rai\cert\key.pem'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\simplesmtp\node_modules\rai\cert\key.pem
npm ERR! code ENOENT
npm ERR! errno 34
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/abbrev
npm ERR! Error: ENOENT, open 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\express\node_modules\send\node_modules\mime\types\node.types'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\express\node_modules\send\node_modules\mime\types\node.types
npm ERR! code ENOENT
npm ERR! errno 34
npm http 304 https://registry.npmjs.org/lru-cache
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mime\mime.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mime\mime.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mime\mime.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm WARN package.json formidable@1.0.11 No repository field.
npm WARN package.json bytes@0.1.0 No repository field.
npm WARN package.json pause@0.0.1 No repository field.
npm http 304 https://registry.npmjs.org/sigmund
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\glob\test\bash-results.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\glob\test\bash-results.json
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\glob\test\bash-results.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\js-yaml\lib\js-yaml\loader.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\js-yaml\lib\js-yaml\loader.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\js-yaml\lib\js-yaml\loader.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
..\src\database.cc(434): warning C4244: 'argument' : conversion from 'double' to 'int32_t', possible loss of data [C:\U sers\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(139): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\User s\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(278): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Use rs\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(287): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\User s\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(479): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of dat a [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(477): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of da ta [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(544): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\User s\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\underscore.string\test\underscore.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\underscore.string\test\underscore.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\underscore.string\test\underscore.js
..\src\statement.cc(755): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data [C:\ npmUsers\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
 ERR!..\src\statement.cc(761): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\User
 s\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/lru-cache
npm ERR! error rolling back Error: EPERM, rmdir 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\coffee-script\lib\coffee-script\nodes.js'
npm ERR! error rolling back  grunt@0.4.1 { [Error: EPERM, rmdir 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\coffee-script\lib\coffee-script\nodes.js']
npm ERR! error rolling back   errno: 50,
npm ERR! error rolling back   code: 'EPERM',
npm ERR! error rolling back   path: 'C:\\Users\\Mohamed\\Desktop\\test\\node_modules\\jsbin\\node_modules\\grunt\\node_modules\\coffee-script\\lib\\coffee-script\\nodes.js' }
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\minimatch\node_modules\lru-cache\lib\lru-cache.js'
npm ERR!c:\users\mohamed\desktop\test\node_modules\jsbin\node_modules\sqlite3\src\async.h(38): warning C4267: 'initializing' :
 If you need help, you may report this log at:
conversion from 'size_t' to 'unsigned int', possible loss of data (..\src\database.cc) [C:\Users\Mohamed\Desktop\test\n ode_modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
npm          c:\users\mohamed\desktop\test\node_modules\jsbin\node_modules\sqlite3\src\async.h(32) : while compiling cla
 s
   template member function 'void Async<Item,Parent>::listener(uv_async_t *,int)'
          with
ERR!          [
              Item=std::string,
              Parent=node_sqlite3::Database
     <http://github.com/isaacs/npm/issues>
          ]
          c:\users\mohamed\desktop\test\node_modules\jsbin\node_modules\sqlite3\src\async.h(29) : see reference to func
  tion template instantiation 'void Async<Item,Parent>::listener(uv_async_t *,int)' being compiled
npm          with
           [
              Item=std::string,
              Parent=node_sqlite3::Database
ERR!          ]
          ..\src\database.cc(370) : see reference to class template instantiation 'Async<Item,Parent>' being compiled
          with
 or email it to:
          [
              Item=std::string,
npm              Parent=node_sqlite3::Database
          ]
ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\minimatch\node_modules\lru-cache\lib\lru-cache.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\minimatch\node_modules\lru-cache\lib\lru-cache.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\coffee-script\lib\coffee-script\nodes.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\coffee-script\lib\coffee-script\nodes.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\coffee-script\lib\coffee-script\nodes.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
c:\users\mohamed\desktop\test\node_modules\jsbin\node_modules\sqlite3\src\statement.h(54): warning C4267: 'initializing ' : conversion from 'size_t' to 'int', possible loss of data (..\src\statement.cc) [C:\Users\Mohamed\Desktop\test\node_ modules\jsbin\node_modules\sqlite3\build\node_sqlite3.vcxproj]
          ..\src\statement.cc(801) : see reference to function template instantiation 'node_sqlite3::Values::Blob::Blob
  <const char*>(T,size_t,const void *)' being compiled
          with
          [
              T=const char *
          ]
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocnum(155): warning C4506: no definition for inline fu nction 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node _modules\sqlite3\build\node_sqlite3.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_sqlite3.cc)
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\findup-sync\node_modules\lodash\lodash.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\findup-sync\node_modules\lodash\lodash.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\findup-sync\node_modules\lodash\lodash.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\iconv-lite\encodings\table\big5.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install" "jsbin" "--msvs_version=2012"
npm ERR! cwd C:\Users\Mohamed\Desktop\test
npm ERR! node -v v0.10.9
npm ERR! npm -v 1.2.24
npm ERR! path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\iconv-lite\encodings\table\big5.js
npm ERR! fstream_path C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\grunt\node_modules\iconv-lite\encodings\table\big5.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/wordwrap
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(192): warning C4506: no definition for inline fun ction 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_ modules\sqlite3\build\node_sqlite3.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\statement.cc)
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(192): warning C4506: no definition for inline fun ction 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_ modules\sqlite3\build\node_sqlite3.vcxproj]
          with
          [
              T=v8::FunctionTemplate
          ] (..\src\statement.cc)
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(65): warning C4506: no definition for inline func tion 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_m odules\sqlite3\build\node_sqlite3.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\database.cc)
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(65): warning C4506: no definition for inline func tion 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_m odules\sqlite3\build\node_sqlite3.vcxproj]
          with
          [
              T=v8::FunctionTemplate
          ] (..\src\database.cc)
npm http GET https://registry.npmjs.org/amdefine
     Creating library C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\Release\node_sqlite3.
  lib and object C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\Release\node_sqlite3.exp
  Generating code
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/amdefine
  Finished generating code
  node_sqlite3.vcxproj -> C:\Users\Mohamed\Desktop\test\node_modules\jsbin\node_modules\sqlite3\build\Release\\node_sql
  ite3.node
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Mohamed\Desktop\test\npm-debug.log
npm ERR! not ok code 0

@pflannery
Copy link

@Meligy

I had a similar issue with node-gyp, I have visual studio 2012 pro edition. The reason this error occurs is because node-gyp only looks for the VC 2012 express editions. So currently if express isn't installed it fails on the msbuild task.

I've added a pull request which added checks for full visual studio 2012 (32&64bit).

Here is a useful tip for when you have multiple visual studio versions installed i.e vs2010 and vs2012.

Add the following environment variable (tells python what default version to use. i.e. 2010 or 2012 etc)

GYP_MSVS_VERSION=2012

If you ever want to override the global GYP_MSVS_VERSION env var then run node-gyp and npm like this

node-gyp configure --msvs_version=2010
or the npm example
npm install --msvs_version=2010

hope this helps

@dankohn
Copy link

dankohn commented Aug 9, 2013

@pflannery thank you, thank you, for showing npm install --msvs_version=2012 which was the magic incantation to get binary modules compiling on my developer's Windows 8 with Visual Studio 2012 box.

@migounette
Copy link

You have two possibilities if it does not work, I use a powershell in order to replace a basic shell and I add the VS2012 environment variables, otherwise you can start the visual studio cmd prompt and proceed normally.

@dtpz
Copy link

dtpz commented Aug 31, 2013

In case you're on Windows 8 x64 and you're having this problem:

  1. Uninstall all versions of visual C++ redistributables and previous versions of VS
  2. Install Visual Studio 2012 express http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-8
  3. Install Windows SDK for Windows 8: http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx

This worked for me.

I tried all other tutorials and 'fixes' I found on google previously, and none worked - they all mention other versions of Visual Studio and the SDK for windows 7. The above 3 steps is all you need.

@msywensky
Copy link

I was finally able to build with Win 8 x64 and VS 2012 Ultimate by setting the msvs_version=2012 and getting latest of node-sqlserver from github.

@JayBeavers
Copy link
Contributor

Much work has gone into fixing this, awaiting final integration of fixes in nodejs/node-v0.x-archive#6667.

@srfrnk
Copy link

srfrnk commented Mar 14, 2014

Try that - will set it globally:
npm config set msvs_version 2012 --global

@emilingerslev
Copy link

I have also experienced problems with node-gyp. I've been trying to install leveldown on Windows8 x64 with visual studio 2012.
But I don't think the issue is at all with the Visual Studio, but rather at problem with Python. I've been trying 2.7.3, 2.7.6, but without luck.
After a lot of work I went into the stack trace that is written for the syntax-error, that a few other people also experienced:

Traceback (most recent call last):
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\gyp", line 15, in <module>
    import gyp
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\pylib\gyp\__init__.py", line
 8, in <module>
    import gyp.input
  File "C:\Users\Andreas\.node-gyp\0.8.14\tools\gyp\pylib\gyp\input.py", line 18
, in <module>
    import shlex
  File "C:\Python27\lib\shlex.py", line 12, in <module>
    from collections import deque
  File "C:\Python27\lib\collections\__init__.py", line 369
    exec(class_definition, namespace)
SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contain
s a nested function with free variables

This error shows that an issue in collections__init__.py through shlex.py is blowing up. By removing the import statements directly in these gyp files

gyp/__init__.py
gyp/input.py

I could make a completed node-gyp rebuild:

C:\workspace\node-leveldown-master> node-gyp rebuild "--msvs_version=2012"
gyp info it worked if it ends with ok
gyp info using node-gyp@0.9.3
gyp info using node@0.10.26 | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\Ein\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2012',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\workspace\\node-leveldown-master\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Ein\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Ein\\.node-gyp\\0.10.26\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Ein\\.node-gyp\\0.10.26',
gyp info spawn args   '-Dmodule_root_dir=C:\\workspace\\node-leveldown-master',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\workspace\\node-leveldown-master\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=Win32' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  env_win.cc
  win_logger.cc
  port_uv.cc
  db_impl.cc
  table_cache.cc
  repair.cc
  version_edit.cc
  log_writer.cc
  write_batch.cc
  filename.cc
  version_set.cc
  memtable.cc
  db_iter.cc
  log_reader.cc
  builder.cc
  dbformat.cc
  comparator.cc
  cache.cc
  logging.cc
  hash.cc
  env.cc
  arena.cc
  status.cc
  crc32c.cc
  bloom.cc
  filter_policy.cc
  options.cc
  coding.cc
leveldb-1.14.0\util\bloom.cc(50): warning C4018: '<' : signed/unsigned mismatch [C:\workspace\node-leveldown-master\dep
s\leveldb\leveldb.vcxproj]
  memenv.cc
  merger.cc
  block.cc
  filter_block.cc
  table.cc
  two_level_iterator.cc
  table_builder.cc
  format.cc
  block_builder.cc
  iterator.cc
leveldb-1.14.0\table\filter_block.cc(100): warning C4018: '<=' : signed/unsigned mismatch [C:\workspace\node-leveldown-
master\deps\leveldb\leveldb.vcxproj]
  leveldb.vcxproj -> C:\workspace\node-leveldown-master\build\Release\\leveldb.lib
  snappy-sinksource.cc
  snappy-stubs-internal.cc
  snappy.cc
  snappy.vcxproj -> C:\workspace\node-leveldown-master\build\Release\\snappy.lib
  leveldown.cc
  batch_async.cc
  database_async.cc
  batch.cc
  database.cc
  iterator_async.cc
  leveldown_async.cc
  iterator.cc
     Creating library C:\workspace\node-leveldown-master\build\Release\leveldown.lib and object C:\workspace\node-level
  down-master\build\Release\leveldown.exp
  Generating code
  Finished generating code
  leveldown.vcxproj -> C:\workspace\node-leveldown-master\build\Release\\leveldown.node
gyp info ok

Going futher, trying to install and build through npm install I hit the same problem again through another path:
.

C:\workspace\node-leveldown-master> node-gyp.cmd rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.0
gyp info using node@0.10.26 | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\Ein\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\workspace\\node-leveldown-master\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Ein\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Ein\\.node-gyp\\0.10.26\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Ein\\.node-gyp\\0.10.26',
gyp info spawn args   '-Dmodule_root_dir=C:\\workspace\\node-leveldown-master',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\workspace\\node-leveldown-master\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "C:\Users\Ein\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp", line 15, in <module>
    import gyp
  File "C:\Users\Ein\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 8, in <module>
    import gyp.input
  File "C:\Users\Ein\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 15, in <module>
    import multiprocessing
  File "C:\Python27\lib\multiprocessing\__init__.py", line 65, in <module>
    from multiprocessing.util import SUBDEBUG, SUBWARNING
  File "C:\Python27\lib\multiprocessing\util.py", line 38, in <module>
    import threading        # we want threading to install it's
  File "C:\Python27\lib\threading.py", line 13, in <module>
    from collections import deque as _deque
  File "C:\Python27\lib\collections\__init__.py", line 368
    exec(class_definition, namespace)
SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contains a nested function with free variables
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\Ein\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:415
: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 Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Users\\Ein\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\workspace\node-leveldown-master
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok

Again the issue with the SyntaxError in collections__init__.py, but now through threading.py.
It seems that the issue is with python, but as I'm not a python or gyp expert I would really like some input on where to go with this bug.

@emilingerslev
Copy link

For the "SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contains a nested function with free variables" here is a solution.

First of I found a test for the ensence of the SyntaxError problem with test.py:

import collections
print('success!')

running it through 3 different version of python makes it all a little clearer:

C:\workspace\nodegyp-test> C:\Python26\python.exe .\test.py
success!
C:\workspace\nodegyp-test> C:\Python27\python.exe .\test.py
Traceback (most recent call last):
  File ".\test.py", line 1, in <module>
    import collections
  File "C:\Python27\lib\collections\__init__.py", line 368
    exec(class_definition, namespace)
SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contains a nested function with free variables
C:\workspace\nodegyp-test> C:\Python33\python.exe .\test.py
success!

The recommendations on running node-gyp with python 2.7.3 clearly doesn't fit Windows 8.
Trying to run the a build with python 2.6:

C:\workspace\nodegyp-test> npm install leveldown --python=c:\python26\python.exe --msvs_version=2012

npm http GET https://registry.npmjs.org/leveldown
npm http 304 https://registry.npmjs.org/leveldown
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

> leveldown@0.10.2 install C:\workspace\nodegyp-test\node_modules\leveldown
> node-gyp rebuild


C:\workspace\nodegyp-test\node_modules\leveldown>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.
  env_win.cc
  win_logger.cc
  port_uv.cc
  db_impl.cc
  table_cache.cc
  repair.cc
  version_edit.cc
  log_writer.cc
  write_batch.cc
  filename.cc
  version_set.cc
  memtable.cc
  db_iter.cc
  log_reader.cc
  builder.cc
  dbformat.cc
  comparator.cc
  cache.cc
  logging.cc
  hash.cc
  env.cc
  arena.cc
  status.cc
  crc32c.cc
  bloom.cc
  filter_policy.cc
  options.cc
  coding.cc
leveldb-1.14.0\util\bloom.cc(50): warning C4018: '<' : signed/unsigned mismatch [C:\workspace\nodegyp-test\node_modules
\leveldown\deps\leveldb\leveldb.vcxproj]
  memenv.cc
  merger.cc
  block.cc
  filter_block.cc
  table.cc
  two_level_iterator.cc
  table_builder.cc
  format.cc
  block_builder.cc
  iterator.cc
leveldb-1.14.0\table\filter_block.cc(100): warning C4018: '<=' : signed/unsigned mismatch [C:\workspace\nodegyp-test\no
de_modules\leveldown\deps\leveldb\leveldb.vcxproj]
  leveldb.vcxproj -> C:\workspace\nodegyp-test\node_modules\leveldown\build\Release\\leveldb.lib
  snappy-sinksource.cc
  snappy-stubs-internal.cc
  snappy.cc
  snappy.vcxproj -> C:\workspace\nodegyp-test\node_modules\leveldown\build\Release\\snappy.lib
  leveldown.cc
  batch_async.cc
  database_async.cc
  batch.cc
  database.cc
  iterator_async.cc
  leveldown_async.cc
  iterator.cc
     Creating library C:\workspace\nodegyp-test\node_modules\leveldown\build\Release\leveldown.lib and object C:\worksp
  ace\nodegyp-test\node_modules\leveldown\build\Release\leveldown.exp
  Generating code
  Finished generating code
  leveldown.vcxproj -> C:\workspace\nodegyp-test\node_modules\leveldown\build\Release\\leveldown.node
leveldown@0.10.2 node_modules\leveldown
├── bindings@1.1.1
└── nan@0.6.0

Hope this helps somebody :)

@erquhart
Copy link

@einoodle I just trashed an entire day on this issue. Thanks to your post I was able to end it on a good note. Not sure if it was using 2.6 or simply defining the path to the Python executable inline with the command, but it worked. Cheers!

@jellydonut
Copy link

this is what worked for me:

npm install zombie --python=C:\tools\python27\python.exe --msvs_version=2013

I am on:
Windows 8
visual studio 2013 (Full version)

@panuhorsmalahti
Copy link

node-gyp was broken for me when I removed VS2012 (I had VS2013) installed. --msvs_version=2013 fixed the issue, but a proper fix was setting the GYP_MSVS_VERSION=2013 environment variable.

@benjaminmbrown
Copy link

I can confirm @jellydonut's solution works:

npm install gulp-sass --python=C:\tools\python27\python.exe --msvs_version=2013

Works. My setup is also:
Windows 8
VS 2013

@dalanmao
Copy link

I have the same issue, but I resolve this step by step:
download the module source code
cd the module dir
node-gyp configure
use the vs2012 to open the vs project and updating the vs project file in the build directory
node-gyp build
that works ,but not the idea way , use option --msvs_version=2012 not work for me.

@catamphetamine
Copy link

I have both Visual Studio Express 2013 and Visual Studio Community 2015 installed.

I was getting

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [G:\work\cinema\node_modules\engine.io\node_modules\bufferutil\build\bufferutil.vcxproj]

The reason was that the latest Node.js for Windows downloaded from https://nodejs.org contains an old npm v2 (and old node-gyp inside that npm v2).

I had to update Node.js'es internal npm (which also updated node-gyp):

(open console as an administrator)
cd "C:\Program Files\nodejs"
npm install npm@latest

npm config set msvs_version 2013

Now it works (seems that it's using VS 2013 for the time being)

@merlynee
Copy link

merlynee commented May 11, 2016

I've been stuck here for a whole day,downloaded and instaled erverything.It doesn't seem to work. however,I run 'npm update',and god finally smiled at me.oh.and deleted everything in folder npm-cashe

@merlynee
Copy link

crap,it worked for one minute

@msholly
Copy link

msholly commented Dec 13, 2016

I had a similar issue, and the NPM command for windows-build-tools (from Option 1 in the docs) didn't work for me.

I had to get the installer for Visual Studio 2015, and install the C++ tools manually.

Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.

Hope this helps anyone stumbling onto this problem.

gabylb pushed a commit to ibmruntimes/node-gyp that referenced this issue Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests