Closed Beardev118 closed 2 years ago
Same issue as of today - also running on 0.2.0
Hmm this looks like it may be an issue with your build tool/config/environment. It's caused by something not handling ES module imports correctly.
In general for error reports like this to be useful, there needs to be more complete context about your projects. Please provide a link to a repo that reproduces the issue, since that will help determine the cause.
I think this issue is already resolved here:
https://github.com/solana-labs/wallet-adapter/issues/265
Looks to be related to react create apps v4. The solution mentioned by steveluscher worked for me.
Ah, yeah. CRA 4 is generally not good at handling native ESM. There's a CRA5-based starter project that may be of some help. It uses react-app-rewired configuration for handling ESM and libraries without polyfills.
This is related with CRA5.0 and craco 5.0.0. I have solved this issue by updating the craco version.
I can't use the spl-token 0.2.0 version I have got this error