安装量角器时出现错误 gyp

Error gyp when install protractor

当我尝试安装时

npm i protractor

我有错误。我有安装 msvs_version 2015 GYP_MSVS_VERSION=2015

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(514,5): error MSB8008: Specified platform too lset (v140) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [D:\Projects\angularjs\no de_modules\utf-8-validate\build\validation.vcxproj]
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\angularjs\node_modules\utf-8-validate
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

确保您满足此处列出的所有步骤https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#prerequisites

如果还是不行再试试

node-gyp configure --msvs_version=2015
or the npm example
npm install --msvs_version=2015