我尝试将primeng版本从~4.1.0升级到~5.2.7,并在我{angular {cli} app npm run build
时收到错误。我刚刚更新了package.json并且做了npm i。有什么办法可以做到这一点吗?
的package.json
之前:
"dependencies": {
"@angular/animations": "^4.2.0",
"@angular/common": "^4.2.0",
"@angular/compiler": "^4.2.0",
"@angular/core": "^4.2.0",
"@angular/forms": "^4.2.0",
"@angular/http": "^4.2.0",
"@angular/platform-browser": "^4.2.0",
"@angular/platform-browser-dynamic": "^4.2.0",
"@angular/router": "^4.2.0",
"@ngscaffolding/core": "^1.1.12",
"babel-polyfill": "^6.23.0",
"chart.js": "2.1.3",
"core-js": "^2.4.1",
"d3": "^4.10.2",
"font-awesome": "^4.7.0",
"fullcalendar": "^3.1.0",
"intl": "^1.2.5",
"jquery": "^3.1.1",
"moment": "^2.17.1",
"nanoscroller": "0.8.7",
"ng-drag-drop": "^4.0.0",
"ngx-progressbar": "^2.1.1",
"oidc-client": "^1.3.0",
"primeng": "~4.1.0",
"quill": "^1.1.8",
"rxjs": "^5.2.0",
"web-animations-js": "^2.2.2",
"zone.js": "0.8.5"
}
后:
"dependencies": {
"@angular/animations": "^4.2.0",
"@angular/common": "^4.2.0",
"@angular/compiler": "^4.2.0",
"@angular/core": "^4.2.0",
"@angular/forms": "^4.2.0",
"@angular/http": "^4.2.0",
"@angular/platform-browser": "^4.2.0",
"@angular/platform-browser-dynamic": "^4.2.0",
"@angular/router": "^4.2.0",
"@ngscaffolding/core": "^1.1.12",
"babel-polyfill": "^6.23.0",
"chart.js": "2.1.3",
"core-js": "^2.4.1",
"d3": "^4.10.2",
"font-awesome": "^4.7.0",
"fullcalendar": "^3.1.0",
"intl": "^1.2.5",
"jquery": "^3.1.1",
"moment": "^2.17.1",
"nanoscroller": "0.8.7",
"ng-drag-drop": "^4.0.0",
"ngx-progressbar": "^2.1.1",
"oidc-client": "^1.3.0",
**"primeng": "~5.2.7",**
"quill": "^1.1.8",
"rxjs": "^5.2.0",
"web-animations-js": "^2.2.2",
"zone.js": "0.8.5"
}
但是得到错误:
ERROR in Error: Metadata version mismatch for module C:/Projects/Latest_Nov20/FrontEnd/OdyssEY-UI-Host/node_modules/primeng/components/accordion/accordion.d.ts, found version 4, expected 3, resolving symbol PRIME_COMPONENTS in C:/Projects/Latest_Nov20/FrontEnd/OdyssEY-UI-Host/src/app/app.prime.components.ts, resolving symbol AppModule in C:/Projects/Latest_Nov20/FrontEnd/OdyssEY-UI-Host/src/app/app.module.ts, resolving symbol AppModule in C:/Projects/Latest_Nov20/FrontEnd/OdyssEY-UI-Host/src/app/app.module.ts