You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a react library written in typescript that has exact devDependency to @types/react: "16.9.9". @testing-library/react` is also one of the library devDependencies.
What happened:
When installing all devDependencies (including bundler and babel stuffs) so we can build our library, we ended up with 2 different @types/react, because @testing-library/react has deps to @types/react: *, which resolves to a newer version of @types/react.
Because there are 2 different @types/react, tsc will fail when trying to build our package.
Suggested solution:
Set @types/* packages as devDependencies of @testing-library/react