metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs
357 stars 182 forks source link

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

Closed HarshaGunathilake closed 1 year ago

HarshaGunathilake commented 2 years ago

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)

AmmarKhalid123 commented 2 years ago

Have you found any workaround? @HarshaGunathilake

lorisleiva commented 2 years ago

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

prateekvasi commented 2 years ago

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 commented 2 years ago

Can you Please give some solution? @lorisleiva

lorisleiva commented 2 years ago

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 commented 2 years ago

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. 🙏

zain-ekkel commented 1 year ago

Hey, any update on this ? @lorisleiva

lorisleiva commented 1 year ago

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

github-actions[bot] commented 1 year ago

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.