Angular 在配置文件“tsconfig.json”中未找到任何输入。指定的“包含”路径以角度6表示

Angular 在配置文件“tsconfig.json”中未找到任何输入。指定的“包含”路径以角度6表示,angular,Angular,我正在将angular 4升级到angular 6应用程序。我在构建应用程序时遇到以下错误 error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["../../node_modules/@wtw/**/*"]' and 'exclude' paths were '["**/*.sp ec.ts","**/*.stub.ts","test/**/*.t

我正在将angular 4升级到angular 6应用程序。我在构建应用程序时遇到以下错误

error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["../../node_modules/@wtw/**/*"]' and 'exclude' paths were '["**/*.sp
ec.ts","**/*.stub.ts","test/**/*.ts"]'.

Error: error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["../../node_modules/@wtw/**/*"]' and 'exclude' paths were '["
**/*.spec.ts","**/*.stub.ts","test/**/*.ts"]'.
如果我将**/*添加到include,我会得到以下错误,并且上述错误消失

ERROR in e2e/app.e2e-spec.ts(3,1): error TS2304: Cannot find name 'describe'.
e2e/app.e2e-spec.ts(6,3): error TS2304: Cannot find name 'beforeEach'.
e2e/app.e2e-spec.ts(10,3): error TS2304: Cannot find name 'it'.
e2e/app.e2e-spec.ts(12,5): error TS2304: Cannot find name 'expect'.
tsconfig

{
  "compileOnSave": false,

  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types",
      "type-definition"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  },

  "include": [
    "../node_modules/@wtw/**/*",
    "**/*"
  ]
}

如何解决此问题。

因为错误显示“排除”路径为“[/.spec.ts、/.stub.ts、test/***.ts]”, 您需要在tsconfig.app.json文件所在的目录或子目录中有一个*.ts文件,其中声明了include和exclude属性

include和exclude属性获取一个类似glob的文件模式列表。支持的全局通配符包括:

“*”匹配零个或多个字符(不包括目录分隔符) “?”匹配除目录分隔符以外的任何一个字符 “**/”递归地匹配任何子目录 如果glob模式的某个段仅包含*或*,则如果allowJs设置为true,则默认情况下,.js和.jsx仅包含扩展名受支持的文件,例如.ts、.tsx和.d.ts