You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Module not found: Error: Can't resolve '@angular/http' in 'angular-in-memory-web-api' #224
Tour of Heroes App In memory example as mentioned in angular.io is not working.
Make this compatible with Angular 7.
Please adopt the latest http module as per latest versions of angular.
Module directory has been changed from @angular/http to @angular/common/http in the latest versions of the Angular.
Reacted by Adel, Alex, Bradley Dice, Joaquin Menchaca, Klas Persson, Sebastian, だにぃり, Rohankaj116, Kalyan A and Johnny Bravo
As @vishal423 says, you could workaround by adding the dependency.
This worked for me:
npm install --save-dev @angular/http
Reacted by だにぃり, Guillaume Liautard (Pro), aixiaobenaixiaoben, SerineBagdasaryan, Noe Sebastian, Daler Azimov, Askhat B., SidhanshuB, Stephen Trewick, Maria Silva and 8 more
Reacted by Askhat B., pornlab, sagarkakadiya and Shazaib Rahman
Reacted by Rodrigo Scotti, sagarkakadiya and Shazaib Rahman
im continuously facing this error i.e, module not found: Error: Can't resolve 'angular-in-memory-web-api' in '\my-prod-app\src\app' Even after intalling @angular/http through cmd. My angular version is 8
Activity
vishal423 commentedon Dec 7, 2018
There is already a PR to remove this dependency #223
Till that's merged, you need to add
@angular/httpto your package.json dependencies to make it workdarkn3rd commentedon Dec 13, 2018
I started with Angular this month, and ran into this issue as well with Tour of Heroes tutorial.
gentunian commentedon Dec 18, 2018
As @vishal423 says, you could workaround by adding the dependency.
This worked for me:
AkatQuas commentedon Dec 23, 2018
Same issue here.

CaerusKaru commentedon Dec 25, 2018
With the release of v0.8.0, this should no longer be an issue. Please update to resolve.
fizhar-alivia commentedon Feb 3, 2020
im continuously facing this error i.e, module not found: Error: Can't resolve 'angular-in-memory-web-api' in '\my-prod-app\src\app' Even after intalling @angular/http through cmd. My angular version is 8