Windows users are not happy. #629

Closed
luisrudge opened this Issue May 22, 2015 · 474 comments

Projects

None yet
@luisrudge

It all started with this conversation.

As I said, I'm pretty much a newbie and I don't even know what node-gyp does, but what I DO know is that it's a pain to run Windows and install a project with node-gyp as a dependency.
Some numbers:

It's bizarre that a nodejs developer needs to install visual studio (even the express edition) in order to be able to work on Windows. Even more bizarre is that I, as a .NET developer with full visual studio installed in my machine still can't download a bunch of projects that use this project.

With that being said, I'd like to know from all of you what should we do to make windows users fall in the pit of success? What are the alternatives? Does Microsoft can solve this in any way?

This issue is fixed (kinda)

@mousetraps pointed that Microsoft is shipping the C++ build tools separately now. Check here

Some updates on this gigantic thread

Absolutely non-official statement that @Microsoft is aware of this issue and seeing what can be done

@mousetraps said that this thread "is high on people's radar" at @Microsoft

Very good Q&A about noge-gyp issues on Windows and why they happen

@dekarguy took the time to answer some questions about what we all are going through

@johanalkstal

+1
Is there some common effort we can do?

The reliance on both Visual Studio (or the Windows SDK) and Python is such a pain. And when it still doesn't work 99.9/100 times anyway, while node-gyp still being so heavily used by the Node community, it's enough to make a grown man cry or give up on using whatever it was that relied on node-gyp.

@daanl
daanl commented May 22, 2015

+1 this a world of pain, took me hours to install a project with node_gyp

@joeeames

+1 after 8+ hours of trying, still can't use anything that relies on node-gyp.

@GradyD
GradyD commented May 23, 2015

๐Ÿ‘ after multiple days trying to get this to install I am still fighting VS errors!! It just never gives up.

Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.

@luisrudge

@TooTallNate any thoughts?

@TooTallNate
Collaborator

node-gyp v2.0.0 (just released) has an updated gyp version that adds support for MSVS 2015, and should hopefully ease of lot of this pain for Windows users.

@TooTallNate
Collaborator

Additionally, you guys should probably support my current effort in bringing FFI into node core, thus eliminating node-gyp from the equation for the majority of use-cases.

@luisrudge

Awesome @TooTallNate. I don't have the skills to understand and support your argument, but I can give you a ๐Ÿ‘ haha :(

Congratz on the new release, but I believe we have to wait for everyone to update the dependency version and that maybe never happens.

@b-long
b-long commented May 28, 2015

I'm also struggling with this quite a bit. I'm trying to follow along with this guide (https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup), but I'm not having much luck.

The guide in the wiki directs us to http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express, which redirects to https://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express and that page does not offer VS 2010 for download (it's exclusively 2013).

Even more hilarious / sad, in attempting the uninstall procedures, I somehow wound up with "Microsoft Visual Studio 2010 Service Pack 1" listed in my Programs and Features (Uninstall menu), but when I click "Uninstall/Change", I'm given an error after a while that says "A compatible version of Visual Studio 2010 was not detected on the system. This update is designed for only the Microsoft Visual Studio 2010."

@luisrudge

Yeah. There needs to be a better way

@b-long
b-long commented May 29, 2015

@TooTallNate I'm pretty sure you're doing the best work there is for Node support on Windows ๐Ÿ‘ :) Could I make a request that we update the wiki page (or add a new wiki page) describing the steps for VS 2015 ?

@luisrudge

FYI: npm i c3 still fails. Even with vs2015 installed. @TooTallNate any ideas?

@luisrudge
c:\git\rr\MyProject\src (master)
? npm i -S c3
npm WARN package.json package@0.0.0 No description
npm WARN package.json package@0.0.0 No repository field.
npm WARN package.json package@0.0.0 No README data
npm WARN package.json package@0.0.0 No license field.
-


> contextify@0.1.14 install c:\git\rr\MyProject\src\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild

\
c:\git\rr\MyProject\src\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify {git}
{lamb} if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 534, in script_main
    return main(sys.argv[1:])
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 527, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 503, in gyp_main
    options.circular_check)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1867, in CalculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 402, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2015'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
cwd c:\git\rr\MyProject\src\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-S" "c3"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.14 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\git\rr\MyProject\src\npm-debug.log
@b-long
b-long commented Jul 9, 2015

I just found out about the environment variable (GYP_MSVS_VERSION ) option here: #339 (comment) , it might help @luisrudge or others. Any other updated happy paths for Windows users? /cc @TooTallNate @isaacs

@bgSosh
bgSosh commented Jul 22, 2015

+1 This is a real pain point - I'm spending as much time fiddling around with VS and node-gyp as I am coding at the moment. IMO the core of the problem is all these MS/VS dependencies, which are a total mess - is there any way we could circumvent these?

@aahoo
aahoo commented Jul 25, 2015

+1000
More than two days working to figure out this gyp thing. The problem is I can't give up.

@Sogl
Sogl commented Jul 28, 2015

+100500!
Much pain with 'node-gyp'! 15 GB of Visual Studio versions/SP/tools downloaded...

For windows 7 I use VS 2010 and SDK 7.1 command prompt. This instruction can help:
https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/

With Windows 8.1 pro and VS 2013 Express and SDK 8.1 I'm still get this error:

  bufferutil.cc
..\src\bufferutil.cc(7): fatal error C1083: ะะต ัƒะดะฐะตั‚ัั ะพั‚ะบั€ั‹ั‚ัŒ ั„ะฐะนะป ะฒะบะปัŽั‡ะตะฝะธะต:
v8.h: No such file or directory [C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_module s\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_module s\engine.io-client\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcx proj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
npm WARN optional dep failed, continuing bufferutil@1.1.0

Now I'm downloading VS 2013 Community (#644)

Update.
VS2013 Community version not helps..#676 created

@aahoo
aahoo commented Jul 29, 2015

@Sogl

I installed socket.io with MSVS version set and then installed the rest of the stuff:

npm install socket.io --msvs_version=2015
npm install

Note: I had Visual Studio 2015

I hope this helps if not you can look @ socket.io / issues.

@Sogl
Sogl commented Jul 29, 2015

@baazoo

Can't install with 2013/2010:

C:\Users\ะั€ั‚ะตะผ>npm install -g socket.io --msvs_version=2013

> bufferutil@1.1.0 install C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socke
t.io\node_modules\bufferutil
> node-gyp rebuild


C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socket.io\node_modules\bufferuti
l>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-
gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  reb
uild )
ะกะฑะพั€ะบะฐ ะฟั€ะพะตะบั‚ะพะฒ ะฒ ัั‚ะพะผ ั€ะตัˆะตะฝะธะธ ะฟะพ ะพะดะฝะพะผัƒ. ะงั‚ะพะฑั‹ ะฒะบะปัŽั‡ะธั‚ัŒ ะฟะฐั€ะฐะปะปะตะปัŒะฝัƒัŽ ัะฑะพั€ะบัƒ, ะดะพ
ะฑะฐะฒัŒั‚ะต ะฟะฐั€ะฐะผะตั‚ั€ "/m".
  bufferutil.cc
..\src\bufferutil.cc(7): fatal error C1083: Cannot open include file: 'v8.h': N
o such file or directory [C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socke
t.io\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socket.io\node_modu
les\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No description
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No repository field.
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No README data
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install" "-g" "socket.io" "--msvs_version=2013"
npm ERR! node v0.12.7
npm ERR! npm  v3.2.0
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\ะั€ั‚ะตะผ\npm-debug.log

C:\Users\ะั€ั‚ะตะผ>npm install -g socket.io --msvs_version=2010

> bufferutil@1.1.0 install C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socke
t.io\node_modules\bufferutil
> node-gyp rebuild


C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socket.io\node_modules\bufferuti
l>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-
gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  reb
uild )
ะกะฑะพั€ะบะฐ ะฟั€ะพะตะบั‚ะพะฒ ะฒ ัั‚ะพะผ ั€ะตัˆะตะฝะธะธ ะฟะพ ะพะดะฝะพะผัƒ. ะงั‚ะพะฑั‹ ะฒะบะปัŽั‡ะธั‚ัŒ ะฟะฐั€ะฐะปะปะตะปัŒะฝัƒัŽ ัะฑะพั€ะบัƒ, ะดะพ
ะฑะฐะฒัŒั‚ะต ะฟะฐั€ะฐะผะตั‚ั€ "/m".
  bufferutil.cc
..\src\bufferutil.cc(7): fatal error C1083: Cannot open include file: 'v8.h': N
o such file or directory [C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socke
t.io\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\socket.io\node_modu
les\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No description
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No repository field.
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No README data
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install" "-g" "socket.io" "--msvs_version=2010"
npm ERR! node v0.12.7
npm ERR! npm  v3.2.0
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\ะั€ั‚ะตะผ\npm-debug.log

C:\Users\ะั€ั‚ะตะผ>
@b-long
b-long commented Jul 29, 2015

The root of this issue is that Microsoft's willingness to provide a c/c++ compiler on Windows is lackluster. Right? Is there not some other approach (e.g. using a Cygwin DLL or something from MinGW ) that might suffice?

@aahoo
aahoo commented Jul 30, 2015

@Sogl
I didn't follow from the beginning. Take a look at Updating npm's bundled node gyp if you already haven't.

@thoroc
thoroc commented Jul 30, 2015

Other solution would be to settle a non MSFT compiler and use one that is still available for the plateform.

@Sogl
Sogl commented Jul 30, 2015

@baazoo

Didn't help.

@thoroc

Also found info about build with pangyp:

npm i pangyp -g
npm config set node-gyp pangyp

Also this tool works with io.js.
For me it doesn't work because my userprofile name in Russian.
But it still use MS compiler...

@thoroc
thoroc commented Jul 30, 2015

Well I am resorting to install a VM with Ubuntu on it for dev. But I am not really happy to have to change OS just because node-gyp is forcing me into installing MSFT dev tooling. From I have read changing to an FOSS C++ compiler would mean a major refactoring of the tool itself. Which incidently and understandly, no one wants to undertake.

@aahoo
aahoo commented Jul 30, 2015

@Sogl
I just encounterd similar issue when trying to install gulp-devtools.

c:\users\hamed\.node-gyp\0.12.7\deps\uv\include\uv-win.h(32): fatal error C1083
: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\h
amed\AppData\Roaming\npm\node_modules\gulp-devtools\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
  validation.cc
c:\users\hamed\.node-gyp\0.12.7\deps\uv\include\uv-win.h(32): fatal error C1083
: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\h
amed\AppData\Roaming\npm\node_modules\gulp-devtools\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]

This is what worked for me:

  1. Switched terminal from Powershell to CMD (Powershell didn't work)
  2. set GYP_MSVS_VERSION=2015
  3. Installed the package in my case npm install -g gulp-devtools

There is one more suggestion!

@Sogl
Sogl commented Jul 30, 2015

@baazoo
Just tried things you describe.
Same 'v8.h' error =(

One last step that I want to try - install VS 2015 ๐Ÿ˜†

@b-long
b-long commented Jul 30, 2015

I also resorted to the workflow @thoroc described (using a VM inside Windows).

@Sogl
Sogl commented Jul 30, 2015

@thoroc
@b-long

Yep, guys. This problem also has led me to use Vagrant (with VirtualBox) and Scotch Box.

@luisrudge

Sorry. The solution can't be "use a vm instead"

@luisrudge

The root of this issue is that Microsoft's willingness to provide a c/c++ compiler on Windows is lackluster. Right? Is there not some other approach (e.g. using a Cygwin DLL or something from MinGW ) that might suffice?

@b-long can you elaborate on that? I'm sorry, but I'm a newbie :)

@donaldhook

I have VS 2015 community, the build tools and nothing seems to work.... I keep getting a NanThrowError. I have the VC++ distribution, have set the msvs version, nothing seems to work.

Any insight or suggestions are greatly appreciated.

C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc>if not defined npm_config_n
ode_gyp (node "H:\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\n
ode-gyp\bin\node-gyp.js" configure build ) else (node configure build )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
odbc.cpp
odbc_connection.cpp
odbc_statement.cpp
odbc_result.cpp
dynodbc.cpp
..\src\odbc_connection.cpp(436): error C2668: 'NanThrowError': ambiguous call t
o overloaded function [C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\bui
ld\odbc_bindings.vcxproj]
C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7
19): note: could be 'void NanThrowError(v8::Handlev8::Value)' (compiling so
urce file ..\src\odbc_connection.cpp)
C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7
11): note: or 'void NanThrowError(v8::Handlev8::String)' (compiling s
ource file ..\src\odbc_connection.cpp)
C:\Users\dhook\AppData\Roaming\npm\node_modules\odbc\node_modules\nan\nan.h(7
11): note: or 'void NanThrowError(const char *)' (compiling source file
..\src\odbc_connection.cpp)

@b-long
b-long commented Aug 6, 2015

@luisrudge Sorry, I'm a bit of a compiler newbie myself. Maybe @TooTallNate or someone else at Joyent ( @trevnorris ?) can comment. I'm fairly certain node-gyp on Windows is a pain point for many developers and as such, I'll do development / testing in a VM or remote server when I'm on Windows.

There's this discussion on StackOverflow, but IMHO we can do better than a variety of "try this..." or "maybe that?". Personally, I'd suggest my workflow (get yourself cygwin and ssh to something else). Otherwise, wait until Microsoft does something about this (they say they support the development of NodeJS) or until NodeJS core team addresses it.

Lastly, I'm also pretty sure this isn't @TooTallNate's fault ๐Ÿ˜„ . As far as I can tell, he was filling a gap that needed to be filled. This is the 85% solution and many people owe Nate thanks for it, but now the community needs to push the effort even further.

@luisrudge

I'm sure it isn't @TooTallNate's fault. This issue was never intended to point a finger to anyone. With that being said, this workflow NEEDS to get better, hence the issue. How can Microsoft fix this? What needs to be done to fix this? Knowing this, we can move this discussion forward with MSFT people.

@b-long
b-long commented Aug 6, 2015

Oh no, I know you didn't think it's Nate's fault :) I just didn't want Nate to think, that I think, that it's his fault. I guess a better solution would be a script-able (or npm install-able) compiler, with proper settings, etc. as defaults.

That doesn't need to come from Microsoft, but it has to work on Windows and they know Windows better than anyone. Maybe some of the folks working on https://github.com/Microsoft/nodejstools or https://github.com/Azure/azure-sdk-for-node would know someone or know something about solving this?

@luisrudge

@mousetraps @paulvanbrenk would you mind taking a look on this thread? :) Thanks!

@bgSosh
bgSosh commented Aug 6, 2015

IMO we might as well wave a dead chicken as expect a proper solution from MS. There are so many forces pulling in different directions in a company that size, and I doubt they would be able to steer things in the right direction just to help the node community even if they wanted to. (No offence intended to the MS people linked above. And I'd love to be proven wrong).

Is there a viable route we could take that didn't rely on MS compilers (or VMs)? (Perhaps that is a stupid question - I really don't know)

@donaldhook

I intsalled nodejstools in VS 2015 and doing the compile in VS2015, I get the same errors ......

@b-long
b-long commented Aug 6, 2015

@donaldhook If an error occurs with node-gyp when you're installing https://github.com/Microsoft/nodejstools , perhaps writing an issue there would spur someone from MS to investigate ?

@donaldhook

Will do ...

@mousetraps
Contributor

@luisrudge thx for the tag - agreed it's super frustrating... I'll start reaching out to people today - we'll see what we can do on our end to help improve the experience.

@bgSosh challenge accepted ๐Ÿ˜ƒ

@b-long
b-long commented Aug 6, 2015

challenge accepted

Nice! Good luck @mousetraps :)

@ArtskydJ
ArtskydJ commented Aug 6, 2015

After installing MSVS 2015, node-gyp builds failed, so I uninstalled 2015, and ran a "repair" install over my existing 2010 installation. This fixed the failing node-gyp builds for me.

Hopefully this helps someone.

@luisrudge

@mousetraps thank you very much! Please keep us posted :)

@mousetraps
Contributor

Dug into this a bit today, and have some (heavily caveated) good news.

VS isn't necessarily required - we didn't really publicize this much, but Microsoft released the C++ compiler pkg targeting Python 2.7 a while ago, and you should be able to replace the download-VS step with the following download:
http://aka.ms/vcpython27

More details here. The caveat is that there is no official support, it wasn't verified for use with node, etc - so don't expect bug fixes or improvements. But if it happens to work fine for you, then great ๐Ÿ˜ƒ

AFAIK... that combined w/ python 2.7 & the Windows SDK should be sufficient, but someone else should probably verify. It worked fine with the few pkgs I tried to install.

Hope that helps, and let us know if you have any ideas of how we can further improve the Windows experience. The more concrete/actionable, the better.

EDIT
Here is the link to the windows sdk I used - I've only tried Win 7 - I haven't tried Win8 or Win10 yet.

[PLEASE READ] And just to be crystal clear on this... I am not even close to being an expert in this space, and there are absolutely no guarantees whatsoever. It just happened to work for me for the pkgs I was trying to install, so hopefully it works for others too.

This compiler package is entirely unsupported and represents a snapshot of the last version that is fully compatible with Python 2.7. For the latest security and bug fixes, please use the latest version of Microsoft Visual Studio for any development work that does not directly interface with Python 2.7.

@luisrudge

so, we have to install python, Microsoft Visual C++ Compiler for Python 2.7 and the windows sdk? do you have a link for the win sdk?

@mousetraps
Contributor

@luisrudge updated my comment above so it's all in one place. And also made the disclaimer much more clear ๐Ÿ˜ƒ

@donaldhook

I installed the VC++ Python compiler to no avail ....Windows SDK 7.1 does not install due to the detection of a pre-release version of .NET 4... which, I have a 4.6 GA release ... Hopefully I can get that installed to see if that will help with the node-gyp compile issue

@mousetraps
Contributor

@donaldhook ah, gotcha. FWIW I just tried the pkg you were trying to install (odbc), and received the same errors - not entirely sure what the issue is or whether it's an issue w/ the pkg or node-gyp itself, so don't spend too much time on it... Do other pkgs work for you? like socket.io?

(for future reference, Node Tools is no longer on codeplex, so pls don't file issues there - everything is on github now https://github.com/microsoft/nodejstools)

@donaldhook

Sara, socket.io does install, with some warnings as seen below ... Thanks
...

C:\Users\dhook\AppData\Roaming\npm\node_modules\socket.io\node_modules
engine.io
\node_modules\ws\node_modules\utf-8-validate>if not defined
npm_config_node_gyp
(node
"H:\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp
bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel
build,
please add the "/m" switch.
validation.cc
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\exception(361):
warning C4577: 'noexcept' used with no exception handling mode specified;
termi

nation on exception is not guaranteed. Specify /EHsc
[C:\Users\dhook\AppData\Ro

aming\npm\node_modules\socket.io http://socket.io\node_modules\engine.io
http://engine.io\node_modules\ws\node_mo

dules\utf-8-validate\build\validation.vcxproj]
Creating library C:\Users\dhook\AppData\Roaming\npm\node_modules
socket.io
\node_modules\engine.io
\node_modules\ws\node_modules\utf-8-validate\build\Rel
ease\validation.lib and object
C:\Users\dhook\AppData\Roaming\npm\node_module
s\socket.io\node_modules\engine.io
\node_modules\ws\node_modules\utf-8-validat
e\build\Release\validation.exp
Generating code
Finished generating code

On Thu, Aug 6, 2015 at 7:01 PM, Sara Itani notifications@github.com wrote:

@donaldhook https://github.com/donaldhook ah, gotcha. FWIW I just tried
the pkg you were trying to install (odbc), and received the same errors -
not entirely sure what the issue is or whether it's an issue w/ the pkg or
node-gyp itself, so don't spend too much time on it... Do other pkgs work
for you? like socket.io?

(for future reference, Node Tools is no longer on codeplex, so pls don't
file issues there - everything is on github now
https://github.com/microsoft/nodejstools)

โ€”
Reply to this email directly or view it on GitHub
#629 (comment)
.

@Sogl
Sogl commented Aug 7, 2015

@mousetraps, Still the same error after installing vc++ for python 2.7 compiler:

$ npm i -g browser-sync
npm WARN install Couldn't install optional dependency: Unsupported
C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\browser-sync -> C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\browser-sync\bin\browser-sync.js

> bufferutil@1.1.0 install C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\browser-sync\node_modules\bufferutil
> node-gyp rebuild


ะั€ั‚ะตะผ@SOGL C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\browser-sync\node_modules\bufferutil
$ if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
ะกะฑะพั€ะบะฐ ะฟั€ะพะตะบั‚ะพะฒ ะฒ ัั‚ะพะผ ั€ะตัˆะตะฝะธะธ ะฟะพ ะพะดะฝะพะผัƒ. ะงั‚ะพะฑั‹ ะฒะบะปัŽั‡ะธั‚ัŒ ะฟะฐั€ะฐะปะปะตะปัŒะฝัƒัŽ ัะฑะพั€ะบัƒ, ะดะพะฑะฐะฒัŒั‚ะต ะฟะฐั€ะฐะผะตั‚ั€ "/m".
  bufferutil.cc
..\src\bufferutil.cc(7): fatal error C1083: Cannot open include file: 'v8.h': N o such file or directory [C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\brows er-sync\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm\node_modules\browser-sync\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No description
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No repository field.
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No README data
npm WARN EPACKAGEJSON C:\Users\ะั€ั‚ะตะผ\AppData\Roaming\npm No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "browser-sync"
npm ERR! node v0.12.7
npm ERR! npm  v3.2.0
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\ะั€ั‚ะตะผ\npm-debug.log

Same error with socket.io installation.
My env here: #676

@johntom johntom referenced this issue in stamp-web/stamp-web-aurelia Aug 8, 2015
Closed

Windows10 #56

@Sogl
Sogl commented Aug 12, 2015

@mousetraps , Just tried to fresh VM Windows 8.1 pro x64 installation.
Node.js v 0.12.7, python 2.7.9, npm 3.2.0, VC compiler for python 2.7 only
Got this error:

MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".

Same after SDK 8.1 full installation.

@b-long
b-long commented Aug 12, 2015

@Sogl In my earlier comment, I was recommending a Linux VM. Just to clarify :) Good luck!

@Sogl
Sogl commented Aug 12, 2015

@b-long , I already use Linux VM... but I'm curious to get node-gyp work on Windows =)) I solved this problem on Windows 7, but 8 isn't giving up.

@b-long
b-long commented Aug 12, 2015

@Sogl Ah, I see. Sorry about that.

@Sogl
Sogl commented Aug 12, 2015

Just did it on fresh Windows 8.1 without installing any VS!!! โญ๏ธ

Installed:

  • Node.js v 0.12.7
  • npm 3.2.0
  • Python 2.7.9
  • VC++ compiler for python 2.7
  • MS build tools 2013
  • SDK for Windows 8.1
  • SDK for Windows 7 with SP1

Finally go to Start -> All Programs -> Microsoft Windows SDK v7.1 -> Windows SDK 7.1 Command Prompt
No need to set PATH, msvs_version and other "magic" things...

Packages browser-sync and socket.io installed successfully. Snapshot created.

Now I want to find a minimum set of libraries which make it works.

@donaldhook

Great...

On Wed, Aug 12, 2015 at 9:38 AM, Artyom Mezin notifications@github.com
wrote:

Just did it on fresh Windows 8.1 without installing any VS!!! [image:
โญ๏ธ]

Installed:

  • Node.js v 0.12.7
  • npm 3.2.0
  • Python 2.7.9
  • VC++ compiler for python 2.7
  • MS build tools 2013
  • SDK for Windows 8.1
  • SDK for Windows 7 with SP1

Finally go to Start -> All Programs -> Microsoft Windows SDK v7.1 ->
Windows SDK 7.1 Command Prompt

Packages browser-sync and socket.io installed successfully. Snapshot
created.

Now I want to find a minimum set of libraries.

โ€”
Reply to this email directly or view it on GitHub
#629 (comment)
.

@Sogl
Sogl commented Aug 13, 2015

You need only these things to fix problem with node-gyp on Windows 8.1:

  • Node.js v 0.12.7
  • npm 3.2.0
  • Python 2.7.9
  • SDK for Windows 7 with SP1

Install tools with Windows SDK 7.1 Command Prompt.

All VM programs:
packages

p.s. I tried this on Windows 10, but I can't install SDK 7.1 compiler because:
ev644afv-og
And all .net 4/4.5 etc installators say that I already have .net newer version installed =(

Also if I use C++ compiler for python command prompt:

vcbuild.exe : error VCBLD0010: Project 'C:\nodejs\node_modules\browser-sync\nod
e_modules\bufferutil\build\bufferutil.vcproj' requires upgrade. Use 'vcbuild /u
pgrade' or 'devenv /upgrade' to upgrade the project. [C:\nodejs\node_modules\br
owser-sync\node_modules\bufferutil\build\binding.sln]

and with --msvs_version=2008:

c:\users\)\.node-gyp\0.12.7\deps\v8\include\v8stdint.h(10): fatal error C1083: Cannot open
include file: 'stddef.h': No such file or directory [C:\nodejs\node_modules\browser-sync\
node_modules\bufferutil\build\binding.sln]
@thorn0
thorn0 commented Aug 13, 2015

Those who are struggling with making it work with VS 2015 don't forget to make sure you've installed the C++ part of VS 2015. It's not installed by default.
image

@donaldhook

I had installed that as part of the VS2015 and had issues ... so make sure
you have the other items installed....

On Thu, Aug 13, 2015 at 7:48 AM, thorn0 notifications@github.com wrote:

Those who are struggling with making it work with VS 2015 don't forget to
make sure you've installed the C++ part of VS 2015.
[image: image]
https://cloud.githubusercontent.com/assets/94334/9250024/a3ca627a-41d2-11e5-8efb-1417d686eaa4.png

โ€”
Reply to this email directly or view it on GitHub
#629 (comment)
.

@thorn0
thorn0 commented Aug 13, 2015

@donaldhook Do you get the errors only when installing odbc? What about other packages (e.g. socket.io)?

@donaldhook

Had errors there too ....

On Thu, Aug 13, 2015 at 8:32 AM, thorn0 notifications@github.com wrote:

@donaldhook https://github.com/donaldhook Do you get the errors only
when installing odbc? What about other packages (e.g. socket.io)?

โ€”
Reply to this email directly or view it on GitHub
#629 (comment)
.

@thorn0
thorn0 commented Aug 13, 2015

What did these errors say?

@donaldhook

My mistake. I tried installing when I was having the ODBC issue. The
errors I receive are WARNINGS... So sorry for confusing anyone or making
more work.

I had posted on the ODBC board to work through the issues. I have found a
work around for the time being using the JDBC npm package.

Thanks to all of you working on the issue!

C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\include\exception(361):
warning C4577: 'noexcept' used with no exception handling mode specified;
termi
nation on exception is not guaranteed. Specify /EHsc
[C:\Users\dhook\AppData\Ro
aming\npm\node_modules\socket.io
\node_modules\socket.io-client\node_modules\eng
ine.io-client\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxp
roj]

On Thu, Aug 13, 2015 at 8:38 AM, thorn0 notifications@github.com wrote:

What did these errors say?

โ€”
Reply to this email directly or view it on GitHub
#629 (comment)
.

@Sogl
Sogl commented Aug 14, 2015

@mousetraps, Can you help me with this?
I found a workaround without VS or VC++ compiler for Python, but it not works on clean Windows 10 and often not work on not clean WIndows 8.1 because I can't install SDK 7.1.

See my previous message:
#629 (comment)

@ukrbublik

Important info!!11
If your Windows profile folder name has non-english chars (my had russian) - change it!
Like this
Because there is path "C:\Users___\AppData\Roaming\npm" in %PATH%, where v8.h and other headers located.

@uxfed uxfed referenced this issue in yeoman/yeoman Aug 16, 2015
Closed

Windows path too long #1532

@Sogl
Sogl commented Aug 16, 2015

@ukrbublik , You right! Just tried with russian username in Windows 8 and got the same v8.h error, but with eng. username compilation done well.

Now my node-gyp works as expected.

What I did:

  • I renamed my profile folder with ACSII characters only
  • VS 2013 Community installed
  • npm config set msvs_version 2013 in console

I think the problem is related with this:
#297

@mesosteros mesosteros referenced this issue in trenpixster/addict Aug 18, 2015
Closed

Comeonin dependency error on Windows #47

@mesosteros

Doens't work for me. Install VC2015 (Windows 10 x64 bits) and when I try to install bcrypt, it still gets me the node-gyp errors:

C:\Users\mesos_000\Desktop\elixir Projects\testingBlog>npm install -g bcrypt
|
> bcrypt@0.8.5 install C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcrypt
> node-gyp rebuild


C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node
_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of data [C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcryp
t\build\bcrypt_lib.vcxproj]
c:\users\mesos_000\.node-gyp\0.12.7\deps\uv\include\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory (..\src\bcrypt_nod
e.cc) [C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
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\mesos_000\AppData\Roaming\npm\node_modules\bcrypt
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "bcrypt"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\mesos_000\Desktop\elixir Projects\testingBlog\npm-debug.log
@thorn0
thorn0 commented Aug 18, 2015

@mesosteros Do you actually have winsock2.h anywhere in Program files or Program files (x86)?

@mesosteros

@thorn0 no. Don't even know what that is. I'm gonna install the Windows 7 SDK (I think it'll work on 10)

@thorn0
thorn0 commented Aug 18, 2015

It's a part of the Windows SDK. Just to confirm, did you perform a recursive search for this file in those folders?

@mesosteros

@thorn0 no. But the sdk isn't installing. I'm trying MicrosoftFixit to correct the installation. In the meantime I'm performing the search for winsock2.h

@mesosteros

@thorn0 Ok it seems I have winsock2.h on my Program Files (x86) at the Windows Kit and Windows Phone Kits folders

@thorn0
thorn0 commented Aug 18, 2015

So you have the SDK.

@mesosteros

Seems so...

@donaldhook

I had issues installing the SDK as well, it wouldnt allow me to install it.

On Tue, Aug 18, 2015 at 10:30 AM, Carlos Santos notifications@github.com
wrote:

@thorn0 https://github.com/thorn0 no. But the sdk isn't installing. I'm
trying MicrosoftFixit to correct the installation. In the meantime I'm
performing the search for winsock2.h

โ€”
Reply to this email directly or view it on GitHub
#629 (comment).

@thorn0
thorn0 commented Aug 18, 2015

It might be that node-gyp requires just the Windows 7 SDK. It's installed if you tick off Windows XP Support for C++ in the VS setup. Did you tick it off?

@mesosteros

@thorn0 I ticked what you said here but on. #629 (comment)

@Sogl
Sogl commented Aug 18, 2015

@mesosteros, I spent about month with C1083 error to resolve it. It was profile name bug =(

What npm version and Windows version you have?
Did you try to rename your profile folder from mesos_000 to mesos? You can just create another profile in Windows.
Also try to clear .node-gyp folder before build.
Did you try to build from SDK 7.1 command prompt? All prompts must be Run as Administrator.
Try to build with --msvs_version=2015.

@mesosteros

@Sogl My npm version is 2.11.3 and I'm using Windows 10 Home x64 bit.
My prompts are being run as administrator and I've also tried the Developer Command Prompt.
I'll try changing profile name.

@Sogl
Sogl commented Aug 19, 2015

My npm version is 2.11.3

I recommend 3.x. Some Windows long path bugs has been fixed and more.

@mesosteros

Couldn't manage to change my user folder since I have the Home version. Anyway it shouldn't matter since it's running from Program Files and not users. I managed to update npm and still I get the same errors.
I find this issue absolutely ridiculous: I'm just trying to add a package (addict) to an Elixir/Phoenix Framework project, but that package has a dependency on another package (comeonin) which in turn points to a dependency compilation error in bcrypt wich in turn points to its dependency on node-gyp giving this error.

@Sogl
Sogl commented Aug 19, 2015 edited

Couldn't manage to change my user folder since I have the Home version.

In Home you can't put your computer into Domain, can't use group policy management and some other small things... I can't see problem with profile.
0

Six steps that I did:

  1. Add +1 admin account
  2. Login with this new account in Safe Mode
  3. Open regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  4. Change selected key with old user name to new (edited by @addaleax: There was a screenshot here before which has since been replaced by an advertisement for a potentially harmful site, so Iโ€™ve removed it โ€“ see #1063)
  1. Rename your C:\Users\old profile to C:\Users\new.
  2. Reboot and log-in to your account. Now you can delete useless admin account.

Some more info here:
(edited by @addaleax: Removed link here too, for the same reason)

Anyway it shouldn't matter since it's running from Program Files and not users.

Nope. Npm uses appdata folder because it's a global module but running from program files. Also you can see that from your console output:

C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node
_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of data [C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcryp
t\build\bcrypt_lib.vcxproj]
c:\users\mesos_000\.node-gyp\0.12.7\deps\uv\include\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory (..\src\bcrypt_nod
e.cc) [C:\Users\mesos_000\AppData\Roaming\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj]

Steps to update npm on Windows:

  1. cmd
  2. npm i -g npm@3.2.0 (global update)
  3. cd "C:\Program Files\nodejs" and npm i npm@3.2.0
  4. npm -v (must be 3.2.0)

More info:
https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

@mesosteros

Managed to do what I wanted with a symlink created.

@Sogl
Sogl commented Aug 19, 2015

@mesosteros, Can you describe what you have done?

@mesosteros

@Sogl I did it like so:

Run Command Prompt (as administrator):
cd C:\Users
mklink /d mesos mesos_000

Then run the Developer Command Prompt installed with Visual Studio 2015 (from the start menu -> applications), also as administrator, going to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\

and running the command vcvarsall.bat amd64

Finally, I created a completely new phoenix project in my elixir projects folder, added

{:addict, ">= 0.1.0"}

Then the part where I was getting the error:

mix deps.get
mix deps.compile comeonin

and pronto.

@dekarguy

Windows 7, Visual Studio 2013 Professional, python 2.7.3, tried doing

npm install kafka-node

Both it failed gloriously, all coming down to this one

npm install snappy

Went through a ton of instructions on how to set things up, got the Windows SDK 7.1, the Microsoft Build Tools 2013 and thing seem to progress well, then I finally get this error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(507,5): error MSB8008: Specified platform toolset (v120) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [D:\sample\node_modules\snappy\build\deps\snappy\snappy.vcxproj]

For the life of me I can't get past this, check a couple things on the internet, and still can't find a way to get around it, even though node-gyp and pangyp say they support VS2013 on Windows 7

I ended up finding this page: https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/

Went through the additional steps, setting msvs_version to 2010 and installing VS2010 + SP1

Voila, everything installs.

I need to make instructions for the rest of my development team to set this up, and having them install Windows SDK (seems unavoidable), VS2010 (seems avoidable) and setting up an msvs_version seems like a whole heck of a lot more per-user setup than should be neccesary

@luisrudge

my current setup is this:

  • Install visual studio with the visual c++ option enabled
  • install python2
  • setx GYP_MSVS_VERSION 2015 (i'm using visual studio 2015)

after that, everything runs just fine.

@Sogl
Sogl commented Aug 19, 2015

@mesosteros, Good! I'll try it today on my VM.

@dekarguy, v120 = vs 2012
Did you try to specify vs 2013 version with --msvs_version=2013? I didn't install vs 2010 in my last configuration.

@dekarguy

@Sogl Definitely tried with --msvs_version=2013, v120 is actually 2013, really confusing and annoying

@luisrudge setx GYP_MSVS_VERSION 2013 didn't help

@luisrudge

it's GYP_MSVS_VERSION

@dekarguy

fixed my typo and no dice

@luisrudge

:( Did you install the visual c++ thing?

@thorn0
thorn0 commented Aug 20, 2015

On my Windows 7 x64, node-gyp works fine with VS2015 without setting GYP_MSVS_VERSION. If we summarize what's been written in this issue about VS2015, we'll get only two important points to check:

  • The C++ part of the VS was installed. By default, it isn't.
  • The user profile folder is named only in English letters. No other languages, no characters like underscore (_) etc.
@thorn0
thorn0 commented Aug 20, 2015

@luisrudge Are you sure GYP_MSVS_VERSION is really required? Doesn't it work for you without it? What's your OS?

@ProtomotoReal

win 8.1 x64
installed Python compiler
installed npm 3.2
installed Visual Studio Express 2105
installed Windows 7 SDK
added user with latin-only name

it compiles!
Run cmd NOT as admin (user with latin-only name in dir path)
cmd:
SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140 - some problems with my PATH
set GYP_MSVS_VERSION 2015
npm install

and it's done! (problem was with compiling bcrypt)
Thanks a lot for all advises! Hope my info will be useful

@dekarguy

@ProtomotoReal Thank you!!!

I was able to run a normal cmd window (not the Windows SDK 7.1 prompt)
SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120

I didn't need to set the GYP_MSVS_VERSION, nor the npm config msvs_version variable

It looks like for my team to get set up on Windows 7 + Visual Studio 2013 that the steps will be

Install Python 2.7
npm set python C:\Python27\python.exe --global
Install Windows 7 SDK
SET VCTargetsPath=C:\Program Files (x86)\MSBUILD\Microsoft.Cpp\v4.0\V120 npm install

Thank you all for the help, I think we can all agree that making this easier would be grand

@dKab
dKab commented Jan 26, 2016

Oh my god, I'm so sick of this nodegyp bullshit. It seemed I solved this problem last time, but now I'm trying to install another project and here we go again. This is so infuriating!

C:\Falcon\pres-schedule\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
bufferutil.cc
C:\Falcon\pres-schedule\node_modules\nan\nan.h(263): error C2995: 'v8::Local _NanEnsureLocal(v8::Local)': function template has already been defined [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_object_wrap.h(8): note: see declaration of 'node'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(43): note: could be 'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,char *,size_t)'
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(31): note: or 'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,v8::Localv8::String,node::encoding)'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object' [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution was ambiguous
C:\Falcon\pres-schedule\node_modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(8): note: see declaration of 'node::Buffer'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\Falcon\pres-schedule\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Falcon\pres-schedule\node_modules\bufferutil
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:bufferutil@1.1.0 bufferutil@1.1.0 install: node-gyp rebuild
npm WARN install:bufferutil@1.1.0 Exit status 1

utf-8-validate@1.1.0 install C:\Falcon\pres-schedule\node_modules\utf-8-validate
node-gyp rebuild

C:\Falcon\pres-schedule\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
validation.cc
C:\Falcon\pres-schedule\node_modules\nan\nan.h(263): error C2995: 'v8::Local _NanEnsureLocal(v8::Local)': function template has already been defined [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_object_wrap.h(8): note: see declaration of 'node'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(43): note: could be 'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,char *,size_t)'
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(31): note: or 'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,v8::Localv8::String,node::encoding)'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object' [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Falcon\pres-schedule\node_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution was ambiguous
C:\Falcon\pres-schedule\node_modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
C:\Users\Dmitry_Kabardinov.node-gyp\4.2.3\include\node\node_buffer.h(8): note: see declaration of 'node::Buffer'
C:\Falcon\pres-schedule\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\Falcon\pres-schedule\node_modules\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Dmitry_Kabardinov\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Falcon\pres-schedule\node_modules\utf-8-validate
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:utf-8-validate@1.1.0 utf-8-validate@1.1.0 install: node-gyp rebuild
npm WARN install:utf-8-validate@1.1.0 Exit status 1

What am I supposed to do now? I already installed both SDKs - that's what helped me last time. I still have them. What can I do now, to make npm install work??

@bnoordhuis
Member

@dKab That error has nothing to do with node-gyp. It looks like you're trying to install a version of bufferutil / utf-8-validate that is using an outdated version of nan. Latest version of utf-8-validate is 1.2.1, try installing that.

@xgenvn
xgenvn commented Jan 26, 2016

@dKab maybe you should update to latest node version as well. Last time I did an update and build errors went away.
And people please, use Gist, attached files or similar services instead of copy full of compile output on here.

@dandv
dandv commented Jan 31, 2016

How much disk space does this VS crap (sorry) actually require? The install splash screen claims 4GB.

image

Note also how you can't disable the greyed out Join the Visual Studio Experience Improvement program.

@galeksandrp

@mousetraps Did you mean 10.0.10150.0, not 10.10150.0?

@mousetraps
Contributor

@galeksandrp yes, good catch - fixed in my comment ๐Ÿ˜ƒ

@mousetraps
Contributor

@dandv not sure about the specifics of the installer, but I presume that the size on disk also includes some setup caching. and as mentioned above, future releases should not require you to select the full Windows 10 SDK. re: experience improvement program - this is standard practice for our technical preview builds. RTM will offer this option.

@galeksandrp

@dandv You can try Default install, which is uses less space because installs only ucrt part of Windows 10 SDK, and then create symlinks, IWFM.

mklink /d "%ProgramFiles(x86)%\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.UniversalCRT.Debug\10.0.10240.0" "%ProgramFiles(x86)%\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.UniversalCRT.Debug\10.0.10150.0"
mklink /d "%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.10240.0" "%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.10150.0"
mklink /d "%ProgramFiles(x86)%\Windows Kits\10\Lib\10.0.10240.0" "%ProgramFiles(x86)%\Windows Kits\10\Lib\10.0.10150.0"
mklink /d "%ProgramFiles(x86)%\Windows Kits\10\Source\10.0.10240.0" "%ProgramFiles(x86)%\Windows Kits\10\Source\10.0.10150.0"

NPM update is not necessary for using npm config set msvs_version or GYP_MSVS_VERSION.
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7 /v 14.0 /t REG_EXPAND_SZ /d ^%programfiles(x86)^%"\Microsoft Visual Studio 14.0\\"

@dondetelj

Open up a GIT CMD window and run npm install node-gyp It needs the GIT commands to clone properly, assuming all other components have been installed and are correctly in your path.

@cloidjgreen

So here is a question. I needed to uninstall Visual Studio 2015 in order to install the fixes for this problem.

Now I have VS in my App list and appear to have some left over directories in Program Files (86) but no Common Tools folder error found on attempts to start VS.

Is it Node or VS, neither the twain shall meet or can VS 2015 be reinstalled when, if i ever need it?

Thanks

@mousetraps
Contributor

@cloidjgreen - please see the instructions in our node guidelines repo for updated VS install steps. There is also a PR open to update the node-gyp readme with these simplified steps.

@cloidjgreen

Thank you,

Seemed to work perfectly

On Thu, Feb 4, 2016 at 1:45 PM, Sara Itani notifications@github.com wrote:

@cloidjgreen https://github.com/cloidjgreen - please see the
instructions in our [node guidelines repo] for updated VS install steps (
https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#prerequisites).
There is also a PR open to update the node-gyp readme with these simplified
steps.

โ€”
Reply to this email directly or view it on GitHub
#629 (comment).

Cloid John Green

@RodrigoBalest

In addition to @mousetraps comment, this other comment also helped me to make it work.

@teltploek

Hi

To ease the pain for the developers at our firm, I've started a repo that can check the local system for missing dependencies and report back with humanly understandable error messages for when dependencies aren't sufficient for node-gyp (the concept is heavily inspired by yeoman doctor)

I'm not entirely sure of how I'm going to crack the nut of writing a test that can point out a missing Visual C++ installation. Do you people have any input on how to write that test? Should I look in the registry? Other things? Any input is appreciated.

@justrhysism

@teltploek Does your firm allow open source development? Such a repo would definitely be useful to the Windows Node community. I imagine that you're also more likely to get contributions.

@mhair mhair referenced this issue in olefredrik/FoundationPress Mar 3, 2016
Closed

gulp file errors, FP 2.5, npm run watch, Windows 7 x64 #748

@rcorzogutierrez

Work for me!!!!
1- Install VC++ Build Tools Technical Preview, choose Custom Install, and select both Windows 8.1 and Windows 10 SDKs.
2- Install Python 2.7, and add it to your PATH
3- npm config set python python2.7
4- npm config set python C:\Python27\python.exe
5- set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

Thank a lot @mousetraps

@mjomble
mjomble commented Mar 16, 2016

@mousetraps thanks for your work on this! :)

A question - will the RTM version of the Build Tools installer also let me specify where it will install and take up the 4-7 GB of space? It'd be great if there was an option that would take as little space on the C: drive as possible, ideally zero.
My 60GB SSD that I use as the system disk is already pushed to its limits by numerous applications that refuse to be installed anywhere else :)

@piotr-cz

So it effectively means 7GB of dependencies to install https://github.com/lovell/sharp.
I'm going back to tool using ImageMagick (70MB)

@aayushkapoor206

@piotr-cz Use sharp in production environment, it's much faster and more reliable.

@piotr-cz

I wanted to use it in gulp build script to process images.
Anyway they may use node-pre-gyp in future (lovell/sharp#186).
Apparently sharp should contain pre-compiled binaries for Windows since v0.12, but somehow during installation it's trying to build these anyway.

@flapenguin

I have VS2015 installed and solution I've found is to run "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" to setup env variables in cmd shell.

@Noaiii
Noaiii commented Mar 23, 2016

OMG!
extract:ws โ†’ gunzTarPerm โ–„ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:ws โ†’ gunzTarPerm โ–„ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:ws โ†’ gunzTarPerm โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:redis โ†’ gunzTarPe โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–Œ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:socket.io โ†’ gunzT โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆextract:uglify-js โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ extract:socket.io-client โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ extract:zeparser โ–€ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ finalize:zeparser โ†’ final โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆinstall โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ

ws@0.4.32 install G:\Program\node\chatroom\node_modules\ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

install:uglify-js โ–Œ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
G:\Program\node\chatroom\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Users\rwn1\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
ๅœจๆญค่งฃๅ†ณๆ–นๆกˆไธญไธ€ๆฌก็”Ÿๆˆไธ€ไธช้กน็›ฎใ€‚่‹ฅ่ฆๅฏ็”จๅนถ่กŒ็”Ÿๆˆ๏ผŒ่ฏทๆทปๅŠ โ€œ/mโ€ๅผ€ๅ…ณใ€‚
bufferutil.cc
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2039: 'ExternalAsc
iiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroom\no
de_modules\ws\build\bufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2065: 'ExternalAsc
iiStringResource': undeclared identifier [G:\Program\node\chatroom\node_modules
\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2065: 'resource':
undeclared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferuti
l.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2433: 'NanNew': '_
_forceinline' not permitted on data declarations [G:\Program\node\chatroom\node
modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2365: 'NanNew': re
definition; previous definition was 'function' [G:\Program\node\chatroom\node_m
odules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2448: 'NanNew': fu
nction-style initializer appears to be a function definition [G:\Program\node\c
hatroom\node_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(430): error C2766: explicit spe
cialization; 'v8::Localv8::StringObject NanNew<v8::StringObject,v8::Local<v8:
:String>>(v8::Localv8::String)' has already been defined [G:\Program\node\cha
troom\node_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(420): note: see previous defi
nition of 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(447): error C2995: 'v8::Local<v
8::RegExp> NanNew(v8::Localv8::String,v8::RegExp::Flags)': function template
has already been defined [G:\Program\node\chatroom\node_modules\ws\build\buffer
util.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(438): note: see declaration o
f 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(459): error C2995: 'v8::Local<v
8::RegExp> NanNew(v8::Localv8::String,v8::RegExp::Flags)': function template
has already been defined [G:\Program\node\chatroom\node_modules\ws\build\buffer
util.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(450): note: see declaration o
f 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C3083: 'smalloc': t
he symbol to the left of a '::' must be a type [G:\Program\node\chatroom\node_m
odules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C2039: 'FreeCallbac
k': is not a member of 'node' [G:\Program\node\chatroom\node_modules\ws\build\b
ufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_object_wrap.h(8): note: see d
eclaration of 'node'
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C2061: syntax error
: identifier 'FreeCallback' [G:\Program\node\chatroom\node_modules\ws\build\buf
ferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(770): error C2065: 'callback':
undeclared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferuti
l.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(770): error C2065: 'hint': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(777): error C2665: 'node::Buffe
r::New': none of the 4 overloads could convert all the argument types [G:\Progr
am\node\chatroom\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(43): note: could be
'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate ,char *,size_t)'
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(31): note: or
'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,v8::Local<v8::Str
ing>,node::encoding)'
G:\Program\node\chatroom\node_modules\nan\nan.h(777): note: while trying to m
atch the argument list '(v8::Isolate *, const char *, uint32_t)'
G:\Program\node\chatroom\node_modules\nan\nan.h(781): error C2440: 'return': ca
nnot convert from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object' [G:\P
rogram\node\chatroom\node_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(781): note: No constructor co
uld take the source type, or constructor overload resolution was ambiguous
G:\Program\node\chatroom\node_modules\nan\nan.h(788): error C2039: 'Use': is no
t a member of 'node::Buffer' [G:\Program\node\chatroom\node_modules\ws\build\bu
fferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(8): note: see declar
ation of 'node::Buffer'
G:\Program\node\chatroom\node_modules\nan\nan.h(788): error C3861: 'Use': ident
ifier not found [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vcxp
roj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1728): error C2039: 'IsExternal
Ascii': is not a member of 'v8::String' [G:\Program\node\chatroom\node_modules
ws\build\bufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2039: 'ExternalAs
ciiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroom\n
ode_modules\ws\build\bufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C4430: missing typ
e specifier - int assumed. Note: C++ does not support default-int [G:\Program\n
ode\chatroom\node_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2143: syntax erro
r: missing ';' before '
' [G:\Program\node\chatroom\node_modules\ws\build\buffe
rutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1730): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1730): error C2039: 'GetExterna
lAsciiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroo
m\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): error C2227: left of '->
data' must point to class/struct/union/generic type [G:\Program\node\chatroom\n
ode_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): note: type is 'unknown
-type'
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\bufferutil.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): error C2227: left of '->
length' must point to class/struct/union/generic type [G:\Program\node\chatroom
\node_modules\ws\build\bufferutil.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): note: type is 'unknown
-type'
validation.cc
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2039: 'ExternalAsc
iiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroom\no
de_modules\ws\build\validation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2065: 'ExternalAsc
iiStringResource': undeclared identifier [G:\Program\node\chatroom\node_modules
\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2065: 'resource':
undeclared identifier [G:\Program\node\chatroom\node_modules\ws\build\validatio
n.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2433: 'NanNew': '

_forceinline' not permitted on data declarations [G:\Program\node\chatroom\node
_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2365: 'NanNew': re
definition; previous definition was 'function' [G:\Program\node\chatroom\node_m
odules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(409): error C2448: 'NanNew': fu
nction-style initializer appears to be a function definition [G:\Program\node\c
hatroom\node_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(430): error C2766: explicit spe
cialization; 'v8::Localv8::StringObject NanNew<v8::StringObject,v8::Local<v8:
:String>>(v8::Localv8::String)' has already been defined [G:\Program\node\cha
troom\node_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(420): note: see previous defi
nition of 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(447): error C2995: 'v8::Local<v
8::RegExp> NanNew(v8::Localv8::String,v8::RegExp::Flags)': function template
has already been defined [G:\Program\node\chatroom\node_modules\ws\build\valida
tion.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(438): note: see declaration o
f 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(459): error C2995: 'v8::Local<v
8::RegExp> NanNew(v8::Localv8::String,v8::RegExp::Flags)': function template
has already been defined [G:\Program\node\chatroom\node_modules\ws\build\valida
tion.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(450): note: see declaration o
f 'NanNew'
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C3083: 'smalloc': t
he symbol to the left of a '::' must be a type [G:\Program\node\chatroom\node_m
odules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C2039: 'FreeCallbac
k': is not a member of 'node' [G:\Program\node\chatroom\node_modules\ws\build\v
alidation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_object_wrap.h(8): note: see d
eclaration of 'node'
G:\Program\node\chatroom\node_modules\nan\nan.h(767): error C2061: syntax error
: identifier 'FreeCallback' [G:\Program\node\chatroom\node_modules\ws\build\val
idation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(770): error C2065: 'callback':
undeclared identifier [G:\Program\node\chatroom\node_modules\ws\build\validatio
n.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(770): error C2065: 'hint': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\validation.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(777): error C2665: 'node::Buffe
r::New': none of the 4 overloads could convert all the argument types [G:\Progr
am\node\chatroom\node_modules\ws\build\validation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(43): note: could be
'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate ,char *,size_t)'
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(31): note: or
'v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate *,v8::Local<v8::Str
ing>,node::encoding)'
G:\Program\node\chatroom\node_modules\nan\nan.h(777): note: while trying to m
atch the argument list '(v8::Isolate *, const char *, uint32_t)'
G:\Program\node\chatroom\node_modules\nan\nan.h(781): error C2440: 'return': ca
nnot convert from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object' [G:\P
rogram\node\chatroom\node_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(781): note: No constructor co
uld take the source type, or constructor overload resolution was ambiguous
G:\Program\node\chatroom\node_modules\nan\nan.h(788): error C2039: 'Use': is no
t a member of 'node::Buffer' [G:\Program\node\chatroom\node_modules\ws\build\va
lidation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\node_buffer.h(8): note: see declar
ation of 'node::Buffer'
G:\Program\node\chatroom\node_modules\nan\nan.h(788): error C3861: 'Use': ident
ifier not found [G:\Program\node\chatroom\node_modules\ws\build\validation.vcxp
roj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1728): error C2039: 'IsExternal
Ascii': is not a member of 'v8::String' [G:\Program\node\chatroom\node_modules
ws\build\validation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2039: 'ExternalAs
ciiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroom\n
ode_modules\ws\build\validation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C4430: missing typ
e specifier - int assumed. Note: C++ does not support default-int [G:\Program\n
ode\chatroom\node_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2143: syntax erro
r: missing ';' before '
' [G:\Program\node\chatroom\node_modules\ws\build\valid
ation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1729): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\validation.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1730): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\validation.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1730): error C2039: 'GetExterna
lAsciiStringResource': is not a member of 'v8::String' [G:\Program\node\chatroo
m\node_modules\ws\build\validation.vcxproj]
C:\Users\rwn1.node-gyp\4.4.1\include\node\v8.h(2081): note: see declaration
of 'v8::String'
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\validation.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): error C2227: left of '->
data' must point to class/struct/union/generic type [G:\Program\node\chatroom\n
ode_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1731): note: type is 'unknown
-type'
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): error C2065: 'ext': unde
clared identifier [G:\Program\node\chatroom\node_modules\ws\build\validation.vc
xproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): error C2227: left of '->
length' must point to class/struct/union/generic type [G:\Program\node\chatroom
\node_modules\ws\build\validation.vcxproj]
G:\Program\node\chatroom\node_modules\nan\nan.h(1732): note: type is 'unknown
-type'
install:uglify-js โ–Œ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ runTopLevelLifecycles โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ chatrooms@0.0.1 G:\Program\node\chatroom
โ”œโ”€โ”€ mime@1.2.11
โ””โ”€โ”ฌ socket.io@0.9.17
โ”œโ”€โ”€ base64id@0.1.0
โ”œโ”€โ”€ policyfile@0.0.4
โ”œโ”€โ”€ redis@0.7.3
โ””โ”€โ”ฌ socket.io-client@0.9.16
โ”œโ”€โ”ฌ active-x-obfuscator@0.0.1
โ”‚ โ””โ”€โ”€ zeparser@0.0.5
โ”œโ”€โ”€ uglify-js@1.2.5
โ”œโ”€โ”ฌ ws@0.4.32
โ”‚ โ”œโ”€โ”€ commander@2.1.0
โ”‚ โ”œโ”€โ”€ nan@1.0.0
โ”‚ โ”œโ”€โ”€ options@0.0.6
โ”‚ โ””โ”€โ”€ tinycolor@0.0.1
โ””โ”€โ”€ xmlhttprequest@1.4.2

runTopLevelLifecycles โ– โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ npm WARN EPACKAGEJSON chatrooms@0.0.1 No repository field.
runTopLevelLifecycles โ–„ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ npm WARN EPACKAGEJSON chatrooms@0.0.1 No license field.
runTopLevelLifecycles โ–Œ โ•ขโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
G:\Program\node\chatroom>

@xgenvn
xgenvn commented Mar 23, 2016

@Noaiii oh, really, so you still want to pollute this post by your console output. Gist or plenty of paste sharing tools out there should work. Please send us an URL instead of whole bunch f**king log.

@MylesBorins
Member

@xgenvn try and keep it civil

@xgenvn
xgenvn commented Mar 23, 2016

@TheAlphaNerd
I remember that I request very sincerely not to post every log into this post, and people seem ignoring that. It doesnt make any sense that some solutions have already there and someone because of lacking searching skill or just out of patience, then start throwing the logs into this long long issue. And github isnt designed to optimize for such problem.
I'll keep civil and be nice, but for once I have to tell it the critical and crucial way.

@msangel
msangel commented Mar 29, 2016

So many different instuctions, tryied a lot of them. Still not working on windows 10.

@shpros
shpros commented Mar 30, 2016

Thank you @mousetraps for all of your detailed investigation on this issue. Your instructions were almost what I needed. Even after that, though, it still wasn't working for me on Windows 7, but I searched a little more and found @ericgrosse 's instructions , which are what finally worked for me. I needed to give the full path in the npm set config python step.

@msangel msangel referenced this issue in ZECTBynmo/node-core-audio Mar 30, 2016
Open

Can't build on Windows #55

@ghost
ghost commented Mar 31, 2016

@luisrudge, what is the expected outcome of this thread? Are we expecting that Microsoft should ship the C++ compiler with Windows, like Linux based OS comes with gcc and BSD likes come with clang? Or are we expecting that package devs should provide precompiled binaries like phantom.js and node-sass?

If the initial expectations haven't been met, can we open a separate Part 2 of this issue and lock this one down (since GitHub has no pagination)?

@MylesBorins
Member

@jasonwilliams200OK not sure if ironic or not... did you see yesterday's Microsoft announcement about the new linux sub system?

To me the main goal of this thread was to make the experience of getting things to compile on windows not completely non intuitive and painful. I don't think we are quite there yet. I would imagine this thread should be closed when our documentation is updated to make the experience less painful for new devs

@ghost
ghost commented Mar 31, 2016

I don't think we are quite there yet.

First, what problem are we solving here? I mean, what exactly is the outcome in terms of process improvement concerning node-gyp?

Here is my take on problem:

On Unix, npm install <some-package-with-c++-module> requires a C++ compiler, unless there is precompiled binary available via custom build process (phantom.js, node-sass etc.). On Windows this is exactly same. The difference is: Windows doesn't have a C++ compiler preinstalled, while most Unix are shipped with one. The pain point for end user is to "install" VS on Windows. This has been somewhat addressed via build tools but the actual pain point of "install a compiler on every machine to consume node.js packages with c++ modules" remains. Anecdotally, some Ruby gems with C++ modules possess the same behavior for users.

Am I correct in elaborating the problem so far?

Second take on solution apart from Microsoft to ship C++ compiler on every Windows box..:

Generally, compiling from source is not a good idea on every machine / install target. Pre-build binaries with checksums/jwt-token for verification (and transparency purposes) is a way to go. There needs to be an infrastructure in place to make it happen, preferably first-hand standard issue by node.js team, and then package maintainers should be encouraged to use that method. node-pre-gyp is just half way there.

@MylesBorins
Member

@jasonwilliams200OK I think you are close but it can be abstracted one step higher... it is hard to get a working toolchain on windows, and it is not always obvious what is going wrong. This can include the c++ compiler and need to install VS, but can also include problems such as which version of python to install and how to get it in your path correctly.

AFAIK @mousetraps has created an update to our official readme that helps to walk people through it... I tried to dig it up for the original response but couldn't find it. I think the major blocker was making sure the suggested build tool was properly tested in all environments

@ghost
ghost commented Mar 31, 2016

@TheAlphaNerd, #867 is what you were looking for I suppose. Hopefully that will be merged soon and give closure to masses (before the comment count on this thread exceed 500)

such as which version of python to install

True. I think python dependency itself is pretty unfortunate when gyp/gn are build-systems of choice, merely on the merits of aligning with Chromium team: nodejs/NG#24 (comment).

@rgbkrk
rgbkrk commented Apr 6, 2016

@mousetraps would you or anyone on the team be able to investigate Windows builds on https://github.com/JustinTulloss/zeromq.node? I'd like to ship an Electron app with prebuilt bindings for Windows and am fairly flummoxed.

@teltploek

@justrhysism and everyone else:
Sorry I haven't reacted earlier. This is a follow up on this post:

Yes of course we're open to open sourcing it. It's already a repo we've forked a great deal out of :-)
If I'm not able to find a solution, the tool will never be finished, and it will never be able to help anyone.

I've now transferred the ownership of the repo to myself, and you can find it here:
https://github.com/teltploek/doctor

The issue I'm having trouble with it this: Find out it correct version of Visual Studio is installed. Any help anyone could provide would be appreciated.

@yosiasz
yosiasz commented Apr 8, 2016

working for me in Windows 2008 server! thanks @mousetraps!!!

@MarinAngelo

Issue fixed? - Not at all!
After installing SDK and Python I have receive the following message, do I really want to install visual studio?:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [M:\Websites\Evalu\Angular\yo\angular-full-stack\node_
modules\utf-8-validate\build\binding.sln]

@bsclifton

Sorry for yet another post in an already massive thread- this might be a good one for @luisrudge to capture at the top

I believe I found a workaround for folks having a bad time with VS2015, specifically folks that have that have more than one version installed (or had more than one, but uninstalled it later). Details captured in #679 (comment)

@ghost
ghost commented Apr 18, 2016

npm ERR! Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'

Thanks for the waste of time, migrating the project to python right now.

@gohackfelipe

this issue was fixed??

@Chris2011

I tried these steps, step by step: https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/

but often I got similar errors :/.

@Chris2011

got hubpress not to run. Will do more research and will check it again...

@Chris2011

Got this issue, when I try npm install in a hubpress.io fork:

gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projekte\Others\chrizzly.info\node_modules\gulp-jest\node_modules\jest-cli\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v4.4.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projekte\Others\chrizzly.info\npm-debug.log
@ghost
ghost commented Apr 21, 2016

@Chris2011
In Command Prompt:

SET PATH %ProgramFiles(x86)%\msbuild\14.0\bin;%PATH%
npm i contextify

since node-gyp fails to use the latest available msbuild installed on the system..

The other option is to add %ProgramFiles(x86)%\msbuild\14.0\bin to system environment PATH before anything else.

@Chris2011

ok let me check, thx.

@Chris2011
Chris2011 commented Apr 21, 2016 edited

@jasonwilliams200OK Ok I didn't have the 14.0. I installed it and I added it to the PATH at the very first as you said. Then I tried npm i contextitfy and I got I think the same error:

C:\Projekte\Others\chrizzly.info>npm i contextify
npm WARN package.json hubpress@0.3.0 No description
npm WARN package.json hubpress@0.3.0 No repository field.
npm WARN package.json hubpress@0.3.0 No README data
npm WARN package.json hubpress@0.3.0 No license field.
|
> contextify@0.1.15 install C:\Projekte\Others\chrizzly.info\node_modules\contextify
> node-gyp rebuild


C:\Projekte\Others\chrizzly.info\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermรถglichen, mรผssen Sie den Schalter "/m" hinzufรผgen.
C:\Projekte\Others\chrizzly.info\node_modules\contextify\build\contextify.vcxproj(20,3): error MSB4019: Das importierte Projekt "C:\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in der <Import>-
Deklaration korrekt und die Datei auf dem Datentrรคger vorhanden ist.
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:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projekte\Others\chrizzly.info\node_modules\contextify
gyp ERR! node -v v4.4.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "contextify"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projekte\Others\chrizzly.info\npm-debug.log
@ghost
ghost commented Apr 21, 2016

Ok I didn't have the 14.0

Did you install build tools 2015? See the first post of this thread..

@Chris2011

Ok I will check this ticket: #629 (comment)

@Chris2011

Very great, that worked :) thx for the hint.

@chrisahardie
chrisahardie commented Apr 21, 2016 edited

I'm not able to install the build tools 2015 as I already have VS 2015 Update 2 installed. From the horse's mouth:

Note: These components are the same version as the ones installed by the Visual Studio 2015 Update 1 setup. As a result, the C++ Build Tools installer will not run on a machine with Visual Studio 2015 already installed on it. The reverse (i.e. upgrade to Visual Studio) is supported

I am attempting to modify my VS 2015 installation, but I don't see the option for the Windows 8 SDK. Under Windows and Web Development -> Universal Windows App Development Tools I see Windows 10 SDK. I'm on a Windows 7 machine, what else can I do to get the Windows 8 SDK? Must I really uninstall VS to do this?

@ghost
ghost commented Apr 21, 2016 edited

You can download Windows 8 SDK separately:
https://developer.microsoft.com/en-us/windows/downloads/windows-8-sdk.

The reason for "why Windows 8 SDK is even needed on Windows 10, when Windows 10 SDK is there" is because Win8 SDK is hardcoded in common.gypi file and the gyp official workaround is to manually apply this patch: https://codereview.chromium.org/1247493002/patch/40001/50001.

@galeksandrp
galeksandrp commented Apr 22, 2016 edited

@jasonwilliams200OK This is buildfile of Chromium browser, not gyp source code.

@ghost
ghost commented Apr 22, 2016

@galeksandrp, ICYMI, gyp was originally built for chromium by chromium people.

@galeksandrp
galeksandrp commented Apr 22, 2016 edited

@jasonwilliams200OK, yes, but file from patch you referred is .gypi file, when gyp is written in python. And look, there are references to DirectX SDK in it (which obviously not needed to be used in crossplatform buildsystem.

@ghost
ghost commented Apr 22, 2016

there are references to DirectX SDK in it

@galeksandrp, the patch I linked is highlighting the portion of gypi fix which anyone can apply locally. You missed the point, which was this particular issue (among dozens of others discussed in this thread) can be fixed in gyp.

To your meticulous concern, in node-gyp crossplatform buildsystem scenario, modify ~\.node-gyp\<version>\include\node\common.gypi or node_modules\node-gyp\addon.gypi file to add these dirs (suiting your drive letter and exact version of latest available SDK):

'include_dirs': [
  'C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um',
  'C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared',
  'C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt',
  'C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt'
],

This will make the node.js package with C++ add-on compile with Windows 10 SDK, without having to install Windows 8 SDK.

@ericgrosse
ericgrosse commented Apr 22, 2016 edited

For those still having node-gyp issues, please try the following:

Step 1

Make sure you have the latest version of Node. Right now it is v5.11.0 Stable and includes an up-to-date version of npm. Even if you apply legitimate fixes found in this thread, you will still get node-gyp errors using an outdated version of Node or npm.

Step 2

Use Mousetrap's solution, found here. You don't even need to read her full post, just blindly follow steps 1-4 that she provides.

Step 2

If you're getting an error ImportError: No module named gyp, it means you need to reconfigure how npm accesses the python shell. The instructions are given here.


I have tried this setup on three different OSes (Windows 7, Windows 8.1, Windows 10) and it always works. You don't need Visual Studio, just the Visual C++ Build Tools 2015.

As an additional note: I always run npm install from a git bash terminal that's run as administrator.

@fskreuz
fskreuz commented Apr 24, 2016 edited

Confirming that @mousetraps method still works as of the time of writing with no additional steps.

OS: Microsoft Windows 10 Pro N (Build 10586)
Node: 5.11.0
npm: 3.8.6

Notes:

  • Git Bash isn't required to run as administrator.
  • No Visual Studio required.
  • No Windows SDK required.
  • Install the Visual C++ Build Tools 2015 Technical Preview, not Visual C++ Build Tools 2015.
    • If you installed it without having to select "Custom", you probably got the wrong one installed.
    • If you encounter an error containing MSB4019, you probably got the wrong one installed.
  • No environment variables required.
    • You only need npm config set msvs_version 2015 --global
    • If you set GYP_MSVS_VERSION, you can unset that.
    • If you did some env var or regedit hacking like this, you probably need to undo those.
@barocsi
barocsi commented May 1, 2016 edited

According to @fskreuz if you had this set during your struggle, make sure its updated to the most recent version
SET VCTargetsPath=C:\Program Files (x86)\MSBUILD\Microsoft.Cpp\v4.0\V120
for me its v140

@am11
am11 commented May 1, 2016 edited

@barocsi, note that if you have latest msbuild in PATH, then you do not need to set VCTargetsPath:

SET PATH=C:\Program Files (x86)\MSBUILD\14.0\Bin;%PATH%

In fact, you should rather unset it if it is set as process, user or machine env variable; because if you have multiple VS versions installed, fixing this environment variable to a version will led to other kinds of build errors. VCTargetsPath is usually set in vcxproj explicitly or via the MSBuild default .targets.

@barocsi
barocsi commented May 1, 2016

Then it might have only worked for my particular bad chain of setups. Will clean up again, thanks.

@Ucodia
Ucodia commented May 2, 2016 edited

Where did @mousetraps comment go? It contained the full step by step guide but it looks like it has been deleted.

Edit: My bad, a low connectivity prevented my browser from showing the comment as @jasonwilliams200OK mentioned.

@ghost
ghost commented May 2, 2016

@Ucodia, that comment is still there. The page size is crazy long though, probably that's why browser must be acting funny. I vouch to open a part two of this issue for persistently unhappy users. ๐Ÿ˜„

@frankred
frankred commented May 4, 2016 edited

Having done the following steps still does not work:

  1. Installing Windows10
  2. Installing node v.4.4.3 (LTS)
  3. Updating npm to 3.8.8
  4. Installed python 2.7.11 and added to path
  5. Installing "VC++ Build Tools Technical Preview" https://www.microsoft.com/en-us/download/confirmation.aspx?id=49983
  6. npm install node-expat@2.3.13

finally getting this error:

Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermรถglichen, mรผssen Sie den Schalter "/m" hinzufรผgen.
  xmlparse.c
  xmltok.c
  xmlrole.c
  win_delay_load_hook.c
..\..\..\deps\libexpat\lib\xmlparse.c(5): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [C:\_js\cme-co
ntent-crawler-suppilo\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
..\..\..\deps\libexpat\lib\xmltok.c(5): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [C:\_js\cme-cont
ent-crawler-suppilo\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
..\..\..\deps\libexpat\lib\xmlrole.c(5): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [C:\_js\cme-con
tent-crawler-suppilo\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or dir
ectory (compiling source file C:\Users\froth\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c) [C:\_js\
cme-content-crawler-suppilo\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
g

Sorry for spamming more, but is this a node-gyp?

@mikew
mikew commented May 4, 2016

Definitely still not able to build things here without Visual Studio proper.

Installed:

  • Windows 10
  • node v5.11.0
  • npm v3.8.6
  • python v2.7.11
  • Microsoft Visual C++ Compiler for Python 2.7
  • Microsoft Visual C++ Build Tools 2015 Technical Preview
  • Windows 8.1 SDK
  • Windows 10 SDK
  • npm config set msvs_version 2015
  • npm config set python python

Test:

npm install node-sass
cd node_modules\node-sass
del vendor\win32-x64-47\binding.node
node scripts\build.js

MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "14.0", "4.0".

Build FAILED.

  MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "14.0", "4.0".

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.20
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\mike\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mike\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\mike\node_modules\node-sass
gyp ERR! node -v v5.11.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Build failed
@Dillybob92
Dillybob92 commented May 14, 2016 edited

So, do we still need to download and install the entire Visual Studio package just to install a couple native node modules that require node-gyp? Seems kind of excessive to me, the VS package is insanely large, takes a bit to install and also installs tons of MYSQL useless packages that you need to uninstall AFTER. Please tell me there is a solution to this. (Obviously, running it on Linux it only needs gcc and some other deps, which is fine) -- but I dev on Windows :(

Also, where the fuck is Ryan Dahl? He should be working on node still. Where did he go?

Edit2: Also why hasn't Github implemented pagination on issue pages? What a mess.

@luisrudge

@Dillybob92 no. You just need to download the msbuild tools: #629 (comment)

@luisrudge

@Dillybob92 BTW, your tone doesn't help anyone.

@Dillybob92
Dillybob92 commented May 14, 2016 edited

@luisrudge My tone? This has been a problem for years and for Ryan Dahl to leave node and leave a mess for the community is a disgrace.

Also, mousetraps post is not really a solution. That's still around 8 Gigabytes of SDK's. I'd rather just install VS 2013 express.. Also, those SDK's installers don't offer a custom installation folder. This is still a major issue that no one seems to address so my tone will stay the same.

@luisrudge

@Dillybob92 I understand it's not ideal, but it is what it is.
It's not 8GB, it's less than 800mb for just the build tools. You don't need the full SDK.

@orangemocha orangemocha added a commit that closed this issue May 17, 2016
@mousetraps @orangemocha mousetraps + orangemocha Update Windows install instructions
* Point to the latest release of the VC++ Build Tools.
* Simplify and consolidate install instructions for all Windows versions.

Fixes: #629
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com>
303932a
@orangemocha orangemocha added a commit that referenced this issue May 17, 2016
@mousetraps @orangemocha mousetraps + orangemocha Update Windows install instructions
* Point to the latest release of the VC++ Build Tools.
* Simplify and consolidate install instructions for all Windows versions.

PR-URL: #867
Fixes: #629
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com>
0880827
@orangemocha
Member

Fixed with 0880827

@AndrewPardoe
Contributor

One more note on this thread: the Visual C++ Build Tools are located here: http://landinghub.visualstudio.com/visual-cpp-build-tools

@am11
am11 commented Jun 10, 2016

@AndrewPardoe thanks for sharing the link.

On that same page, it is mentioned that there is also a NuGet feed available for VC++ latest build tools, which we can incorporate in our node.js build process for targets where there C++ compiler is missing, using nuget.exe (the executable is wget'able from here).
For example, in PowerShell:

# download nuget
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile nuget.exe

# install VC build tools
./nuget install VisualCppTools -source http://vcppdogfooding.azurewebsites.net/nuget/ -Prerelease

Although this is one huge download, but still might come handy for someone to unblock their users from not getting the npm packages installed at all, and automate the build process for them.

@Sebastien-G
Sebastien-G commented Jun 10, 2016 edited

Success installing npm bcrypt module on windows 10

  • nodejs version: 4.4.5
  • npm version: 2.15.5
  • bcrypt version 0.8.7

System 1 (desktop)
Windows 10 - Pro - 64 bits - FRENCH
Intel Core i7-3770 CPU @ 3.40GHz
16 GB RAM

System 2 (laptop)
Dell XPS 15 9550
Windows 10 - Family - 64 bits - FRENCH
Intel Core i7-6700HQ CPU @ 2.60GHz
16 GB RAM


The steps I will detail here, as well as the output, are those from system 1 (but the steps were the same on system 2).
I am not claiming any of these steps are the correct ones, but they do reflect the sequence that led to a successful install of the bcrypt npm module (version 0.8.7, as of june 10, 2016).

STEP 1
Perform full installation of C++ Build Tools 2015 (from: https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official-release-of-the-visual-c-build-tools-2015/)
(I say full install because this is what I did, however I don't claim that the full install is necessary)
Note: this may take a while as the full program is over 4GB

STEP 2
Install Python 2.7.11 (from: https://www.python.org/)
Note: during installation select the "add to PATH" option (which is not selected by default)

STEP 3
Run:
npm config set msvs_version 2015 --global
Note: I ran it as administrator in Windows cmd.exe

STEP 4
In my NodeJS project folder (a little blog app i am writing to learn NodeJS), I then ran the install command:
npm install bcrypt --save

This is the output I got (********** asterisks are simply used to hide my local project folder path):

npm WARN package.json blog@1.0.0 No repository field.
npm WARN package.json blog@1.0.0 No README data

> bcrypt@0.8.7 install D:\**********\blog\node_modules\bcrypt
> node-gyp rebuild


D:\**********\blog\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Gรฉnรฉration des projets individuellement dans cette solution. Pour activer la gรฉnรฉration en parallรจle, ajoutez le commutateur "/m".
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
..\src\bcrypt.cc(232): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data [D:\**********\blog\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(76): warning C4244: 'argument': conversion from 'ssize_t' to 'unsigned char', possible loss of data [D:\**********\blog\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(229): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\**********\blog\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(230): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\**********\blog\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
  win_delay_load_hook.c
     Creating library D:\**********\blog\node_modules\bcrypt\build\Release\bcrypt_lib.lib and object D:\**********\blog\node_modules\bcrypt\build\Release\bcrypt_lib.exp
  Generating code
  Finished generating code
  bcrypt_lib.vcxproj -> D:\**********\blog\node_modules\bcrypt\build\Release\\bcrypt_lib.node
bcrypt@0.8.7 node_modules\bcrypt
+-- bindings@1.2.1
+-- nan@2.3.5

I am now able to run bcrypt() commands in my NodeJS app, they turn out something like:

$2a$10$pDJX6lz6QBVatYCC.KiOJ.q6t6uAlKxRsny9tEPiSHTMhNBIhymW2

I have no way of knowing if these hashes are perfect bcrypt hashes be they look good to me.

I would appreciate any input regarding the importance of the warnings referenced in the output above.

Thanks to all who contributed to this thread :)

@orangemocha
Member

This issue was addressed with the release of the VC++ Build Tools, and an updated list of instructions for Windows developers both in the node-gyp README and in the new https://github.com/Microsoft/nodejs-guidelines repo.

For any further problems, bug reports, suggestions, etc. related to installing/compiling native modules, please open a new issue in this repo, or at https://github.com/nodejs/node, or - if the issue is pertinent to a specific module and not to node/nodegyp in general - in the module's own issue tracker. I believe those avenues will be more productive than continuing to comment on this giant thread, so I am locking it now.

Thanks again to everybody who contributed to the discussion and resolution! ๐Ÿ˜„

@orangemocha orangemocha locked and limited conversation to collaborators Jun 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.