无法从角度5迁移到角度7

时间:2019-12-11 06:34:46

标签: angular

我正在尝试将一个角度项目从角度6迁移到角度7 我的开发人员配置是角度为7,角度为7.1.0 cli

在ng构建期间,出现以下错误

Schema validation failed 
Data path "" should have required property 'tsConfig'.

angular.json文件tsconfig部分

"test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
        "main": "test.ts",
        "karmaConfig": "./karma.conf.js",
        "polyfills": "polyfills.ts",
        "tsConfig": "",
        "scripts": [
          "assets/jquery-3.2.1.min.js",
          "assets/vendor/bootstrap/js/bootstrap.min.js",
        ],
        "styles": [
          "assets/vendor/bootstrap/css/bootstrap.css",
        ],
        "assets": [
          "assets",
          "favicon.ico"
        ]
      }
    },  

这是怎么了?

1 个答案:

答案 0 :(得分:4)

您的tsconfig密钥应提及tsconfig.spec.json文件的位置

"tsConfig": "tsconfig.spec.json",

请在字段中更新文件的位置