我正在升级我的角4到角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/**/*",
"**/*"
]
}我该如何解决这个问题。
发布于 2018-11-09 09:22:23
由于错误显示‘’路径为“__/.”、“test/**/*. to”,因此需要在目录或子目录中有一个*.ts文件,在该目录或子目录中,tsconfig.app.json文件包含声明的包含属性和排除属性。
“包含”和“排除”属性接受一个类似glob文件模式的列表。支持的glob通配符是:
如果一个glob模式的一个片段只包含*或.*,那么只包含具有受支持扩展名的文件(例如,.ts、.tsx和.d.ts默认情况下与.js和.jsx一起使用,如果allowJs设置为true)。
https://stackoverflow.com/questions/52442315
复制相似问题