-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Bug]: Components using Copy fails unit tests fail due to missing module 'es-toolkit/compat' #18403
Comments
This might be because If there's multiple versions you'll need to unify them by either
|
We had a report of this on slack but they weren't using Jest at all. I took another look today and noticed that In the case of this error being not related to tests and happening in a build, I would think it could be the same root problem, just present elsewhere in the tooling chain. The bundler maybe being on an older version that didn't handle In any case this appears to be toolchain related and not something we can take direct action on, so I'm going to close this for now. |
This bug is still not fixed, making entire IBM carbon unusable!!! |
@priyanaka07 Sorry you're still running into this. It's going to depend on your toolchain's support of I found another piece to the puzzle that may be helpful if you're using
|
@tay1orjones hello, we are encountering same issue when running tests, will try workaround mentioned above. We have react-scripts v5 and use carbon/react v1.76.0, npm ls es-toolkit only shows carbon using v1.32.0 of es-toolkit |
I think this can be solved by updating the import paths to hit the compat module directly, rather than relying on module resolution of bundlers that are causing these issues. Will have a PR up shortly. |
Package
@carbon/react
Browser
No response
Package version
1.74.0
React version
18.3.1
Description
When running unit tests, components using Copy produces the following error and prevents test suite from running:
`Test suite failed to run
I have attached the project:
react-failure.zip
Reproduction/example
NIL
Steps to reproduce
npm install
npm test
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: