Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 架构验证失败,出现以下错误:数据路径“0”&引用;应具有所需的属性';tsConfig';_Angular_Package.json_Tsconfig - Fatal编程技术网

Angular 架构验证失败,出现以下错误:数据路径“0”&引用;应具有所需的属性';tsConfig';

Angular 架构验证失败,出现以下错误:数据路径“0”&引用;应具有所需的属性';tsConfig';,angular,package.json,tsconfig,Angular,Package.json,Tsconfig,最近我把我的angular应用程序移到了另一个文件夹中。从那时起,当我想要构建应用程序时,我遇到以下错误: 架构验证失败,出现以下错误:数据路径“”应具有必需的属性“tsConfig” 我试图在github和stackoverflow中查找,但只找到以下链接: 他们说我必须降级一个包裹: @angular devkit/build angular:“^0.800.1”到“^0.12.4” 但这感觉不是正确的方式 { "name": "@xxx/ma", "version": "1.1.

最近我把我的angular应用程序移到了另一个文件夹中。从那时起,当我想要构建应用程序时,我遇到以下错误:

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

我试图在github和stackoverflow中查找,但只找到以下链接:

他们说我必须降级一个包裹:

@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",
...

您是否将tsconfig文件与其他文件一起移动了?是的,我移动了所有内容,这似乎是新文件路径的问题,所有相对路径是否保持不变?是的,它们保持不变,没有更改您是否尝试删除node_模块和package-lock.json并重新执行npm安装?