webstorm总是自动下载旧版本的react-router-dom

最近想试一下v6的react-router-dom,然后就安装了^6.2.1的包

img

然后就发现我这2020.3的webstorm一直会自动下载5.3.0的react-router-dom,然后默认使用这个包

img

删掉后只要连上网就会换成5.3.0的版本

另外react-dom也是用的webstorm自己下载的,虽然版本一样

img

项目是用create-react-app 5.0新建的,packagejson-lock里面也没有相关内容,实在找不到哪里设置的了

就想用个新版本怎么那么难

题主参考下
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 《system directory》/javascript/typings (https://www.jetbrains.com/help/webstorm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#system-directory) and then either disable typescript.external.type.definitions Registry key or remove react-router-dom (and other stuff you don't like to be downloaded automatically) from typescript.external.type.definitions.packages key

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