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

[bug] Minimal project fails to compile - using CodeSandbox code from Readme... #443

Closed
1 task done
RichHorrocks opened this issue May 29, 2022 · 6 comments
Closed
1 task done

Comments

@RichHorrocks
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

0.1.0

wagmi Version

0.3.2

Current Behavior

I downloaded the .zip file from the create-react-app-based example, linked from the Readme's Try It Out section. (This -> https://codesandbox.io/s/dn3rho)

I then yarn install'ed and started the project, but hit the issue below. I have made no changes to the code that I downloaded from CodeSandbox.

Failed to compile.

./node_modules/react-query/lib/reactjs/useSyncExternalStore.mjs
Can't reexport the named export 'useSyncExternalStore' from non EcmaScript module (only default export is available)

Expected Behavior

The example project should run.

Steps To Reproduce

As described above.

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

@RichHorrocks
Copy link
Author

It appears to be a bug in react-query -> TanStack/query#3637.

Any idea if this can be worked around? (No idea why the code runs in CodeSandbox itself... )

@jxom
Copy link
Contributor

jxom commented May 29, 2022

Can you try bump react-scripts to ^5?

Re: wevm/wagmi#398 (comment)

@RichHorrocks
Copy link
Author

Thanks for the reply, and for pointing to that Wagmi issue.

I can bump react-scripts, but then I get lots of Webpack v5 errors. I think most of them are related to WalletConnect, and there seems to be some discussion going on here: #420 (comment)

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

I'll have a play around with react-app-rewired and see if I can configure some defaults for the complaining packages.

@TkDodo
Copy link

TkDodo commented May 30, 2022

we've fixed the upstream issue, sorry for that. see:

https://github.com/tannerlinsley/react-query/releases/tag/v4.0.0-beta.17

@jxom
Copy link
Contributor

jxom commented May 31, 2022

wagmi@0.4.5 is now released which upgrades react-query to 4.0.0-beta.19 and hopefully fixes this issue.

Please upgrade wagmi and try again 🙏.

@jxom jxom closed this as completed May 31, 2022
@RichHorrocks
Copy link
Author

Yep, perfect - all working as it should now.

Thanks for the speedy turnaround on this!

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

3 participants