question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:28 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
gkalpakcommented, Jun 3, 2019

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.

1reaction
santoshyadavdevcommented, Jun 4, 2019

Hi @gkalpak , Open for review.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module @angular/common/http/src/params after ...
After updating from Angular 7 to the latest version (8), had some issues that I was able to fix but I couldn't find...
Read more >
'Cannot find module' error on imports after Angular 9 migration
Hello, got a problem with importing components after migration from Angular 8 to Angular 9. WebStorm underlines imports path and shows...
Read more >
How to fix Angular Cannot find module '@angular/http' after ...
How to fix Angular Cannot find module '@angular/http' after 'ng update'. When updating to Angular 8.x+, developers commonly encouter this ...
Read more >
Guide to update your Angular application v8.2 -> v12.0 for ...
ng update will migrate you automatically. Update to the new version. Review these changes and perform the actions to update your application.
Read more >
Angular Version Upgrade: A quick guide to upgrade from 9.0 ...
As of Angular 10, the ModuleWithProviders type requires a generic. This migration adds the generic where it is missing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found