Angular6 - cannot resolve 'fs' in selenium-webdriver\lib
I had the same issue with ng test on
Angular CLI: 6.1.2 Node: 8.9.1
The problem for me was using the
wrong
HttpClient
. import in my test file.
Make sure your HttpClient is from '@angular/common/http';
and not imported from Selenium
.
Hope this helps :)
I had the same issue, because it imported EventEmitter
from 'protractor'
instead of angular-core
For some reasons my IntelliJ added:
import { beforeEach } from 'selenium-webdriver/testing';
which was causing the issue. Removing it solved the problem for me.