1

i changed an archive name from 'index.ts' to 'style.ts', after that always returns this error in tsconfig.json:

"File '/src/components/AboutContainer/index.ts' not found. The file is in the program because: Matched by default include pattern '**/*'"

here's my tsconfig.json:

{
  "extends": "expo/tsconfig.base",
  "compilerOptions": {
    "strict": true
  }
}

2 Answers2

10

Closing and re-opening VSCode really seems to be the fix here. At least for me. It's something about how VSCode handles checking for problems.

0

As index.ts is a code component, you might have used it somewhere in the codebase. Later, as you have changed the filename to style.ts,

  • now, index.ts usage or import statements are incorrect as that file doesn't exist anymore
  • Also, the name [index] before the extension .ts or .js, indicates default pattern to match is /.
  • The solution can be, once check the usage of index.ts file and accordingly consider the pattern.

for example : whenever the route is default like / the index.ts code will be considered, as you have changed it, the default should be like /new-name

And Sometimes, restarting the IDE/Editor can be the right thing to do.

dineshpandikona
  • 620
  • 4
  • 17