2013-10-07 74 views
1

安裝時,我發現了以下錯誤:Node.js的模塊安裝版本Microsoft.Cpp.x 64.Targets(146,5):錯誤MSB6006:「CL.EXE

npm install ecrud 

我這是我的團隊中唯一一個得到這個問題的人,以前我得到了一個單獨的錯誤信息,說明我需要.NET 2 SDK或者添加VCBuild.exe的路徑,我安裝了SDK,Visual Studio和Visual C++ express。看到這個錯誤:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29 
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29 
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. 
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. 
    TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu 
    TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu 
mber. [C:\Program Files\nodejs\node_modules\ecrud\node_modules\mongodb\node_mod 
ules\kerberos\build\kerberos.vcxproj] 
mber. [C:\Program Files\nodejs\node_modules\ecrud\node_modules\mongodb\node_mod 
ules\bson\build\bson.vcxproj] 
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 
64.Targets(146,5): error MSB6006: "CL.exe" exited with code -1073741515. [C:\Pr 
ogram Files\nodejs\node_modules\ecrud\node_modules\mongodb\node_modules\bson\bu 
ild\bson.vcxproj] 
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 
64.Targets(146,5): error MSB6006: "CL.exe" exited with code -1073741515. [C:\Pr 
ogram Files\nodejs\node_modules\ecrud\node_modules\mongodb\node_modules\kerbero 
s\build\kerberos.vcxproj] 
npm http 408 https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz 
npm ERR! fetch failed https://registry.npmjs.org/range-parser/-/range-parser-0.0 
.4.tgz 
npm http GET https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz 
npm http 200 https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz 
+0

按照[此處](https://github.com/TooTallNate/node-gyp)中所述安裝適當版本的軟件。 – user568109

回答

8

我不得不安裝Microsoft Visual Studio(指定VS的版本):npm install ecrud --msvs_vers ion = 2012

+1

你是聖人!參數「msvs_version =」就像一個魅力! – Ragaar

+0

您可能還需要更改Visual Studio安裝以包含「工具和Windows SDK」。 –