Codesandbox-client: DependencyNotFoundError: Could not find dependency: '' relative to <path/file>'

Created on 15 Oct 2019  路  5Comments  路  Source: codesandbox/codesandbox-client

馃悰 bug report

Description of the problem

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.

How has this issue affected you? What are you trying to accomplish?

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

Link to sandbox: link (optional)

https://codesandbox.io/embed/github/dotnetspec/sportrank-CRA/tree/dev/

Your Environment

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

Most helpful comment

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.

All 5 comments

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

When do you see the error? I'm not getting that error in the linked sandbox.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YarivGilad picture YarivGilad  路  22Comments

loilo picture loilo  路  22Comments

jthegedus picture jthegedus  路  21Comments

ryanpcmcquen picture ryanpcmcquen  路  23Comments

gautamarora picture gautamarora  路  30Comments