js icon indicating copy to clipboard operation
js copied to clipboard

Can't import the named export 'ACCOUNT_SIZE' from non EcmaScript module

Open HarshaGunathilake opened this issue 2 years ago • 6 comments

we found some issues in adding the upload function ./node_modules/@metaplex-foundation/js/dist/esm/plugins/tokenModule/gpaBuilders.mjs Can't import the named export 'ACCOUNT_SIZE' from non EcmaScript module (only default export is available)

HarshaGunathilake avatar Jul 27 '22 12:07 HarshaGunathilake

Have you found any workaround? @HarshaGunathilake

AmmarKhalid123 avatar Aug 16 '22 03:08 AmmarKhalid123

Hey there 👋

Could you please provide more information on your environment?

This is likely an issue regarding ESM and CJS not playing nicely together and the more information I have about your bundler, the better.

Also, did you check the js-examples repository for getting started with various bundlers?

https://github.com/metaplex-foundation/js-examples

lorisleiva avatar Aug 24 '22 13:08 lorisleiva

I have same issue. ./node_modules/@metaplex-foundation/js/dist/esm/plugins/tokenModule/gpaBuilders.mjs Can't import the named export 'ACCOUNT_SIZE' from non EcmaScript module (only default export is available)

I'm using: Getting Started with Metaplex and CRA 5 (React and Webpack 5)

Please help!

prateekvasi avatar Sep 14 '22 06:09 prateekvasi

Can you Please give some solution? @lorisleiva

prateekvasi avatar Sep 14 '22 08:09 prateekvasi

Hey there 👋 I'll have a look at this issue as soon as I can but for now, I would suggest using Next.js since it is usually much easier to set up with the SDK than CRA5.

lorisleiva avatar Sep 14 '22 11:09 lorisleiva

Looking at this again and it could be to do with the fact that some of the examples in the js-examples repository are not using the latest version of the SDK and the latest version of whichever framework they use. Any help on that front would be more than appreciated. 🙏

lorisleiva avatar Sep 30 '22 12:09 lorisleiva

Hey, any update on this ? @lorisleiva

zain-ekkel avatar Oct 25 '22 06:10 zain-ekkel

Are you still experiencing this issue? The js-examples repository has been updated to use the latest version of the SDK already.

lorisleiva avatar Oct 25 '22 11:10 lorisleiva

Hi @HarshaGunathilake,

Thank you for your question!

We'd like to make sure our GitHub issue tracker remains the best place to manage issues that affect the development of the Metaplex JS SDK itself.

Your question deserves a purpose-built Q&A forum like StackOverflow so it is more searchable and encourages others to contribute to and benefit from the answer.

Unless there exists evidence that this is a bug with the JS SDK itself, would you please post your question to the Solana Stack Exchange using the following link:

https://solana.stackexchange.com/questions/ask?tags=metaplex

If you could please share the link to the newly created question here afterwards, that would be very helpful for anyone following this thread.


This automated message is a result of having added the "question" label.

github-actions[bot] avatar Nov 23 '22 16:11 github-actions[bot]