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

Attempted import error: 'Struct' is not exported from 'superstruct'. #177

Open
NishantPatil307 opened this issue Mar 15, 2024 · 5 comments
Labels
bug Something isn't working team-wallet-framework

Comments

@NishantPatil307
Copy link

Failed to compile.

./node_modules/@metamask/utils/dist/chunk-6C35XQOF.mjs
Attempted import error: 'Struct' is not exported from 'superstruct'.

The build process failed in a file named chunk-6C35XQOF.mjs within the @metamask/utils package.
The code in this file tries to import something called Struct from the superstruct library.
However, superstruct doesn't provide a public export for Struct.

@mcmire
Copy link
Contributor

mcmire commented Mar 20, 2024

Hi @NishantPatil307, what kind of project do you have? Is it Node or TypeScript? Is your project ESM or CommonJS?

@irzhywau
Copy link

Im having this issue too with esm.

it's a react project that I try to setup with particle.network https://developers.particle.network/recipes/configuring-particle-auth-core

this current package appears to be a dependencies and throws this same error during build process

@mcmire
Copy link
Contributor

mcmire commented Jul 11, 2024

Hi @irzhywau, which version of this package are you using? We've been making some updates lately to resolve issues we've seen with superstruct. You should have better luck with at least 8.5.0 although 9.0.0 is preferred. Try either of those out and let us know.

@hasiniainawau
Copy link

Facing same issue even using 9.0.0 or 9.1.0
image

@hasiniainawau
Copy link

I want to give more insight here, it seems not working only in a create-react-app project, it seems working under a vite or next react project.
This issue may not addressed to this package, it's more concerned about @metamask/superstruct.
Here some related issue https://web3auth.io/community/t/we-are-facing-this-issue-while-running-this-from-the-app-attempted-import-error-struct-is-not-exported-from-metamask-superstruct/8418

@MajorLift MajorLift added bug Something isn't working team-wallet-framework labels Jul 20, 2024
@MajorLift MajorLift self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-wallet-framework
Projects
None yet
Development

No branches or pull requests

5 participants