Angular 10 ошибок xi18n - PullRequest
       38

Angular 10 ошибок xi18n

0 голосов
/ 03 августа 2020

Так как мы обновились до Angular 10, команда ng xi18n выдает множество ошибок и больше не работает. ng build работает нормально без ошибок. До этого (Angular 9) все работало нормально.

Сообщения об ошибках выглядят следующим образом (я думаю, одно сообщение на файл .ts):

src/app/job-detail/tabs/job-detail-bill-of-material/job-detail-bill-of-material.component.ts:1:1 - error TS6307: File 'path/src/app/job-detail/tabs/job-detail-bill-of-material/job-detail-bill-of-material.component.ngfactory.ts' is not listed within the file list of project 'path/src/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.

src/app/job-detail/tabs/job-detail-lock/job-detail-lock.component.ts:1:1 - error TS6307: File 'path/src/app/job-detail/tabs/job-detail-lock/job-detail-lock.component.css.shim.ngstyle.ts' is not listed within the file list of project 'path/src/tsconfig.app.json'. Projects must list all files or use an 'include' pattern.

Это всегда "компонент". ngfactory.ts "и" css .shim.ngstyle.ts ", которые не" перечислены в списке файлов проекта ". Эти файлы также не существуют в нашем проекте.

Наш tsconfig.app. json выглядит так:

{
  "extends": "../tsconfig.base.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": [],
    "composite": true
  },
  "files": [
    "main.ts",
    "polyfills.ts"
  ],
  "include": [
    "**/*.ts"
  ]
}

И наш tsconfig.base:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "module": "es2020",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": false,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

Я уже пытался отключить Ivy и AOT, но все равно получаю то же сообщение об ошибке.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...