安装量角器 2.0 和 MSBUILD 错误 MSB3428

Installation of Protractor 2.0 and MSBUILD error MSB3428

我的 Windows 8 盒子上的 Protractor 2.0.0 安装仍然有问题(这里的第一个问题:参见 and )。 npm install -g protractor 的错误如下:

$ npm install -g protractor
npm http GET https://registry.npmjs.org/protractor
npm http 304 https://registry.npmjs.org/protractor
npm http GET https://registry.npmjs.org/jasmine
npm http GET https://registry.npmjs.org/jasminewd2
npm http GET https://registry.npmjs.org/minijasminenode
...
npm http 304 https://registry.npmjs.org/brace-expansion

> bufferutil@1.0.1 install C:\Users\Jean-Marc\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


C:\Users\Jean-Marc\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil {git}
{lamb} node "d:\Developpement\nodejs\node_modules\npm\bin\node-gyp-bin\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp http GET http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
gyp http GET http://nodejs.org/dist/v0.10.28/SHASUMS.txt
gyp http GET http://nodejs.org/dist/v0.10.28/SHASUMS.txt
gyp http GET http://nodejs.org/dist/v0.10.28/node.lib
gyp http GET http://nodejs.org/dist/v0.10.28/x64/node.lib
gyp http GET http://nodejs.org/dist/v0.10.28/node.lib
gyp http GET http://nodejs.org/dist/v0.10.28/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.28/SHASUMS.txt
gyp http 200 http://nodejs.org/dist/v0.10.28/SHASUMS.txt
gyp http 200 http://nodejs.org/dist/v0.10.28/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.28/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.28/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.28/x64/node.lib
Génération des projets individuellement dans cette solution. Pour activer la génération en parallèle, ajoutez le commutateur "/m".
MSBUILD : error MSB3428: Impossible de charger le composant Visual C++ "VCBuild.exe". Pour corriger le problème, vous devez 1) installer le Kit de développement .NET Framework 2.0 SDK, 2) installer Microsoft Visual Studio 2005 ou 3) ajou ter l'emplacement du composant au chemin d'accès système, s'il est installé ailleurs.  [C:\Users\Jean-Marc\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\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 (d:\Developpement\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "d:\Developpement\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Jean-Marc\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm http GET https://registry.npmjs.org/concat-map
npm http GET https://registry.npmjs.org/balanced-match
npm http 304 https://registry.npmjs.org/concat-map
npm http 304 https://registry.npmjs.org/balanced-match

路径 C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 存在并且 运行 可用,但在 运行 我不明白为什么。

如有任何帮助,我们将不胜感激。

让-马克

PS:我的配置,Windows 8,节点 0.10.28,Npm 1.4.9

我遇到了同样的问题(在Windows 7)。看起来像是量角器 2.0.0/Windows 问题。

如果您没有明确需要 Protractor 版本 2.0.0,请尝试使用 'npm install -g protractor@1.8.0'

安装以前的版本 (1.8.0)

或者您可以使用:

npm install -g --no-optional protractor

这应该适用于量角器 2.0.0