Common issue while developing angular at Windows machine is node-sass build error.

Example error output:

gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit ([....]\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Source\\_nodejs\\node.exe" "[....]node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd [....]node_modules\node-sass
gyp ERR! node -v v10.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Build failed with error code: 1

Solution for this is installing build tools.

  1. Open Poershell with Administrator privilages
  2. Run following command:

npm install -g windows-build-tools

Unfortunately this must be called after VisualStudio Update  :(


Be the first to post a comment

Post a comment