Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protractor @types throwing a lot of errors

I am using the Angular2 Webpack Starter by AngularClass and I have recently started running into some errors with protractor and Im not sure where they are coming from. When I try to build I get the errors:

Module 'webdriver' has no exported member 'IButton', Module 'webdriver' has no exported member 'IKey', Module 'webdriver' has no exported member 'Locator' (about 30 times), and the same message for the members IErrorCode, IType, ILevelValues, ILevel, and a few other members.

I also get the errors:

Property 'Error' does not exist on type 'typeof error'

and

Property 'stacktrace' does not exist on type 'typeof webdriver'

Just a whole list of errors and Im not sure why they are popping up now or where they are coming from. Has anyone ran into this or know how to solve this? Thanks!

like image 307
georgej Avatar asked Sep 22 '16 14:09

georgej


3 Answers

Had the same error, change your version of webdriver 2.44.28.

"@types/selenium-webdriver": "2.44.28", and than npm install

or

npm i --save-dev @types/[email protected]

like image 189
Lyubimov Roman Avatar answered Oct 14 '22 15:10

Lyubimov Roman


Updating selenium-webdriver to 2.44.28 didn't solve issue for me, but to 2.44.29 - do it)

npm i --save @types/[email protected]

Working with this environment:

node -v 5.12.0 npm -v 3.10.8

like image 3
Ratmir Avatar answered Oct 14 '22 17:10

Ratmir


@types/protractor is now a stub, as the package provides its own type definitions. I got rid of all of these errors by running

npm uninstall --save @types/protractor
like image 1
Mark Provan Avatar answered Oct 14 '22 16:10

Mark Provan