Cannot find module '@angular/common/http/src/response after migrating to Angular 8
See original GitHub issue🐞 bug report
Affected Package
The issue is caused by package @angular/common/http
Is this a regression?
Yes, the previous version in which this bug was not present was: angular 7.0
Description
after migrating to angular 8.0 using the command
ng update @angular/cli @angular/core
building the application using ng build --prod
gives the following error:
error TS2307: Cannot find module '@angular/common/http/src/response'.
I use this for importing the HttpUploadProgressEvent interface 👍
import { HttpUploadProgressEvent } from ‘@angular/common/http/src/response’;
Should I import it from else where ?
🌍 Your Environment
Angular Version: 8…0
Angular CLI: 8.0.1 Node: 12.3.1 OS: win32 x64 Angular: 8.0.0 … animations, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic … router
Package Version
@angular-devkit/architect 0.800.1 @angular-devkit/build-angular 0.800.1 @angular-devkit/build-optimizer 0.800.1 @angular-devkit/build-webpack 0.800.1 @angular-devkit/core 8.0.1 @angular-devkit/schematics 8.0.1 @angular/cdk 7.3.3 @angular/cli 8.0.1 @ngtools/webpack 8.0.1 @schematics/angular 8.0.1 @schematics/update 0.800.1 rxjs 6.5.2 typescript 3.4.5 webpack 4.30.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:28 (15 by maintainers)
This seems indeed to be an unintentional omission in 37797e2b4.
HttpUploadProgressEvent
should be added to the public API here (as @sod mentioned above) and also add the@pablicApi
annotation here (similar to HttpDownloadProgressEvent), so that it shows up in the docs.In any case, you should never import from
@angular/<package/entrypoint>/src/...
. Everything that should be publicly importable, should be part of the public API.Hi @gkalpak , Open for review.