Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Cannot find module "@angular/common/http" #48

Open
allabs4limp opened this issue May 31, 2018 · 1 comment
Open

Cannot find module "@angular/common/http" #48

allabs4limp opened this issue May 31, 2018 · 1 comment

Comments

@allabs4limp
Copy link

I have upgraded my npm to the latest version. The npm folder in my Visual Studio Application reads v6.0.3 while my package.json file also corresponds to this version 6.0.3.

But anytime i run my application i get the error cannot find module on the broswer
angular

I believe HttpClient is used in versions above 3x but obviously have a higher version installed.

Please HELP!!!!!!!!!!!

@akaNightmare
Copy link

Did you include HttpModule in app.module.ts?
should be like this:

// app.module.ts:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { HttpClientModule } from '@angular/common/http';

@NgModule({
  imports: [
    BrowserModule,
    // Include it under 'imports' in your application module
    // after BrowserModule.
    HttpClientModule,
  ],
})
export class MyAppModule {}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants