Search code examples
node.jspython-2.7npmprotractornode-gyp

node-gyp errors on protractor installation


I'm attempting to install protractor by running npm install -g protractor and I am getting the following output and I'm not sure if the errors of something of concern. It looks like there is an attempt to install utf-8-validate and bufferutil. After that command, it runs node-gyp rebuild but fails with an MSB8020 error. It references Visual Studio 2010, which I don't have. I have Visual Studio 2012, which is up-to-date.

Microsoft recommends that Visual Studio versions be installed in a particular order, eg: Visual Studio 2010, then Visual Studio 2012, etc.

Before I attempt going through all of that...how important is it that I resolve these errors in order to get a good Protractor setup? Do I really need utf-8-validate and bufferutil?

Other information:

  • Windows 8.1
  • Node.js v0.12.4
  • Python v2.7.3
  • Java v1.8.0_45-b14

I hope I have asked this the right way, as this is my first StackExchange question.

Thanks all!

C:\Users\jack\AppData\Roaming>npm install -g protractor
\
> utf-8-validate@1.2.1 install C:\Users\jack\AppData\Roaming\npm\node_modules
\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-v
alidate
> node-gyp rebuild


C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\node_modules\seleni
um-webdriver\node_modules\ws\node_modules\utf-8-validate>if not defined npm_conf
ig_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..
\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+
+ Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
0 build tools. [C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\no
de_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate\build
\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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: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.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\node_m
odules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

> bufferutil@1.2.1 install C:\Users\jack\AppData\Roaming\npm\node_modules\pro
tractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\node_modules\seleni
um-webdriver\node_modules\ws\node_modules\bufferutil>if not defined npm_config_n
ode_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\
node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+
+ Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
0 build tools. [C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\no
de_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil\build\buf
ferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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: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.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jack\AppData\Roaming\npm\node_modules\protractor\node_m
odules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN optional dep failed, continuing bufferutil@1.2.1
C:\Users\jack\AppData\Roaming\npm\webdriver-manager -> C:\Users\jack\AppDa
ta\Roaming\npm\node_modules\protractor\bin\webdriver-manager
C:\Users\jack\AppData\Roaming\npm\protractor -> C:\Users\jack\AppData\Roam
ing\npm\node_modules\protractor\bin\protractor
protractor@2.4.0 C:\Users\jack\AppData\Roaming\npm\node_modules\protractor
├── jasminewd@1.1.0
├── jasminewd2@0.0.6
├── html-entities@1.1.3
├── q@1.0.0
├── minijasminenode@1.1.1
├── adm-zip@0.4.4
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)
├── jasmine@2.3.2 (exit@0.1.2, jasmine-core@2.3.4)
├── accessibility-developer-tools@2.6.0
├── saucelabs@1.0.1 (https-proxy-agent@1.0.0)
├── source-map-support@0.2.10 (source-map@0.1.32)
├── lodash@2.4.2
├── request@2.57.0 (caseless@0.10.0, aws-sign2@0.5.0, forever-agent@0.6.1, strin
gstream@0.0.4, tunnel-agent@0.4.1, oauth-sign@0.8.0, isstream@0.1.2, json-string
ify-safe@5.0.1, node-uuid@1.4.3, qs@3.1.0, combined-stream@1.0.5, form-data@0.2.
0, mime-types@2.0.14, http-signature@0.11.0, bl@0.9.4, tough-cookie@2.0.0, hawk@
2.3.1, har-validator@1.8.0)
└── selenium-webdriver@2.47.0 (tmp@0.0.24, rimraf@2.4.3, xml2js@0.4.4, ws@0.8.0)


Solution

  • Looks like you may actually be having issues with the build tools being used. Try this:

    npm install protractor -g --msvs_version=2012
    

    That will install with the specific version of the build tools you have access too.

    See if that works!