伊豆湖卧烟
伊豆湖卧烟

Reputation: 93

WebStorm is auto downloading JavaScript typings. How to stop this?

I've installed react-router v6 but WebStorm still use react-router v5 types.

In WebStorm folders: /Webstorm2021.2/javascript/typings/... has loadsh, react-dom, react-router-dom, styled-components libraries. When I remove those typings folders WebStorm auto creates and downloads those four libraries.

Why does this happens and how to stop this? Or let WebStorm choose the v6 types by default?

enter image description here

enter image description here

Upvotes: 8

Views: 837

Answers (1)

lena
lena

Reputation: 93738

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...

Upvotes: 11

Related Questions