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

Can't import the named export 'createContext' from non EcmaScript module (only default export is available) #3058

Open
AmelloAster opened this issue Dec 24, 2024 · 4 comments

Comments

@AmelloAster
Copy link

Bug report

Description / Observed Behavior

In the project I created via create-react-app, when I run the build script, I get the following error

Failed to compile.

./node_modules/swr/dist/_internal/config-context-client-x_C9_NWC.mjs
Can't import the named export 'createContext' from non EcmaScript module (only default export is available)

What kind of issues did you encounter with SWR?
build error

Expected Behavior

build success
How did you expect SWR to behave here?

Repro Steps / Code Example

Or share your code snippet or a CodeSandbox link is also appreciated!

Additional Context

SWR version.
[email protected]
Add any other context about the problem here.

@chenshuai2144
Copy link

chenshuai2144 commented Dec 24, 2024

+1 same error

1 similar comment
@yangzy0603
Copy link

+1 same error

@xuehao1997
Copy link

+1

@oliver34
Copy link

same error

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

No branches or pull requests

5 participants