Topic: Cannot find module '@angular/http'

Nexcom pro asked 6 years ago


Hello, After including MDB Pro into our angular5 project, I am getting an error during a compilation time: `ERROR in node_modules/ng-uikit-pro-standard/ng-uikit-pro-standard/pro/autocomplete/services/data-factory.service.d.ts(1,22): error TS2307: Cannot find module '@angular/http'` Our configuration is: ``` Angular CLI: 1.6.7 Node: 9.8.0 OS: win32 x64 Angular: 5.2.1 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router @angular/cdk: 5.2.0 @angular/cli: 1.6.7 @angular/flex-layout: 2.0.0-beta.12 @angular/material-moment-adapter: 5.2.0 @angular/material: 5.2.0 @ngtools/json-schema: 1.1.0 typescript: 2.6.2 webpack-bundle-analyzer: 2.10.0 webpack: 3.10.0 ``` I tried to do npm i @angular/http, but after doing it the 'ng-uikit-pro-standard' path becomes unavailable at this line import { MDBBootstrapModulesPro } from 'ng-uikit-pro-standard'; Then, after doing a npm uninstall @angular/http i am getting to the initial state of the described problem. Thanks in advance. Marko

Damian Gemza staff commented 6 years ago

Dear Nexcom, ng-uikit-pro-standard is compatible with Angular 6. Please update your project to Angular 6, or use our old repo which is compatible with Angular 5: https://git.mdbootstrap.com/mdb/angular/ng-pro Best Regards, Damian

Dmitriy Dementor free answered 6 years ago


The same issue. Latest angular, latest ng-uikit-pro-standard (7.0.0)


Damian Gemza staff commented 6 years ago

Please execute npm install @angular/http command in your application terminal. Should work

Best Regards,

Damian



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags