Closed luisrudge closed 8 years ago
+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.
+1 this a world of pain, took me hours to install a project with node_gyp
+1 after 8+ hours of trying, still can't use anything that relies on node-gyp.
:+1: 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.
@TooTallNate any thoughts?
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.
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.
Awesome @TooTallNate. I don't have the skills to understand and support your argument, but I can give you a :+1: 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.
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."
Yeah. There needs to be a better way
@TooTallNate I'm pretty sure you're doing the best work there is for Node support on Windows :+1: :) Could I make a request that we update the wiki page (or add a new wiki page) describing the steps for VS 2015 ?
FYI: npm i c3
still fails. Even with vs2015 installed. @TooTallNate any ideas?
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
I just found out about the environment variable (GYP_MSVS_VERSION ) option here: https://github.com/TooTallNate/node-gyp/issues/339#issuecomment-111011412 , it might help @luisrudge or others. Any other updated happy paths for Windows users? /cc @TooTallNate @isaacs
+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?
+1000 More than two days working to figure out this gyp thing. The problem is I can't give up.
+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 (https://github.com/TooTallNate/node-gyp/issues/644)
Update. VS2013 Community version not helps..https://github.com/TooTallNate/node-gyp/issues/676 created
@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.
@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\Артем>
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?
@Sogl I didn't follow from the beginning. Take a look at Updating npm's bundled node gyp if you already haven't.
Other solution would be to settle a non MSFT compiler and use one that is still available for the plateform.
@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...
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.
@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:
set GYP_MSVS_VERSION=2015
npm install -g gulp-devtools
There is one more suggestion!
@baazoo Just tried things you describe. Same 'v8.h' error =(
One last step that I want to try - install VS 2015 :satisfied:
I also resorted to the workflow @thoroc described (using a VM inside Windows).
@thoroc @b-long
Yep, guys. This problem also has led me to use Vagrant (with VirtualBox) and Scotch Box.
Sorry. The solution can't be "use a vm instead"
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 :)
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)
@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 :smile: . 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.
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.
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?
@mousetraps @paulvanbrenk would you mind taking a look on this thread? :) Thanks!
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)
I intsalled nodejstools in VS 2015 and doing the compile in VS2015, I get the same errors ......
@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 ?
Will do ...
@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 :smiley:
challenge accepted
Nice! Good luck @mousetraps :)
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.
@mousetraps thank you very much! Please keep us posted :)
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 :smiley:
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.
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?
@luisrudge updated my comment above so it's all in one place. And also made the disclaimer much more clear :smiley:
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
@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)
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 https://github.com/TooTallNate/node-gyp/issues/629#issuecomment-128542489 .
@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: https://github.com/TooTallNate/node-gyp/issues/676
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