cannot find module @angular/http?

cannot find module @angular/http?

run this in terminal:

n

npm install @angular/[email protected]

n

Update for Angular 5+ versions:

n

import {HttpClientModule} from @angular/common/httpnimport {HttpClient} from @angular/common/httpn

n

instead of HttpModule and Http respectively.

The entire @angular/http package has been removed. Use @angular/common/http.nso instead of importing this one

n

@angular/httpn

n

use this

n

@angular/common/httpn

n

for further information about other changes go to Angular- Deprecated APIs and Features

cannot find module @angular/http?

Have you tried adding

n

@angular/http: ^7.1.1,n

n

to your package.json file?nOnce you do run npm install and you should be golden.

Leave a Reply

Your email address will not be published.