简体   繁体   English

在Windows上安装Karma时出错

[英]Error installing Karma on Windows

I'm fairly new with nodejs, and I'm trying to install Karma. 我对nodejs相当陌生,并且正在尝试安装Karma。 I would like to know how to solve this. 我想知道如何解决这个问题。

I'm getting an error when running this command : 运行此命令时出现错误:

c:\Apps\nodejs\ npm install karma

I have installed karma-cli successfully but when I try installing karma, I get the following error messages: 我已经成功安装了karma-cli,但是当我尝试安装karma时,出现以下错误消息:

    C:\Apps\nodejs>npm install karma
npm WARN optional dep failed, continuing fsevents@0.3.8
\


> utf-8-validate@1.1.0 install C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modu
les\ws\node_modules\utf-8-validate
> node-gyp rebuild

|
C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-valid
ate>if not defined npm_config_node_gyp (node "C:\Apps\nodejs\node_modules\npm\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 commuta
teur "/m".
MSBUILD : error MSB3428: Impossible de charger le composant Visual C++ "VCBuild.exe". Pour corriger le problème, vous d
evez 1) installer le Kit de développement .NET Framework 2.0 SDK, 2) installer Microsoft Visual Studio 2005 ou 3) ajout
er l'emplacement du composant au chemin d'accès système, s'il est installé ailleurs.  [C:\Apps\nodejs\node_modules\karm
a\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Apps\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.1.7601
gyp ERR! command "node" "C:\\Apps\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_module
s\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok

> bufferutil@1.1.0 install C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\
ws\node_modules\bufferutil
> node-gyp rebuild


C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>
if not defined npm_config_node_gyp (node "C:\Apps\nodejs\node_modules\npm\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 commuta
teur "/m".
MSBUILD : error MSB3428: Impossible de charger le composant Visual C++ "VCBuild.exe". Pour corriger le problème, vous d
evez 1) installer le Kit de développement .NET Framework 2.0 SDK, 2) installer Microsoft Visual Studio 2005 ou 3) ajout
er l'emplacement du composant au chemin d'accès système, s'il est installé ailleurs.  [C:\Apps\nodejs\node_modules\karm
a\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Apps\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.1.7601
gyp ERR! command "node" "C:\\Apps\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_module
s\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 utf-8-validate@1.1.0

> bufferutil@1.1.0 install C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_m
odules\engine.io-client\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\nod
e_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Apps\nodejs\node_modules\npm\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 commuta
teur "/m".
MSBUILD : error MSB3428: Impossible de charger le composant Visual C++ "VCBuild.exe". Pour corriger le problème, vous d
evez 1) installer le Kit de développement .NET Framework 2.0 SDK, 2) installer Microsoft Visual Studio 2005 ou 3) ajout
er l'emplacement du composant au chemin d'accès système, s'il est installé ailleurs.  [C:\Apps\nodejs\node_modules\karm
a\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\buffe
rutil\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Apps\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.1.7601
gyp ERR! command "node" "C:\\Apps\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.
io-client\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 bufferutil@1.1.0

> utf-8-validate@1.1.0 install C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\no
de_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild


C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\nod
e_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Apps\nodejs\node_modules\npm\bin\n
ode-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 commuta
teur "/m".
MSBUILD : error MSB3428: Impossible de charger le composant Visual C++ "VCBuild.exe". Pour corriger le problème, vous d
evez 1) installer le Kit de développement .NET Framework 2.0 SDK, 2) installer Microsoft Visual Studio 2005 ou 3) ajout
er l'emplacement du composant au chemin d'accès système, s'il est installé ailleurs.  [C:\Apps\nodejs\node_modules\karm
a\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8
-validate\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Apps\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.1.7601
gyp ERR! command "node" "C:\\Apps\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Apps\nodejs\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.
io-client\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
npm WARN optional dep failed, continuing bufferutil@1.1.0
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
karma@0.13.9 node_modules\karma
├── di@0.0.1
├── graceful-fs@4.1.2
├── rimraf@2.4.3
├── mime@1.3.4
├── colors@1.1.2
├── http-proxy@1.11.2 (eventemitter3@1.1.1, requires-port@0.0.1)
├── source-map@0.4.4 (amdefine@1.0.0)
├── useragent@2.1.7 (lru-cache@2.2.4)
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
├── bluebird@2.9.34
├── dom-serialize@2.2.0 (void-elements@1.0.0, custom-event@1.0.0, extend@2.0.1, ent@2.2.0)
├── glob@5.0.14 (path-is-absolute@1.0.0, inherits@2.0.1, inflight@1.0.4, once@1.3.2)
├── minimatch@2.0.10 (brace-expansion@1.1.0)
├── connect@3.4.0 (utils-merge@1.0.0, parseurl@1.3.0, debug@2.2.0, finalhandler@0.4.0)
├── body-parser@1.13.3 (bytes@2.1.0, content-type@1.0.1, depd@1.0.1, qs@4.0.0, on-finished@2.3.0, http-errors@1.3.1, raw
-body@2.1.2, debug@2.2.0, iconv-lite@0.4.11, type-is@1.6.7)
├── expand-braces@0.1.1 (array-uniq@1.0.2, array-slice@0.2.3, braces@0.1.5)
├── lodash@3.10.1
├── chokidar@1.0.5 (arrify@1.0.0, path-is-absolute@1.0.0, is-glob@1.1.3, glob-parent@1.2.0, async-each@0.1.6, is-binary-
path@1.0.1, readdirp@1.4.0, anymatch@1.3.0)
├── memoizee@0.3.9 (lru-queue@0.1.0, next-tick@0.2.2, timers-ext@0.1.0, d@0.1.1, event-emitter@0.3.3, es6-weak-map@0.1.4
, es5-ext@0.10.7)
├── log4js@0.6.26 (async@0.2.10, underscore@1.8.2, readable-stream@1.0.33, semver@4.3.6)
├── core-js@1.1.3
└── socket.io@1.3.6 (debug@2.1.0, has-binary-data@0.1.3, socket.io-adapter@0.3.1, socket.io-parser@2.2.4, engine.io@1.5.
2, socket.io-client@1.3.6)

C:\Apps\nodejs>

You need to install a C++ compiler. 您需要安装C ++编译器。 The module node-gyp require it. 模块node-gyp需要它。 Install Visual Studio Express then run the install again. 安装Visual Studio Express,然后再次运行安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM