angular / in-memory-web-api

The code for this project has moved to the angular/angular repo. This repo is now archived.
MIT License
1.18k stars 230 forks source link

Module not found: Error: Can't resolve '@angular/http' in 'angular-in-memory-web-api' #224

Open ManoharNuli opened 5 years ago

ManoharNuli commented 5 years ago

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.

vishal423 commented 5 years ago

There is already a PR to remove this dependency https://github.com/angular/in-memory-web-api/pull/223

Till that's merged, you need to add @angular/http to your package.json dependencies to make it work

darkn3rd commented 5 years ago

I started with Angular this month, and ran into this issue as well with Tour of Heroes tutorial.

gentunian commented 5 years ago

As @vishal423 says, you could workaround by adding the dependency.

This worked for me:

npm install --save-dev @angular/http
AkatQuas commented 5 years ago

Same issue here. screen shot 2018-12-23 at 12 02 35

CaerusKaru commented 5 years ago

With the release of v0.8.0, this should no longer be an issue. Please update to resolve.

fizhar-alivia commented 4 years ago

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