Skip to content
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

Jest error related to uint8arrays and multiformats dependencies after migration to 2.1.4 #1749

Closed
alexeygorbachevsky opened this issue Dec 12, 2022 · 9 comments
Labels
type: bug Something isn't working

Comments

@alexeygorbachevsky
Copy link

image

@alexeygorbachevsky alexeygorbachevsky added the type: bug Something isn't working label Dec 12, 2022
@alexeygorbachevsky
Copy link
Author

I have fixed it via solution that was suggested here achingbrain/uint8arrays#21.
Read the link pls and make relevant fixes or add note about this to migration doc.

@ganchoradkov
Copy link
Member

hey @alexeygorbachevskiy thanks for the report.

Could you provide steps to reproduce?

@alexeygorbachevsky
Copy link
Author

alexeygorbachevsky commented Dec 14, 2022

@ganchoradkov
The minimum steps to reproduce are next (if import is commented, the test will be passed):
image

@carlosrsabreu
Copy link

carlosrsabreu commented May 2, 2023

I'm getting the same error also. Not sure but adding an ESM file in the dist and module field in package.json could help.

@nicolasbrugneaux
Copy link

This error is still happening by the way. I used the previously mentioned solution, but this wasn't intuitive at all. It seems that projects using jest and migrating to WCv2 could all be concerned.

@glitch-txs
Copy link

I’m closing this issue because it has been inactive for a few months.

Please reopen if you still encounter this issue with the latest version :)

@devon-bfs
Copy link

devon-bfs commented Aug 21, 2023

I received the same issue

Adding a babel.config.js file with

module.exports = { presets: [ '@babel/preset-react', [ '@babel/preset-env', { targets: { node: 'current', }, }, ], ], };

Solved if for me.

Gave me another issue though TextEncoder not defined

@nghongphuong94
Copy link

Hi @devon-bfs, I also got TextEncoder not defined. Did you resolve it?

@glitch-txs
Copy link

@nghongphuong94 you probably need a polyfill, maybe try something like https://github.com/anonyco/FastestSmallestTextEncoderDecoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants