Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Build fails on windows 8 with VS 2012 #46

Closed
staxmanade opened this issue Oct 31, 2012 · 14 comments
Closed

Build fails on windows 8 with VS 2012 #46

staxmanade opened this issue Oct 31, 2012 · 14 comments

Comments

@staxmanade
Copy link

I'm receiving a build error due to gyp. It appears that there is a new version that should potentially fix this issue nodejs/node-gyp#44 (comment)

I received this trying to npm install tobi. Is there a way to configure the npm systems to use this latest version of node-gyp? If not could you push a new version pointing this latest gyp build?

Thoughts?

Below is the build error I get

C:\Code\temp\3> npm install contextify
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> contextify@0.1.3 install C:\Code\temp\3\node_modules\contextify
> node-gyp rebuild


C:\Code\temp\3\node_modules\contextify>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
es\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(34,5): error MSB8020: The builds tools
for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click t
he Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to b
uild using the Visual Studio 2010 build tools. [C:\Code\temp\3\node_modules\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:236:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.2.8250
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Code\temp\3\node_modules\contextify
gyp ERR! node -v v0.8.12
gyp ERR! node-gyp -v v0.7.0
gyp ERR! not ok
npm ERR! contextify@0.1.3 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the contextify@0.1.3 install script.
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! System Windows_NT 6.2.8250
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "contextify"
npm ERR! cwd C:\Code\temp\3
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Code\temp\3\npm-debug.log
npm ERR! not ok code 0
@piredman
Copy link

piredman commented Nov 8, 2012

I am also receiving this error when execute npm install jquery

I am also using Windows 8 with Visual Studio 2012

@piredman
Copy link

I was able to work around this issue for now by manually upgrading node-gyp to nodejs/node-gyp@63a3426 (v0.7.2 release).

To do this, I navigated to the "nodejs" installation folder (c:\program files\nodejs) in a command window and executed:
npm update node-gyp

This updated the "node_modules" version of node-gyp to v0.7.3 that has the fix. Once this was done I could successfully execute a npm install jquery without the error in this issue.

@antonywu
Copy link

antonywu commented Dec 5, 2012

@piredman Thanks for the solution, working great with installing sqlite3 too

@alexbeletsky
Copy link

@piredman Thanks a lot, that helped me as well!

@ngbrown
Copy link

ngbrown commented Mar 14, 2013

updating node-gyp didn't work for me. I had to set the GYP_MSVS_VERSION environment variable.

c:\>set GYP_MSVS_VERSION=2012

This is from the node-gyp\gyp\pylib\gyp\MSVSVersion.py file.

@brianmcd
Copy link
Owner

Looks like this is resolved. Please re-open if there are still issues. If anyone has anything to add to https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide, it would be appreciated!

@shustariov-andrey
Copy link

Still having this issue, when trying to npm install sqlite3. Here is output:

sqlite3@2.1.15 install C:\Users\shua\node_modules\sqlite3
node-gyp rebuild

C:\Users\shua\node_modules\sqlite3>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
C:\Users\shua\node_modules\sqlite3\build\binding.sln : 
error MSB3411: Could not load the Visual C++ component "VCBuild.exe". 
If the component is not installed, either 
1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 
2) install Microsoft Visual Studio 2008. 

@shustariov-andrey
Copy link

Issue disappeared after updating nodejs to last version and adding PYTHONPATH env variable

@togakangaroo
Copy link

Issue persists when using yeoman react-gulp-browserfy generator (contextify is used for jest-cli)

@sbergot
Copy link

sbergot commented Nov 22, 2014

Same issue while trying to install jest-cli. Tried updating manually npm, node-gyp, and setting GYP_MSVS_VERSION

npm version:

{ http_parser: '1.0',
node: '0.10.33',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.29',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1j',
npm: '2.1.9',
museo: '1.0.0' }

windows 8.1

@benceg
Copy link

benceg commented Feb 3, 2015

Hi @sbergot,

Did you happen to get Jest up & running? I'm experiencing the same hassles in Windows 8.1 w/VS 2013; all of the prerequisite build tools installed and GYP_MSVS_VERSION set.

@flq
Copy link

flq commented Feb 5, 2015

Just for info, setting GYP_MSVS_VERSION fixed things for me. Windows 7, Visual Studio 2013.

@sbergot
Copy link

sbergot commented Feb 5, 2015

@benceg I succeeded. The error was caused by a bad environment (I don't remember the details). Reinstalling cleanly the last version of VS fixed it.

@benceg
Copy link

benceg commented Feb 5, 2015

Thank you so much guys.

Nevertheless I managed to fix it myself, yesterday - the solution (Windows 8.1 x64) involved removing all traces of Visual Studio from my machine (in the case of VS 2010, this was accomplished using MS's uninstall tool with the /full flag set), and then installing VS 2012 Express Desktop Edition. I also installed the Windows SDK for WIndows 8.1.

After that, I removed all traces of Python 2.x and installed Python 2.7.9 x64.

I didn't have to set any NPM msvs_version flags, but did have to set the GYP_MSVS_VERSION.

A note to all users or Windows 8.1 x64: VS 2013 did not work for me! Nor did VS 2010. VS 2012 was the definite, QED dependency at the end of the day.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests