Error: Projects must list all files or use an ‘include‘ pattern.

When importing a file, the file clearly exists but an error is reported:

File 'xxx/packages/@vue/src/use-list.ts' is not listed within the file list of project 'xxx/packages@/vue/tsconfig.json'. Projects must list all files or use an 'include' pattern.

resolvent:

  stay   Is not listed within the file to add or modify a regular path to the include in the file indicated.

At present, the file indicating the path regularity problem is tsconfig.json, so go to the tsconfig.json file to view the include item.

tsconfig.json:

{
  "include": ["src"],
}

Modified tsconfig.json:

{
  "include": ["src/**/*.ts"],
}

Read More: