Node JS软件包安装,MSB003 - 缺少SDKdir变量

时间:2015-09-27 13:38:10

标签: angularjs node.js package cl.exe

亲爱的Stackoverflowers,

我正在尝试使用我的Windows 8.1 x64计算机安装Node JS的一些软件包。这些包是“Karma”,“generator-angular”,“generator-meanjs”。 为此,我总是这样做:

npm install -g karma

或者其他人一样。不幸的是,我收到了这个错误:

    Your environment has been set up for using Node.js 4.1.1 (x64) and npm.

C:\Windows\System32>npm install -g karma
npm WARN install Couldn't install optional dependency: Unsupported
C:\Program Files\nodejs\karma -> C:\Program Files\nodejs\node_modules\karma\bin\
karma

> bufferutil@1.2.1 install C:\Program Files\nodejs\node_modules\karma\node_modul
es\bufferutil
> node-gyp rebuild


C:\Program Files\nodejs\node_modules\karma\node_modules\bufferutil>if not define
d npm_config_node_gyp (node "C:\Users\[username]\AppData\Roaming\npm\node_modules\np
m\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else
 (node  rebuild )
Génération des projets individuellement dans cette solution. Pour activer la gén
ération en parallèle, ajoutez le commutateur "/m".
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:\Program Files\nodejs\node_modules\karma\node_modules\bufferutil\
build\bufferutil.vcxproj]
TRACKER : error TRK0005: échec de localisation de : "CL.exe". Le fichier spécif
ié est introuvable. [C:\Program Files\nodejs\node_modules\karma\node_modules\bu
fferutil\build\bufferutil.vcxproj]


gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\[username]\AppData\Roaming\npm\n
ode_modules\npm\node_modules\node-gyp\lib\build.js:270: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_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\[username]\\AppDa
ta\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "
rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\karma\node_modules\bufferutil
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
C:\Program Files\nodejs
└── (empty)

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\[username]\\AppData\
\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
npm ERR! node v4.1.1
npm ERR! npm  v3.3.4
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\System32\npm-debug.log
npm ERR! code 1

C:\Windows\System32>

我无法发布图片,因为这是我第一次发帖,抱歉。 我已经重新安装了Microsoft Visual Studio 2015。 我在Google上搜索过,他们建议使用这个命令:

call C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd /Release /x86

但我没有v7.1。

有任何想法如何解决这个问题?

0 个答案:

没有答案