Error while executing Angular command – ng serve

  angular, angular10

I have upgraded my Angular project to v10. While doing ng serve I am getting below error message

ERROR in node_modules/angular4-multiselect-dropdown/dist/multiselect.component.d.ts:72:22 – error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

This likely means that the library
(angular4-multiselect-dropdown/angular4-multiselect-dropdown) which
declares AngularMultiSelectModule has not been processed correctly by
ngcc, or is not compatible with Angular Ivy. Check if a newer version
of the library is available, and update if so. Also consider checking
with the library’s authors to see if the library is expected to be
compatible with Ivy.

I installed angular4-multiselect-dropdown package using the following command

npm install [email protected]

My package looks like below

{
  "name": "ng4",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "build-prod": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "postinstall": "ngcc"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/schematics": "0.0.34",
    "@angular/animations": "9.1.13",
    "@angular/cdk": "^10.2.7",
    "@angular/common": "10.2.5",
    "@angular/compiler": "10.2.5",
    "@angular/core": "10.2.5",
    "@angular/forms": "^10.2.5",
    "@angular/http": "4.4.5",
    "@angular/platform-browser": "^10.2.5",
    "@angular/platform-browser-dynamic": "9.1.13",
    "@angular/router": "9.1.13",
    "@ngrx/core": "1.2.0",
    "@ngrx/effects": "^10.1.2",
    "@ngrx/store": "^10.1.2",
    "@types/lodash": "4.14.85",
    "angular-sanitize": "^1.8.0",
    "angular4-multiselect-dropdown": "^2.0.0",
    "bootstrap": "^3.4.1",
    "classlist.js": "1.1.20150312",
    "core-js": "2.4.1",
    "decode-html": "^2.0.0",
    "font-awesome": "4.7.0",
    "immutable": "3.8.2",
    "jquery": "3.2.1",
    "lodash": "4.17.4",
    "moment": "2.20.1",
    "ngx-bootstrap": "^6.2.0",
    "ngx-logger": "^4.2.1",
    "rxjs": "6.6.2",
    "rxjs-compat": "^6.6.7",
    "tslib": "^2.0.0",
    "zone.js": "^0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1002.3",
    "@angular/cli": "^10.2.3",
    "@angular/compiler-cli": "10.2.5",
    "@angular/language-service": "10.2.5",
    "@types/jasmine": "2.5.53",
    "@types/jasminewd2": "2.0.2",
    "@types/jquery": "3.2.16",
    "@types/node": "^12.11.1",
    "codelyzer": "^5.1.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "3.2.0",
    "tslint": "~6.1.0",
    "typescript": "^3.9.2"
  }
}

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.