@types/react-dom
incorrectly declared as a devDependency
#1000
Labels
@types/react-dom
incorrectly declared as a devDependency
#1000
@testing-library/react
version: v12.1.2What you did:
Tried to use
@testing-library/react
in a TS web app built with Bazel's rules_nodejs, which enforce strict visibility between NPM packages as determined by their declared dependencies.What happened:
Got the following tsc error when compiling a test that uses
@testing-library/react
withrules_nodejs
:Problem description:
@testing-library/react
declares@types/react-dom
as adevDependency
, but uses it in its external interface when used from TypeScript.Suggested solution:
Mark
@types/react-dom
as a regular dependency of@testing-library/react
so that packages depending on@testing-library/react
also pick up this dependency.The text was updated successfully, but these errors were encountered: