Here is my code:
import { HttpClient, HttpErrorResponse, HttpHeaders } from \'@angular/common/http\';
In my legacy app Array.from of prototype js was conflicting with angular's Array.from that was causing this problem. I resolved it by saving angular's Array.from version and reassigning it after prototype load.