Install node-sass on Windows

This blog will help you to resolve several issues when install node-sass. If you install gulp-sass, node also will install node-sass.

Try to execute npm install node-sass

Compiling versions 0.9.4 and above on Windows machines requires Visual Studio 2013 WD. If you have multiple VS versions, use npm install with the --msvs_version=2013 flag also use this flag when rebuilding the module with node-gyp or nw-gyp.

If you happen to meet the problems this blog mentioned, try these prior tricks firstly:

  • Update internal node-gyp.(npm uses build system called gyp)

  • Reinstall Microsoft Visual C++ 2013 or Visual Studio 2013.


If throw a error to tell you are lack of python

gyp verb `which` failed Error: not found: python2

Don't install a python, you don't need python to install node-sass.


If throw a error that "could not load VCBuild.exe", make sure you installed Visual Studio 2013 on your PC. Don't use Visual Studio 2015, or you will get another a error to make you install Windows 8.1 SDK, even you install the required windows SDK, the next error will drive you crazy. If you already installed Visual Studio 2013, there is the same issue again, make sure there is GYP_MSVS_VERSION=2013 environment variables. Either you ignore this variable to execute npm install --msvs_version=2013 node-sass, or set npm global config npm config set msvs_version 2013 --global.

Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Fram ework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.


In the case, you are not luck, also throw a error than could not found Microsoft.Cpp.Default.props, add MSBuildExtensionsPath = C:\Program Files (x86)\MSBuild & MSBuildExtensionsPath32 = C:\Program Files (x86)\MSBuild & MSBuildExtensionsPath64 = C:\Program Files\MSBuild & VCTargetsPath = %MSBuildExtensionsPath32%\Microsoft.Cpp\v4.0\V120; into environment variables.

The imported project "c:\Microsoft.Cpp.Default.props" was not found.