英文:
Error: Cannot resolve type entity i29.DragAndDropModule to symbol
问题
升级从Angular 15到16后出现了意外错误。
解决方案包含设置 "preserveSymlinks": true。
{
"name": "xxxxx-web",
"version": "0.0.312",
"build": {
"appId": "com.electon.xxxxx-Web",
"main": "main.js",
"productName": "xxxxx-Web",
"files": [
"main.js",
"dist/xxxxx-web"
],
"win": {
"icon": "./img/icon.ico",
"target": "msi"
}
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"prebuild": "npm --no-git-tag-version version patch",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"electron": "ng build --base-href ./ && electron .",
"electron-build": "ng build --configuration production --base-href ./ && electron .",
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=src/assets/icons/mac/icon.icns --prune=true --out=release-builds",
"package-win": "electron-packager . xxxxx-web --overwrite --asar --platform=win32 --arch=ia32 --icon=src/assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"xxxxx-Web\"",
"package-linux": "electron-packager . xxxxx-web --overwrite --asar=true --platform=linux --arch=x64 --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds",
"package-lin-arm71": "electron-packager . xxxxx-web --overwrite --platform=linux --arch=armv7l --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds",
"package-lin-arm64": "electron-packager . xxxxx-web --overwrite --platform=linux --arch=arm64 --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds"
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.4",
"@angular/cdk": "^16.0.3",
"@angular/common": "^16.0.4",
"@angular/compiler": "^16.0.4",
"@angular/core": "^16.0.4",
"@angular/forms": "^16.0.4",
"@angular/google-maps": "^16.0.3",
"@angular/localize": "^16.0.4",
"@angular/material": "^16.0.3",
"@angular/material-luxon-adapter": "^16.0.3",
"@angular/platform-browser": "^16.0.4",
"@angular/platform-browser-dynamic": "^16.0.4",
"@angular/router": "^16.0.4",
"@microsoft/signalr": "^7.0.5",
"@ngx-loading-bar/core": "^6.0.2",
"@ngx-loading-bar/router": "^6.0.2",
"@progress/kendo-angular-barcodes": "^12.1.0",
"@progress/kendo-angular-buttons": "^12.1.0",
"@progress/kendo-angular-charts": "^12.1.0",
"@progress/kendo-angular-common": "^12.1.0",
"@progress/kendo-angular-dateinputs": "^12.1.0",
"@progress/kendo-angular-dialog": "^12.1.0",
"@progress/kendo-angular-dropdowns": "^12.1.0",
"@progress/kendo-angular-editor": "^12.1.0",
"@progress/kendo-angular-excel-export": "^12.1.0",
"@progress/kendo-angular-gauges": "^12.1.0",
"@progress/kendo-angular-grid": "^12.1.0",
"@progress/kendo-angular-icons": "^12.1.0",
"@progress/kendo-angular-indicators": "^12.1.0",
"@progress/kendo-angular-inputs": "^12.1.0",
"@progress/kendo-angular-intl": "^12.1.0",
"@progress/kendo-angular-l10n": "^12.1.0",
"@progress/kendo-angular-label": "^12.1.0",
"@progress/kendo-angular-layout": "^12.1.0",
"@progress/kendo-angular-listview": "^12.1.0",
"@progress/kendo-angular-menu": "^12.1.0",
"@progress/kendo-angular-navigation": "^12.1.0",
"@progress/kendo-angular-notification": "^12.1.0",
"@progress/kendo-angular-pager": "^12.1.0",
"@progress/kendo-angular-pdf-export": "^12.1.0",
"@progress/kendo-angular-popup": "^12.1.0",
"@progress/kendo-angular-progressbar": "^12.1.0",
"@progress/kendo-angular-scheduler": "^12.1.0",
"@progress/kendo-angular-scrollview": "^12.1.0",
"@progress/kendo-angular-sortable": "^12.1.0",
"@progress/kendo-angular-toolbar": "^12.1.0",
"@progress/kendo-angular-tooltip": "^12.1.0",
"@progress/kendo-angular-treeview": "^12.1.0",
"@progress/kendo-angular-upload": "^12.1.0",
"@progress/kendo-data-query": "^1.6.0",
"@progress/kendo-date-math": "^1.5.11",
"@progress/kendo-drawing": "^1.17.5",
"@progress/kendo-file-saver": "^1.1.1",
"@progress/kendo-licensing": "^1.3.0",
"@progress/kendo-recurrence": "^1.0.3",
"@progress/kendo-svg-icons": "^1.5.0",
"@progress/kendo-theme-default": "^6.4.0",
"angular-user-idle": "^4.0.0",
"bootstrap": "^5.3.0",
"d3": "^7.8.5",
"d3-org-chart": "^2.7.0",
"electron": "^25.0.1",
"electron-packager": "^17.1.1",
"exceljs": "^4.3.0",
"file-saver": "^2.0.5",
"hammerjs": "^2.0.8",
"jquery": "^3.7.0",
"jszip": "^3.10.1",
"luxon": "^3.3.0",
"mammoth": "^1
<details>
<summary>英文:</summary>
After upgrading from Angular 15 to 16 getting the same error for ./src/main.ts and ./src/polyfills.ts Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Cannot resolve type entity i29.DragAndDropModule to symbol.
Solution contains the setting "preserveSymlinks": true
{
"name": "xxxxx-web",
"version": "0.0.312",
"build": {
"appId": "com.electon.xxxxx-Web",
"main": "main.js",
"productName": "xxxxx-Web",
"files": [
"main.js",
"dist/xxxxx-web"
],
"win": {
"icon": "./img/icon.ico",
"target": "msi"
}
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"prebuild": "npm --no-git-tag-version version patch",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"electron": "ng build --base-href ./ && electron .",
"electron-build": "ng build --configuration production --base-href ./ && electron .",
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=src/assets/icons/mac/icon.icns --prune=true --out=release-builds",
"package-win": "electron-packager . xxxxx-web --overwrite --asar --platform=win32 --arch=ia32 --icon=src/assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="xxxxx-Web"",
"package-linux": "electron-packager . xxxxx-web --overwrite --asar=true --platform=linux --arch=x64 --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds",
"package-lin-arm71": "electron-packager . xxxxx-web --overwrite --platform=linux --arch=armv7l --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds",
"package-lin-arm64": "electron-packager . xxxxx-web --overwrite --platform=linux --arch=arm64 --icon=src/assets/icons/png/icon.png --prune=true --out=release-builds"
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.4",
"@angular/cdk": "^16.0.3",
"@angular/common": "^16.0.4",
"@angular/compiler": "^16.0.4",
"@angular/core": "^16.0.4",
"@angular/forms": "^16.0.4",
"@angular/google-maps": "^16.0.3",
"@angular/localize": "^16.0.4",
"@angular/material": "^16.0.3",
"@angular/material-luxon-adapter": "^16.0.3",
"@angular/platform-browser": "^16.0.4",
"@angular/platform-browser-dynamic": "^16.0.4",
"@angular/router": "^16.0.4",
"@microsoft/signalr": "^7.0.5",
"@ngx-loading-bar/core": "^6.0.2",
"@ngx-loading-bar/router": "^6.0.2",
"@progress/kendo-angular-barcodes": "^12.1.0",
"@progress/kendo-angular-buttons": "^12.1.0",
"@progress/kendo-angular-charts": "^12.1.0",
"@progress/kendo-angular-common": "^12.1.0",
"@progress/kendo-angular-dateinputs": "^12.1.0",
"@progress/kendo-angular-dialog": "^12.1.0",
"@progress/kendo-angular-dropdowns": "^12.1.0",
"@progress/kendo-angular-editor": "^12.1.0",
"@progress/kendo-angular-excel-export": "^12.1.0",
"@progress/kendo-angular-gauges": "^12.1.0",
"@progress/kendo-angular-grid": "^12.1.0",
"@progress/kendo-angular-icons": "^12.1.0",
"@progress/kendo-angular-indicators": "^12.1.0",
"@progress/kendo-angular-inputs": "^12.1.0",
"@progress/kendo-angular-intl": "^12.1.0",
"@progress/kendo-angular-l10n": "^12.1.0",
"@progress/kendo-angular-label": "^12.1.0",
"@progress/kendo-angular-layout": "^12.1.0",
"@progress/kendo-angular-listview": "^12.1.0",
"@progress/kendo-angular-menu": "^12.1.0",
"@progress/kendo-angular-navigation": "^12.1.0",
"@progress/kendo-angular-notification": "^12.1.0",
"@progress/kendo-angular-pager": "^12.1.0",
"@progress/kendo-angular-pdf-export": "^12.1.0",
"@progress/kendo-angular-popup": "^12.1.0",
"@progress/kendo-angular-progressbar": "^12.1.0",
"@progress/kendo-angular-scheduler": "^12.1.0",
"@progress/kendo-angular-scrollview": "^12.1.0",
"@progress/kendo-angular-sortable": "^12.1.0",
"@progress/kendo-angular-toolbar": "^12.1.0",
"@progress/kendo-angular-tooltip": "^12.1.0",
"@progress/kendo-angular-treeview": "^12.1.0",
"@progress/kendo-angular-upload": "^12.1.0",
"@progress/kendo-data-query": "^1.6.0",
"@progress/kendo-date-math": "^1.5.11",
"@progress/kendo-drawing": "^1.17.5",
"@progress/kendo-file-saver": "^1.1.1",
"@progress/kendo-licensing": "^1.3.0",
"@progress/kendo-recurrence": "^1.0.3",
"@progress/kendo-svg-icons": "^1.5.0",
"@progress/kendo-theme-default": "^6.4.0",
"angular-user-idle": "^4.0.0",
"bootstrap": "^5.3.0",
"d3": "^7.8.5",
"d3-org-chart": "^2.7.0",
"electron": "^25.0.1",
"electron-packager": "^17.1.1",
"exceljs": "^4.3.0",
"file-saver": "^2.0.5",
"hammerjs": "^2.0.8",
"jquery": "^3.7.0",
"jszip": "^3.10.1",
"luxon": "^3.3.0",
"mammoth": "^1.6.0",
"ng-image-fullscreen-view": "^3.0.3",
"ng-otp-input": "^1.9.2",
"ng-qrcode": "^16.0.0",
"ngx-doc-viewer": "^15.0.1",
"ngx-image-cropper": "^6.3.4",
"ngx-otp-input": "^0.11.4",
"ngx-ui-loader": "^13.0.0",
"ngx-webcam": "^0.4.1",
"ngx-webstorage": "^12.0.0",
"ngx-youtube-player": "^12.0.2",
"popper.js": "^1.16.1",
"powerbi-client-angular": "^3.0.5",
"powerbi-report-authoring": "^2.0.0",
"rxjs": "^7.4.0",
"tslib": "^2.5.3",
"zone.js": "^0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.4",
"@angular/cli": "^16.0.4",
"@angular/compiler-cli": "^16.0.4",
"@types/d3": "^7.4.0",
"@types/d3-org-chart": "^2.6.3",
"@types/file-saver": "^2.0.5",
"@types/jasmine": "^4.3.2",
"@types/luxon": "^3.3.0",
"@types/node": "^20.2.5",
"codelyzer": "^6.0.2",
"electron-builder": "^23.6.0",
"jasmine-core": "^5.0.0",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.0",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"protractor": "^7.0.0",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"typescript": "^4.9.5",
"yarn-upgrade-all": "^0.7.2"
}
}
Upgraded from Angular 15 to 16 with unexpected errors.
</details>
# 答案1
**得分**: 3
以下是翻译好的部分:
- `npm i @progress/kendo-angular-utils --save`
- `npm i @progress/kendo-angular-navigation --save`
<details>
<summary>英文:</summary>
Some of your imported kendo packages need kendo utils.
This should fix it:
- `npm i @progress/kendo-angular-utils --save`
- `npm i @progress/kendo-angular-navigation --save`
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论