角度从8迁移到角度9-错误NG8001

时间:2020-10-15 12:46:29

标签: angular9

当我尝试升级角度版本时。遇到错误- 错误NG8001:“ angular2-multiselect”不是已知元素:

  1. 如果“ angular2-multiselect”是Angular组件,则请验证它是否属于此模块。
  2. 如果“ angular2-multiselect”是Web组件,则将“ CUSTOM_ELEMENTS_SCHEMA”添加到该组件的“ @ NgModule.schemas”以禁止显示此消息。
{
  "name": "Testing",
  "version": "2.0.0-snapshot",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve --live-reload false",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "postinstall": "ngcc"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^9.1.12",
    "@angular/compiler": "^9.1.12",
    "@angular/core": "^9.1.12",
    "@angular/forms": "^9.1.12",
    "@angular/platform-browser": "^9.1.12",
    "@angular/platform-browser-dynamic": "^9.1.12",
    "@angular/router": "^9.1.12",
    "@types/alfa-browser-services": "^1.0.0",
    "angular-l10n": "^5.2.0",
    "angular2-multiselect-dropdown": "^4.6.4",
    "chart.js": "^2.9.3",
    "core-js": "^3.6.5",
    "font-awesome": "^4.7.0",
    "jquery": "^3.5.1",
    "ng2-charts": "^2.4.2",
    "ngx-pagination": "^5.0.0",
    "rxjs": "^6.5.3",
    "rxjs-compat": "^6.6.3",
    "stacktrace-js": "^2.0.2",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.12",
    "@angular/cli": "^9.1.12",
    "@angular/compiler-cli": "^9.1.12",
    "@types/jasmine": "^3.5.14",
    "@types/jquery": "^3.5.3",
    "@types/node": "^12.11.1",
    "codelyzer": "^5.1.2",
    "jasmine-core": "^3.6.0",
    "jasmine-spec-reporter": "^6.0.0",
    "karma": "^5.2.3",
    "karma-chrome-launcher": "^3.1.0",
    "karma-cli": "^2.0.0",
    "karma-coverage-istanbul-reporter": "^3.0.3",
    "karma-jasmine": "^4.0.1",
    "ng2-slim-loading-bar": "^4.0.0",
    "protractor": "^7.0.0",
    "ts-node": "7.0.1",
    "tslint": "^5.8.0",
    "typescript": "3.8.3"
  }
}```

It was working fine on previous version.

0 个答案:

没有答案