Skip to content

[Bug]: Build error with @web3-onboard/react: "2.1.8" #1055

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

Closed
ashish-pcode opened this issue Jun 10, 2022 · 5 comments
Closed

[Bug]: Build error with @web3-onboard/react: "2.1.8" #1055

ashish-pcode opened this issue Jun 10, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ashish-pcode
Copy link

Current Behavior

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'node_modules/use-sync-external-store/shim' is not supported resolving ES modules imported from /node_modules/@web3-onboard/react/dist/index.js
Did you mean to import use-sync-external-store/shim/index.js?
at new NodeError (node:internal/errors:371:5)
at finalizeResolution (node:internal/modules/esm/resolve:412:17)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1044:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ModuleWrap. (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
type: 'Error',
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:/node_modules/use-sync-external-store/shim'
}

Expected Behavior

No response

Steps To Reproduce

No response

Onboard Version

@web3-onboard/react: "2.1.8"

Node Version

16.13.1

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Anything else?

No response

@ashish-pcode ashish-pcode added the bug Something isn't working label Jun 10, 2022
@thugzook
Copy link

Short term solution, rolling back to v2.1.6 works.

@taylorjdawson
Copy link
Contributor

taylorjdawson commented Jun 12, 2022

@ashish-pcode Thanks for raising this issue. Could you and @thugzook comment with the following information:

  • What build tool/bundler you're using i.e. vite, rollup, parcel
  • Which framework/library i.e gatsby, Next
  • Your config files:
    • build config file
    • tsconfig (if relevant)

@freeatnet
Copy link

freeatnet commented Jun 15, 2022

Same issue on Next 12.1.6 running on Node v16.15.0 with the default build system.

Edit: this is probably related: facebook/react#24590, facebook/react#24440

@d4mr
Copy link
Member

d4mr commented Jun 16, 2022

@ashish-pcode Thanks for raising this issue. Could you and @thugzook comment with the following information:

  • What build tool/bundler you're using i.e. vite, rollup, parcel

  • Which framework/library i.e gatsby, Next

  • Your config files:

    • build config file
    • tsconfig (if relevant)

Facing this issue with CRA 5 (webpack 5)

@mahmud-bn
Copy link
Contributor

@ashish-pcode
Closing this as we've merged a PR #1075 fixing this.

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

No branches or pull requests

7 participants