Skip to content

Instantly share code, notes, and snippets.

@ethan-deng
Last active March 11, 2016 04:44
Show Gist options
  • Select an option

  • Save ethan-deng/96a6129f41b31d0ea7bc to your computer and use it in GitHub Desktop.

Select an option

Save ethan-deng/96a6129f41b31d0ea7bc to your computer and use it in GitHub Desktop.

NPM Install Error

To solve this issue when running "npm install", install Visual Studio 2015 and then

"File" -> "New Project" -> choose C++ template and install C++ support.

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\hello>cd Desktop\Sun\Web

C:\Users\hello\Desktop\Sun\Web>npm install webpack-dev-server --save-dev

> [email protected] install C:\Users\hello\Desktop\Sun\Web\node_modules\bufferutil
> node-gyp rebuild


C:\Users\hello\Desktop\Sun\Web\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\hello\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from
 the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\hello\Desktop\Sun\Web\node_modules\bu
fferutil\build\bufferutil.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\hello\Desktop\Sun\Web\node_modules\buffe
rutil\build\bufferutil.vcxproj]


gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\hello\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hello\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\hello\Desktop\Sun\Web\node_modules\bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1

> [email protected] install C:\Users\hello\Desktop\Sun\Web\node_modules\utf-8-validate
> node-gyp rebuild


C:\Users\hello\Desktop\Sun\Web\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\hello\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from
 the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\hello\Desktop\Sun\Web\node_modules\ut
f-8-validate\build\validation.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\hello\Desktop\Sun\Web\node_modules\utf-8
-validate\build\validation.vcxproj]


gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\hello\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hello\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\hello\Desktop\Sun\Web\node_modules\utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment