我已将我的 Angular 项目从 v8.0 更新到 v11.2 并出现以下错误。尝试解决了几次,仍然没有运气,请有人指导。
以下是我的错误
错误:node_modules/@nebular/theme/schematics/util/ast.d.ts:2:34 - 错误 TS2307:找不到模块“@angular-devkit/core/src/experimental/workspace”或其相应的类型声明。
2 从 '@angular-devkit/core/src/experimental/workspace' 导入 { WorkspaceProject };~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
错误:node_modules/@nebular/theme/schematics/util/project.d.ts:2:34 - 错误 TS2307:找不到模块“@angular-devkit/core/src/experimental/workspace”或其相应的类型声明。
2 从 '@angular-devkit/core/src/experimental/workspace' 导入 { WorkspaceProject };
下面是 package.json 文件
{
"name": "portal",
"version": "0.1.0",
"license": "",
"scripts": {
"ng": "ng",
"conventional-changelog": "conventional-changelog",
"start": "ng serve",
"build": "ng build",
"build:prod": "npm run build -- --configuration production --aot",
"test": "ng test",
"test:coverage": "rimraf coverage && npm run test -- --code-coverage",
"lint": "ng lint",
"lint:fix": "ng lint portal --fix",
"lint:styles": "stylelint ./src/**/*.scss",
"lint:ci": "npm run lint && npm run lint:styles",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "ng e2e",
"docs": "compodoc -p src/tsconfig.app.json -d docs",
"docs:serve": "compodoc -p src/tsconfig.app.json -d docs -s",
"prepush": "npm run lint:ci",
"release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s",
"predeploy": "npm run build:prod",
},
"dependencies": {
"@angular/animations": "11.2.8",
"@angular/cdk": "10.2.7",
"@angular/common": "11.2.8",
"@angular/compiler": "11.2.8",
"@angular/core": "11.2.8",
"@angular/forms": "11.2.8",
"@angular/material": "10.2.7",
"@angular/platform-browser": "11.2.8",
"@angular/platform-browser-dynamic": "11.2.8",
"@angular/router": "11.2.8",
"@asymmetrik/ngx-leaflet": "3.0.1",
"@nebular/auth": "^6.2.1",
"@nebular/bootstrap": "^6.2.1",
"@nebular/eva-icons": "^6.2.1",
"@nebular/security": "^6.2.1",
"@nebular/theme": "^6.2.1",
"acorn": "6.1.0",
"amazon-cognito-identity-js": "^3.0.13",
"angular2-toaster": "^7.0.0",
"bootstrap": "^4.3.1",
"chart.js": "^2.8.0",
"chartjs-plugin-datalabels": "^0.7.0",
"classlist.js": "1.1.20150312",
"core-js": "2.5.1",
"devextreme": "^19.1.4",
"devextreme-angular": "^19.1.4",
"eva-icons": "^1.1.3",
"fine-uploader": "^5.16.2",
"intl": "1.2.5",
"ionicons": "2.0.1",
"jwt-decode": "^3.1.2",
"local-cors-proxy": "^1.0.2",
"moment": "^2.24.0",
"nebular-icons": "1.1.0",
"ng2-charts": "^2.3.0",
"ngx-bootstrap": "^5.6.2",
"ngx-logger": "^3.4.0",
"node-sass": "^4.12.0",
"normalize.css": "6.0.0",
"pace-js": "1.0.2",
"pdfmake": "^0.1.70",
"roboto-fontface": "0.8.0",
"rxjs": "^6.6.3",
"rxjs-compat": "6.3.0",
"tslib": "^2.0.0",
"typeface-exo": "0.0.22",
"uuid": "8.3.2",
"web-animations-js": "^2.3.2",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.6",
"@angular-devkit/schematics": "11.2.8",
"@angular/cli": "11.2.8",
"@angular/compiler-cli": "11.2.8",
"@angular/language-service": "11.2.8",
"@compodoc/compodoc": "^1.1.10",
"@fortawesome/fontawesome-free": "^5.2.0",
"@schematics/angular": "^11.2.8",
"@types/d3-color": "1.0.5",
"@types/googlemaps": "^3.30.4",
"@types/jasminewd2": "2.0.10",
"@types/leaflet": "1.2.3",
"@types/node": "^12.11.1",
"@types/uuid": "^3.4.6",
"codelyzer": "^6.0.0",
"conventional-changelog-cli": "1.3.4",
"husky": "0.13.3",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.16",
"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",
"mime-types": "^2.1.24",
"npm-run-all": "4.0.2",
"protractor": "~7.0.0",
"rimraf": "2.6.1",
"stylelint": "^11.0.0",
"ts-node": "3.2.2",
"tslint": "~6.1.0",
"tslint-language-service": "^0.9.9",
"typescript": "4.0.5"
}
}
任何建议都会有所帮助,谢谢