9

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!

8
  • did you run webdriver first before executing protractor Commented Sep 22, 2016 at 14:38
  • @MonisMajeed I usually just run npm start and the project builds itself so I never deal with webdriver on its own. Im not sure why these errors are popping up now because I havent changed the way I am doing anything
    – georgej
    Commented Sep 22, 2016 at 14:43
  • Kindly try running the command webdriver-manager start in your terminal and then check whether you are getting errors Commented Sep 22, 2016 at 14:45
  • @MonisMajeed I ran webdriver-manager start but it said I needed to update so I ran webdriver-manager update which updated it, ran webdriver-manager start again which ran and logged Selenium Server is up and running, tried npm start again but still have the same errors
    – georgej
    Commented Sep 22, 2016 at 14:58
  • Kindly check this protractortest.org/#/tutorial Commented Sep 22, 2016 at 15:13

3 Answers 3

13

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]

9
  • thanks for the input, unfortunately that did not work for me
    – georgej
    Commented Sep 22, 2016 at 15:39
  • Did you do npm install after change? I have no errors now. Commented Sep 22, 2016 at 15:51
  • yea I did. You were getting getting a list of like 40 errors in the console before you did this? And youre using AngularClass webpack-starter?
    – georgej
    Commented Sep 22, 2016 at 15:54
  • Yeah, I modified a little, it may be an npm bug, try to delete node_modules folder and then run npm install again. Commented Sep 22, 2016 at 15:57
  • 1
    This also works if you were getting this error while using the Angular-CLI
    – cport1
    Commented Sep 22, 2016 at 19:32
3

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

1
  • I had the same problem. 2.44.29 seems to be working for me, but 2.44.28 didn't.
    – tftd
    Commented Sep 24, 2016 at 1:11
1

@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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.