Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module not found: Error: Can't resolve 'http' in selenium-webdriver

Tags:

angular6

I found this error :

ERROR in ./node_modules/selenium-webdriver/http/index.js Module not found: Error: Can't resolve 'https' in '/Users/mac/angular/restaurantApp/node_modules/selenium-webdriver/http'

Can any one help me to solve that.

Thanks

like image 616
Lucifer Avatar asked Jul 11 '18 14:07

Lucifer


Video Answer


1 Answers

I have had a similar problem with error code:

ERROR in ./src/app/my.service.ts   
Module not found: Error: Can't resolve '../../node_modules/@types/selenium-webdriver/http' in '...\src\app

Problem was with Visual Studio Code's Autoimport plugin importing HttpClient class from

'../../node_modules/@types/selenium-webdriver/http'

instead of

'../../node_modules/@angular/common/http'

I found this question somehow helpful, but it did not give me a clear answer. I post what I found out so that another visitor will have it easier.

like image 69
Prusio Avatar answered Oct 16 '22 16:10

Prusio