Open pauleustice opened 5 years ago
I am running on Angular 7, and am having the same problem. It seems like a small problem that a lot of new Angular people run into, and so if you're gonna keep the backwards compatibility, you should at least update the docs to explain to people how to resolve the issue.
Just got the same error while going through the Angular docs for the first time too. Definitely confusing.
@angular/http
API is deprecated in favor of @angular/common/http
. But changing the import source to @angular/common/http
won't solve it bc the API doesn't export those in @angular/http
https://angular.io/api/http
same here
Doing an Angular 7 project and I too am facing this issue. An ugly way of temporarily fixing it is to npm install @angular/http --save-dev @wardbell should have a serious look into this.
I see many duplicate issues opened for same reason. Please do note a PR is already in progress to remove this dependency #223
Hey Guys, give this a try npm install angular-in-memory-web-api --save
npm r angular-in-memory-web-api
npm i -D angular-in-memory-web-api
Hey everyone, For your info the issue has been solved with version 0.8.0: https://github.com/angular/in-memory-web-api/blob/master/CHANGELOG.md#080-2018-12-06 😊
Hi, I've just tried using this module for the first time and ran into this issue:
Version: 0.6.1 Angular Version: 6
When trying to build, I receive this Typescript error, failing the build:
ERROR in node_modules/angular-in-memory-web-api/http-backend.service.d.ts(2,75): error TS2307: Cannot find module '@angular/http'
App module (cut down for brevity):
MockApiService:
As far as I can tell, if one is using the HttpClientInMemoryWebApiModule, there should be no dependencies on
@angular/http
. It's a simple fix tonpm i
it, but seems like a bug nonetheless.