我尝试在我的项目中使用 ANT Design NG-ZORRO 库。但是当我编译代码时,我收到以下警告:
WARNING in ./node_modules/ng-zorro-antd/fesm5/ng-zorro-antd-core.js 2294:66-84
"export 'ɵɵdefineInjectable' was not found in '@angular/core'
这会导致运行时错误:
Uncaught TypeError: Object(...) is not a function
at ng-zorro-antd-core.js:2294
at Module../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd-core.js (ng-zorro-antd-core.js:2296)
我搜索了互联网并尝试了所涉及软件包的各种版本组合。但无法让它工作。
package.json 的摘录:
"dependencies": {
"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.13",
"@angular/compiler": "^7.2.13",
"@angular/core": "^7.2.13",
"@angular/forms": "^7.2.13",
"@angular/http": "^7.2.13",
"@angular/platform-browser": "^7.2.13",
"@angular/platform-browser-dynamic": "^7.2.13",
"@angular/platform-server": "^7.2.13",
"@angular/router": "^7.2.13",
"@aspnet/signalr": "^1.1.4",
"@fortawesome/angular-fontawesome": "^0.3.0",
"@fortawesome/fontawesome-svg-core": "^1.2.22",
"@fortawesome/free-regular-svg-icons": "^5.10.2",
"@fortawesome/free-solid-svg-icons": "^5.10.2",
"@nguniversal/module-map-ngfactory-loader": "^7.1.1",
"ajv": "^6.10.0",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.3.1",
"core-js": "2.6.5",
"jquery": "^3.4.0",
"messagepack": "^1.1.10",
"ng-zorro-antd": "^8.3.0",
"popper.js": "^1.15.0",
"rtcp-web-viewer": "^2.0.3",
"rxjs": "^6.5.3",
"zone.js": "^0.9.1"
}
我需要做什么来解决这些警告和错误以使包正常工作?