Installation of Protractor 2.0 and MSBUILD error MSB3428

China☆狼群 提交于 2019-12-11 17:59:45

问题


I still have problem with the Protractor 2.0.0 installation on my Windows 8 box (first problem here : see How to have protractor reliable results? and Cannot install Protractor 2.0.0 : ENOENT in bufferutil while node-gyp rebuild). The error at npm install -g protractor is the following :

$ 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

The msbuild.exe at path C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe exists and is runnable but it fails at run and I don't figure out why.

Any help would be greatlfy appreciated.

Jean-Marc.

PS : My config, Windows 8, Node 0.10.28, Npm 1.4.9


回答1:


I experienced the same problems (under Windows 7). It looks like a Protractor 2.0.0/Windows issue.

If you do not explicitly need Protractor version 2.0.0, try installing the previous version (1.8.0) with 'npm install -g protractor@1.8.0'




回答2:


Or you could use:

npm install -g --no-optional protractor

This should work with protractor 2.0.0



来源:https://stackoverflow.com/questions/29204994/installation-of-protractor-2-0-and-msbuild-error-msb3428

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!