gpt4 book ai didi

angular - 架构验证失败,出现以下错误 : Data path "" should have required property 'tsConfig'

转载 作者:行者123 更新时间:2023-12-03 08:47:08 48 4
gpt4 key购买 nike

最近我将我的 Angular 应用程序移动到了一些不同的文件夹中。从那时起,当我想构建应用程序时,我收到此错误:

架构验证失败,并出现以下错误:数据路径“”应具有必需的属性“tsConfig”

我尝试在 github 和 stackoverflow 中查找,只找到了这些链接:

https://github.com/angular/angular-cli/issues/11479

他们说我必须降级软件包:

“@angular-devkit/build-angular”:“^0.800.1”到“^0.12.4”

但这感觉不是正确的方式

{
"name": "@xxx/ma",
"version": "1.1.0",
"private": true,
"license": "UNLICENSED",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.js",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"doc": "compodoc -p src/tsconfig.app.json -s"
},
"dependencies": {
"@angular/animations": "~8.2.1",
"@angular/cdk": "~8.2.1",
"@angular/common": "~8.2.1",
"@angular/compiler": "~8.2.1",
"@angular/core": "~8.2.1",
"@angular/flex-layout": "8.0.0-beta.27",
"@angular/forms": "~8.2.1",
"@angular/material": "~8.2.1",
"@angular/platform-browser": "~8.2.1",
"@angular/platform-browser-dynamic": "~8.2.1",
"@angular/platform-server": "~8.2.1",
"@angular/pwa": "~0.802.1",
"@angular/router": "~8.2.1",
"@angular/service-worker": "~8.2.1",
"@progress/kendo-angular-buttons": "~5.0.0",
"@progress/kendo-angular-charts": "~4.0.1",
"@progress/kendo-angular-common": "~1.1.0",
"@progress/kendo-angular-dateinputs": "~4.0.1",
"@progress/kendo-angular-dropdowns": "~4.0.0",
"@progress/kendo-angular-excel-export": "~3.0.1",
"@progress/kendo-angular-grid": "~4.1.1",
"@progress/kendo-angular-inputs": "~6.1.1",
"@progress/kendo-angular-intl": "~2.0.0",
"@progress/kendo-angular-l10n": "~2.0.0",
"@progress/kendo-angular-menu": "~2.0.0",
"@progress/kendo-angular-popup": "~3.0.1",
"@progress/kendo-angular-scrollview": "~3.0.0",
"@progress/kendo-angular-tooltip": "~2.1.0",
"@progress/kendo-angular-treeview": "~4.0.1",
"@progress/kendo-angular-pdf-export": "~2.0.0",
"@progress/kendo-data-query": "~1.5.1",
"@progress/kendo-drawing": "~1.5.12",
"@progress/kendo-theme-default": "~4.1.0",
"@progress/kendo-theme-material": "~3.2.0",
"classlist.js": "^1.1.20150312",
"file-saver": "^2.0.1",
"hammerjs": "^2.0.8",
"jsqr": "^1.0.4",
"localforage": "^1.5.6",
"material-design-icons": "^3.0.1",
"normalize.css": "^7.0.0",
"node-sass": "~4.12.0",
"roboto-fontface": "^0.10.0",
"rxjs": "~6.5.3",
"rxjs-compat": "~6.3.3",
"tslib": "^1.9.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.4",
"@angular-devkit/build-ng-packagr": "~0.803.4",
"@angular-builders/jest": "~8.2.0",
"@angular/cli": "~8.3.4",
"@angular/compiler-cli": "~8.2.1",
"@angular/language-service": "~8.2.1",
"@compodoc/compodoc": "~1.1.10",
"@types/express": "~4.17.1",
"@types/hammerjs": "^2.0.36",
"@types/jest": "~24.0.18",
"@types/node": "12.7.5",
"codelyzer": "^4.5.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.1",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"tslint-config-prettier": "~1.18.0",
"typescript": "~3.5.3"
}
}

这是我的 angular.json。我的架构有什么问题吗?

最佳答案

检查你的 angular.json 文件

构建配置中可能缺少 tsconfig.json 路径

          "builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/...",
"index": "projects/.../src/index.html",
"main": "projects/.../src/main.ts",
"polyfills": "projects/.../src/polyfills.ts",
"tsConfig": "projects/.../tsconfig.app.json",
...

关于angular - 架构验证失败,出现以下错误 : Data path "" should have required property 'tsConfig' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60950446/

48 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com