Code Monkey home page Code Monkey logo

Comments (11)

TooTallNate avatar TooTallNate commented on May 23, 2024

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.

malixsys avatar malixsys commented on May 23, 2024

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.

TooTallNate avatar TooTallNate commented on May 23, 2024

@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.

malixsys avatar malixsys commented on May 23, 2024

@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.

TooTallNate avatar TooTallNate commented on May 23, 2024

@malixsys It looks like this is related: http://stackoverflow.com/a/5108233/376773

from node-gyp.

malixsys avatar malixsys commented on May 23, 2024

I'm reinstalling the SDK with .Net 4...

from node-gyp.

malixsys avatar malixsys commented on May 23, 2024

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.

ThomasDeutsch avatar ThomasDeutsch commented on May 23, 2024

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.

Paratron avatar Paratron commented on May 23, 2024

I get the error, too - even with the 32bit version of node installed.
Why is the issue closed?

from node-gyp.

TooTallNate avatar TooTallNate commented on May 23, 2024

@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.

pherris avatar pherris commented on May 23, 2024

Thx, installing Windows 7 64-bit SDK and using Visual Studio cmd prompt fixed it for me. Cheers.

from node-gyp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.