4

I'm using jhipster to develop a Spring-Boot+Angular app. However, I'm getting this error while using primeng 5.6.0 with angular 5.6.0 in my project:

ERROR in [at-loader] ./src/main/webapp/app/primeng/data/datascroller/datascrollerdemo.module.ts:4:28 TS2307: Cannot find module '@angular/http'.

Any help would be approeciated.

Vikas
  • 11,859
  • 7
  • 45
  • 69
user1723583
  • 553
  • 1
  • 6
  • 18
  • `@angular/http` has been deprecated since 5.0.0. see https://stackoverflow.com/questions/45207615/cannot-find-the-angular-common-http-module/45207906#45207906 and https://github.com/angular/angular/blob/master/CHANGELOG.md#deprecated-code – Pengyy Apr 25 '18 at 07:49
  • Possible duplicate of [Cannot find the '@angular/common/http' module](https://stackoverflow.com/questions/45207615/cannot-find-the-angular-common-http-module) – Nico Haase Apr 25 '18 at 07:58

1 Answers1

5

Run the command

npm install @angular/http --save

and restart your application.

Basically, there is HTTP package is missing in your project so it is throwing this error

Update

As you are using Angular 5.6.0 it should be HttpClientModule since HttpModule is deprecated in previous versions of Angular

Community
  • 1
  • 1
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215