Skip to content

Instantly share code, notes, and snippets.

@leommoore
Last active January 17, 2024 12:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leommoore/2c0495c6f910af59ce2d to your computer and use it in GitHub Desktop.
Save leommoore/2c0495c6f910af59ce2d to your computer and use it in GitHub Desktop.
Windows node-gyp Compile Problems

#Windows node_gyp Compile Problems

When you are compiling node-gyp components during the npm install process you may hit problems when it tries to figure out the version of Microsoft C++ that you have available.

##Typical Problems

fatal error C1083: Cannot open include file: 'vcruntime.h': No such file or directory

This is happening because npm cannot determine the correct location for Microsoft C++.

##Solution The solution is to install node-gyp globally and then tell npm what version of Visual Studio you are using.

  • Install node-gyp as a global module: npm install -g node-gyp.
  • Specify VS version at install: npm install sails --msvs_version=2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment