Comments (11)
Do you have the Windows 7 SDK installed? http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279
Also, once that's installed, be sure to invoke node-gyp
from inside the 64-bit Visual Studio Command Prompt! Errors are thrown if you try to build a 64-bit module from any other command prompt.
from node-gyp.
I have Visual Studio 2010 C++ express...
I get this when using that command prompt:
C:\Source\contextify>node-gyp clean
info it worked if it ends with ok
info done ok
C:\Source\contextify>node-gyp configure
info it worked if it ends with ok
spawn python [ 'C:\Users\malixsys.node-gyp\0.6.14\tools\gyp_addon',
'binding.gyp',
'-IC:\Source\contextify\build\config.gypi',
'-f',
'msvs',
'-G',
'msvs_version=2010' ]
info done ok
C:\Source\contextify>node-gyp build
info it worked if it ends with ok
spawn msbuild [ 'build/binding.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release;Platform=x64' ]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'contextify.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you are tryin
g to build a project without a solution file, and have specified a non-default
Platform that doesn't exist for this project. [C:\Source\contextify\build\conte
xtify.vcxproj]
ERR! Error: msbuild
failed with exit code: 1
at ChildProcess.onExit (C:\Users...\npm\node_modules\n
ode-gyp\lib\build.js:209:23)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:360:16)
at Process.onexit (child_process.js:396:5)
ERR! not ok
from node-gyp.
@malixsys You also need to install the Windows 7 SDK and open up a Windows 7 64-bit SDK Command Prompt window to compile inside of.
from node-gyp.
@TooTallNate
With SDK command prompt:
C:\Source\contextify>node-gyp clean
info it worked if it ends with ok
info done ok
C:\Source\contextify>node-gyp configure
info it worked if it ends with ok
spawn python [ 'C:\Users\malixsys.node-gyp\0.6.14\tools\gyp_addon',
'binding.gyp',
'-IC:\Source\contextify\build\config.gypi',
'-f',
'msvs',
'-G',
'msvs_version=2010' ]
info done ok
C:\Source\contextify>node-gyp build
info it worked if it ends with ok
spawn msbuild [ 'build/binding.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release;Platform=x64' ]
C:\Source\contextify\build\contextify.vcxproj(1,161): error MSB4066: The attribute "Label" in element is unrecognized.
ERR! Error: msbuild
failed with exit code: 1
at ChildProcess.onExit (C:\Users\malixsys\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:209:23)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:360:16)
at Process.onexit (child_process.js:396:5)
ERR! not ok
C:\Source\contextify>
from node-gyp.
@malixsys It looks like this is related: http://stackoverflow.com/a/5108233/376773
from node-gyp.
I'm reinstalling the SDK with .Net 4...
from node-gyp.
Same:
C:\Source\contextify>node-gyp configure
info it worked if it ends with ok
spawn python [ 'C:\Users\malixsys.node-gyp\0.6.14\tools\gyp_addon',
'binding.gyp',
'-IC:\Source\contextify\build\config.gypi',
'-f',
'msvs',
'-G',
'msvs_version=2010' ]
info done ok
C:\Source\contextify>node-gyp build
info it worked if it ends with ok
spawn msbuild [ 'build/binding.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release;Platform=x64' ]
C:\Source\contextify\build\contextify.vcxproj(1,161): error MSB4066: The attribute "Label" in element is unrecognized.
ERR! Error: msbuild
failed with exit code: 1
at ChildProcess.onExit (C:\Users\malixsys\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:209:23)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:360:16)
at Process.onexit (child_process.js:396:5)
ERR! not ok
from node-gyp.
I tryed this on Windows Server 2008 and Windows 7 with Visual Studio Premium 2010 and Python 2.7 installed.
I get the error MSB8007, too. (Platform for the Project is invalid. Platform='x64')
I think that one solution is to switch to a win32 node installation
or to get the compiler-settings to work for 64 bit.
from node-gyp.
I get the error, too - even with the 32bit version of node installed.
Why is the issue closed?
from node-gyp.
@Paratron Because I don't have time to debug everybody's configs. Both 32-bit and 64-bit work for me using the Windows download links in the README. So if you have both of those (MSVC Express 2010 and the Windows 7 64-bit SDK) installed and are still having problems, then I accept patches.
from node-gyp.
Thx, installing Windows 7 64-bit SDK and using Visual Studio cmd prompt fixed it for me. Cheers.
from node-gyp.
Related Issues (20)
- cannot install better-sqlite3 HOT 2
- Mutable default arguments in Python code HOT 1
- tar.Extract is not a function HOT 2
- find-python broke with 18.20.0 (?) on ARM HOT 5
- gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
- [Request] Upgrade tar to v6.2.1 HOT 6
- test/test-find-visualstudio.js may fail on Windows on ARM
- complie_commands.json generated by node-gyp doesn't be in clangd search path. HOT 6
- generate compile_commands.json automatically
- Generate .gitignore and .hgignore in build
- Customize default generator
- error when using node-gyp from yarn command HOT 3
- node-gyp `binding.gyp not found` error HOT 1
- some suggestions about node-gyp build command
- error saat menjalankan "npm install imagemin-webpack-plugin [email protected] --save-dev" HOT 2
- Install of local node packages fails for node-gyp with error "Cannot assign to read only property 'cflags' of object" HOT 9
- Node.js v22: RangeError: Maximum call stack size exceeded HOT 5
- Impossible to install ffi-napi on Windows 11 HOT 1
- Couldn't be built successfully HOT 1
- Infer `nodedir` for headerfiles from execPath
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gyp.