2015-09-06 83 views
3

我一起工作:與故宮安裝WS導致淋巴結GYP錯誤

的Windows 10 64位 節點0.12.7 NPM:2.11.3

我經歷的平均堆教程中,我我試圖運行以下命令:

NPM安裝--save WS

我收到此錯誤信息:

C:\Dev\workspace\MeanProject\NodeServer>npm install --save ws 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm WARN package.json [email protected] No license field. 
/
> [email protected] install C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\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.targe 
ts(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the regi 
stry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versi 
on number. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_mo 
dules\utf-8-validate\build\validation.vcxproj] 
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the 
file specified. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\n 
ode_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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23) 
gyp ERR! stack  at ChildProcess.emit (events.js:110:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:1074:12) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\utf-8-validate 
gyp ERR! node -v v0.12.7 
gyp ERR! node-gyp -v v2.0.1 
gyp ERR! not ok 

> [email protected] install C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 


C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\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.targe 
ts(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the regi 
stry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versi 
on number. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_mo 
dules\bufferutil\build\bufferutil.vcxproj] 
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the 
file specified. [C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\n 
ode_modules\bufferutil\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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23) 
gyp ERR! stack  at ChildProcess.emit (events.js:110:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:1074:12) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Dev\workspace\MeanProject\NodeServer\node_modules\ws\node_modules\bufferutil 
gyp ERR! node -v v0.12.7 
gyp ERR! node-gyp -v v2.0.1 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 
npm WARN optional dep failed, continuing [email protected] 
[email protected] node_modules\ws 

我有2015 VS.

任何幫助,將不勝感激。

+0

我有一個類似的問題,但是當安裝不同的東西。看看問題的答案http://stackoverflow.com/questions/33239445/could-not-install-prerender-using-npm-failed-to-locate-cl-exe/33254550#33254550。我相信它會解決你的問題。 –

回答

2

CL.exe是C++開發環境的一部分。它沒有默認安裝。因此,在Visual Studio中創建一個新的C++項目會安裝所有必需的組件,包括cl.exe。 您可以在「C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ bin \ cl.exe」下找到它,並且在啓動「VS2015開發人員命令提示符」時位於路徑中。

相關問題