Angular 5:TypeScript编译中缺少。请通过“'文件”确保它在您的tsconfig中。或者包括'属性

时间:2018-05-15 17:46:31

标签: angular typescript angular5

我按照本文自定义UI组件:

https://github.com/akveo/nebular/blob/master/docs/articles/auth-ui.md

但是在那之后由于找不到文件而出现了很多错误。文章说只需复制组件文件夹。我修复了所有这些,但现在得到错误:

Module build failed: Error: C:\xampp\htdocs\utahclient\src\app\@theme\components\auth\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

http://prntscr.com/ji9gp0

以下是我的tsconfig文件:

{
  "compileOnSave": false,
  "compilerOptions": {
  "outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
  "node_modules/@types"
],
"lib": [
  "es2017",
  "dom"
],
"plugins": [
  { "name": "tslint-language-service"}
]
}
}

0 个答案:

没有答案