node-gyp: fatal error C1083: Cannot open include file: 'ammintrin.h'

Some people may have the same problem as me. I am trying to install a package that requires node-gyp on Windows 7 x64.

       It's like going to the dentist

I had Visual Studio 2013. I had to uninstall that, installed Python v2.7.3 and added it to the PATH, Microsoft Visual Studio C++ 2010, Uninstalled the C++ runtimes, installed Windows 7 64-bit SDK, the compiler update for the Windows SDK 7.1, and Microsoft Visual Studio C++ 2012 for Windows Desktop. Sometimes I found out the order was wrong, so I had to try a few times.

Hope is all we have now

Thinking I would now be able to get started with Node.js on Windows, I tried installing the package I had planned on installing. No good, I may need to get underwear that has “node-gyp” written on it. Or maybe my wallpaper is incompatible…

   We are powerless, broken and despaired

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory

I then travelled to lands afar and consulted a fortune teller who has expertise with black magick and the arcane, and she told me it was the work of evil magi, and that I needed to consult the Red Mond scriptures and do a Ctrl+F for “how to dispel Demonic Witchcraft”.

Oh, Fortuna

After consulting this sacred tome, I found out how to conjure the appropriate incantations that will fend off further satanic influences from Baphomet.

   He's actually a nice guy

It seems you need to install Microsoft Visual Studio 2010 Service Pack 1 (at least I’m getting good at that), which may alleviate your boredom by presenting you with a shiny, brand-new error similar to this:

...\leveldown\node_modules\nan\nan.h(318): error C2039 : 'New' : is not a member of 'v8::String'

           It's a "but plug"

It seems this is because a module does not support the version of v8 bundled with Node. No biggie, one swipe of my magic wand and that pesky, uppity latest version of Node (0.11.x) is gone in favor of a more conservative, philistine version of Node from Mississippi (0.10.x).

           Stable version

So yeah, I just wanted to confirm that there is a candle at the end of the tunnel and that if some poor bastard needs to deploy Windows servers, one option would be running Windows VMs that have been carefully set up to support node-gyp.

So two clarifications could be added:

Freedom at last!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

@werewolfdev People still suffer from node-gyp? Wow! Does it still require hand-cranked Python 2.7?

Sorry for the unhelpful response, but I’m kinda amazed if you didn’t arrive here by mistake, somehow!