-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move @types/react from deps to devDeps #3138
Comments
is this causing a compilation issue? |
Yes, I have types/react@16 the the root of node_modules and there is a bug in TS that in such cases I have to set the path to types explicitly in tsconfig if these types are not in the node_modules/@types folder |
do you have a codesandbox? |
No, this problem can't be reproduced in code sandbox, but I found an original issue: microsoft/TypeScript#42873. |
Yeah we rely on react types for a bunch of stuff |
I mean why these types can't be moved to devDependencies? And according to package.json react-intl can be used with react@16 as well: formatjs/packages/react-intl/package.json Line 143 in c4d2f6a
|
because if you use TS and you use react-intl, we reference react types |
Which package?
react-intl
Describe the bug
I use react v16 so I don't need @types/react v17 in my node_modules. And since react-intl is compatible with react v16 and v17 I think it's not a problem to move it to devDeps.
The text was updated successfully, but these errors were encountered: