[英]No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were in Angular 6
I am upgrading my angular 4 to angular 6 application. 我正在将我的4号角升级到6号角应用。 I am getting the following error while building my application.
构建我的应用程序时出现以下错误。
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"]'.
If I add "**/*" to the include I get the following error and the above error dissapears. 如果将“ ** / *”添加到包含项中,则会出现以下错误,并且上述错误消失。
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 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/**/*",
"**/*"
]
}
How do I resolve this issue. 我该如何解决此问题。
Because the error says 'exclude' paths were '[" / .spec.ts"," / .stub.ts","test/**/*.ts"]', You need to have a *.ts file in the directory or sub directory, in which the tsconfig.app.json file resides with the include and exclude properties declared. 因为错误说'排除'路径是'[ “/ .spec.ts”, “/ .stub.ts”, “测试/ ** / *。TS”]',你需要有一个*的.ts文件tsconfig.app.json文件所在的目录或子目录,其中声明了include和exclude属性。
The "include" and "exclude" properties take a list of glob-like file patterns. “ include”和“ exclude”属性列出了类似glob的文件模式。 The supported glob wildcards are:
支持的全局通配符为:
If a segment of a glob pattern includes only * or .*, then only files with supported extensions are included (eg .ts, .tsx, and .d.ts by default with .js and .jsx if allowJs is set to true). 如果glob模式的一部分仅包含*或。*,则仅包含具有受支持的扩展名的文件(例如,默认情况下.ts,.tsx和.d.ts带有.js和.jsx,如果allowJs设置为true) 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.