VS Code eslinting shows error every time I create a new file

43 Views Asked by At

Very easy - I have created a project with turborepo (standard pnpm dlx create-turbo@latest).

In that turborepo I have Nextjs app with i18next and react-i18next packages.

Every time I create a new file, VS Code starts to show this eslint error right on start of every file in the project:

Parsing error: Debug Failure. False expression:
c:/turboproject/apps/admin/node_modules/react-i18next/initReactI18next.d.mts
linked to nonexistent file
C:/turboproject/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-i18next/initReactI18next.d.mts

The thing is, if I restart VS Code, that error simply goes away.

I tried googling, but Google actually finds nothing helpful.

I tried to look into those files from the error and I found out that C:/turboproject/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-i18next/initReactI18next.d.mts is wrong path - it should be without that second node_modules

ESLint must have made some sort of mistake, VS Code maybe runs it somehow bad? I don't know... And why does it happen only when I create a new file/move files around, so it works when building the project or running it without changing file structure...

I am out of options here, I tried changing versions of ESLint also, without success.

Anybody have some idea what to try?

0

There are 0 best solutions below