Javascript sourcing outdated external library, invalidate cache doesn't work.

I have created a React project that uses "react-router-dom" as a dependency. I need version 6 at minimum, however Intellij *ignores* what npm installs in node_modules and instead defaults to an *outdated* version in "External Libraries". See here:I have deleted the entire cache folder, invalidated cache and restarted, deleted the project and started fresh, and in my project structure no library is explicitly added

Every time I delete this "Project @types/*" folder it comes back within seconds, breaking my project. Can I disable it?

Edit: I downloaded IntelliJ Idea Ultimate to a brand new virtual machine, made a brand new template React project, installed react-router, and it's still 5.3. This is reproducible.

2 comments
Comment actions Permalink

The IDE downloads typings for some popular libraries to its configuration folder and uses it to enhance code completion. You can remove the auto-downloaded typings from your <IDE system dir>/javascript/typings and either disable typescript.external.type.definitions Registry key or remove react-router-dom from typescript.external.type.definitions.packages key value

The Registry can be located via: Help > Find action > type Registry...

0
Comment actions Permalink

Elena Pogorelova that did the trick, thank you!

0

Please sign in to leave a comment.