Desktop.ini files breaking node_modules

200 Views Asked by At

I have a create-react-app project that works well. However, if I let it sit for a couple days—without making any changes—it always breaks, with the error

package.json » eslint-config-react-app/jest#overrides[0]:

Environment key "jest/globals" is unknown

I'm convinced this is because desktop.ini files get created, and somehow they mess up the loading process of the dependencies. The problem gets fixed if I delete the whole node_modules folder and reinstall it using npm install. But the newly installed dependencies only last a couple of days (until the new desktop.ini files get regenerated) before they again break.

I've tried to stop windows from producing the desktop.ini files using the registry, but windows didn't listen (I run Windows 11). I've also seen that it is not recommended to delete/suppress these files.

Has anyone dealt with this issue? Are there any manageable workarounds?

0

There are 0 best solutions below