metaplex-foundation / js

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

Buffer is not defined error #338

Closed cryptoHaHa closed 1 year ago

cryptoHaHa commented 2 years ago

I am using react js framework, not tsx. In there, I imported Metaplex and added below code line. const metaplex = new Metaplex(connection) Then, I got js error "Uncaught ReferenceError: Buffer is not defined". How can I solve this problem?

gesielrosa commented 1 year ago

Buffer is not a browser feature. You need to install buffer package. To read more: here

github-actions[bot] commented 1 year ago

Hi @cryptoHaHa,

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.