Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在Windows上安装Karma时出错_Node.js_Karma Runner - Fatal编程技术网

Node.js 在Windows上安装Karma时出错

Node.js 在Windows上安装Karma时出错,node.js,karma-runner,Node.js,Karma Runner,我是nodejs的新手,我正在尝试安装Karma。我想知道如何解决这个问题 运行此命令时出现错误: c:\Apps\nodejs\ npm install karma 我已成功安装karma cli,但当我尝试安装karma时,会收到以下错误消息: C:\Apps\nodejs>npm install karma npm WARN optional dep failed, continuing fsevents@0.3.8 \ > utf-8-validate@1.1.

我是nodejs的新手,我正在尝试安装Karma。我想知道如何解决这个问题

运行此命令时出现错误:

c:\Apps\nodejs\ npm install karma
我已成功安装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>

你需要安装一个C++编译器。模块节点gyp需要它。安装,然后再次运行安装