Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Can't import the named export 'bool' from non EcmaScript module (only default export is available) - [email protected] #3014

Closed
Beardev118 opened this issue Mar 19, 2022 · 5 comments

Comments

@Beardev118
Copy link

I can't use the spl-token 0.2.0 version
I have got this error
image

@dtand
Copy link

dtand commented Mar 21, 2022

Same issue as of today - also running on 0.2.0

Screen Shot 2022-03-21 at 4 01 36 PM

@jordaaash
Copy link
Contributor

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.

@dtand
Copy link

dtand commented Mar 22, 2022

I think this issue is already resolved here:

anza-xyz/wallet-adapter#265

Looks to be related to react create apps v4. The solution mentioned by steveluscher worked for me.

@jordaaash
Copy link
Contributor

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.

@Beardev118
Copy link
Author

This is related with CRA5.0 and craco 5.0.0.
I have solved this issue by updating the craco version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants