import {
render
} from "@testing-library/react"
causes error:
'DependencyNotFoundError: Could not find dependency: '' relative to
in a file at src/app/js level in a Create-React-App.
The same import in files lower down in the project structure cause no error.
Codesandbox reports:
Suggested solutions:
Add @testing-library/react as dependency
But it has already been added.
Prevents application from loading in codesandbox so that React Test Library support cannot help with an issue I have with testing.
I am trying to get codesandbox to display the 'home' page of the app so they can see how it currently functions and troubleshoot
https://codesandbox.io/embed/github/dotnetspec/sportrank-CRA/tree/dev/
| Software | Name/Version |
| @testing-library/react
| 小odesandbox - https://codesandbox.io/embed/github/dotnetspec/sportrank-CRA/tree/dev/ |
| Browser Chrome Version 77.0.3865.90 (Official Build) (64-bit) |
| Operating System | Linux Mint | 18.3 |
Ah, this is because we don't process devDependencies right now for bundle size reasons. One quick fix is moving @testing-library/react to dependencies in package.json. We have to fix this in the future, or move detected big projects automatically to containers.
Ok, thanks for the notification. Done that and all works now.
Codesandbox is great, BTW ...
Hi, this appears to still be present and the workaround does not appear to work: https://codesandbox.io/s/trusting-sammet-llee1
the same problem here :
https://codesandbox.io/s/elated-driscoll-gpp3x
When do you see the error? I'm not getting that error in the linked sandbox.
Most helpful comment
Ah, this is because we don't process
devDependenciesright now for bundle size reasons. One quick fix is moving@testing-library/reacttodependenciesinpackage.json. We have to fix this in the future, or move detected big projects automatically to containers.