angular: Cannot find module '@angular/common/http/src/response after migrating to Angular 8
π 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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 28 (15 by maintainers)
Commits related to this issue
- fix(common): Cannot find module HttpUploadProgressEvent Fixes #30814 — committed to santoshyadavdev/angular by santoshyadavdev 5 years ago
- fix(common): Cannot find module HttpUploadProgressEvent Fixes #30814 — committed to santoshyadavdev/angular by santoshyadavdev 5 years ago
- fix(common): Cannot find module HttpUploadProgressEvent Fixes #30814 — committed to santoshyadavdev/angular by santoshyadavdev 5 years ago
- fix(common): expose the `HttpUploadProgressEvent` interface as public API Fixes #30814 — committed to santoshyadavdev/angular by santoshyadavdev 5 years ago
- fix(common): expose the `HttpUploadProgressEvent` interface as public API (#30852) Fixes #30814 PR Close #30852 — committed to renovate-bot/angular by santoshyadavdev 5 years ago
- fix(common): expose the `HttpUploadProgressEvent` interface as public API (#30852) Fixes #30814 PR Close #30852 — committed to angular/angular by santoshyadavdev 5 years ago
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.
Hi @gkalpak , Can i work on this.