npm install -g 量角器上的错误 [英] error on npm install -g protractor
问题描述
安装量角器时出现此错误:
When I install protractor I get this error:
C:UsersandreirAppDataRoaming
pm
ode_modulesprotractor
ode_modulesselenium-webdriver
ode_modulesws
ode_modulesutf-8-validate>node "C:Program Files
odejs
ode_modules
pmin
ode-gyp-bin\....
ode_modules
ode-gypin
ode-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for project 'validation.vcxproj' is invalid. Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project. [C:UsersandreirAppDataRoaming
pm
ode_modulesprotractor
ode_modulesselenium-webdriver
ode_modulesws
ode_modulesutf-8-validateuildvalidation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:Program Files
odejs
ode_modules
pm
ode_modules
ode-gyplibuild.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:UsersandreirAppDataRoaming
pm
ode_modulesprotractor
ode_modulesselenium-webdriver
ode_modulesws
ode_modulesutf-8-validate
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
我不明白错误在哪里......
I don't understand where the erorr is...
我有(相关):Windows 8.1 专业版 x64,Python 2.7.10,VS 2012 专业版
I have (relevant): Windows 8.1 pro x64, Python 2.7.10, VS 2012 Pro
推荐答案
问题,正如错误所说,是由于所需的
utf-8-validate
模块的编译selenium-webdriver
The issue, as the error is saying, is due to the compilation of utf-8-validate
module required by WebSocket
required by selenium-webdriver
node_modulesprotractor
ode_modulesselenium-webdriver
ode_modulesws
ode_modulesutf-8-validate
编译器无法找到 x64 的项目配置
the compiler is failing to find a project configuration for x64
The Platform for project 'validation.vcxproj' is invalid. Platform='x64'
在这个 Github Issue 中,解决方案是重新安装 VisualStudio 和 Windows SDK.
In this Github Issue the solution was reinstalling VisualStudio and Windows SDK.
无论如何,这是一个可选的依赖项,所以你可以不用它,当你弄清楚的时候,运行
Anyway this is an optional dependency so you can do without it, while you figure it out, running
npm install --no-optional
这篇关于npm install -g 量角器上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!