Closed royalrust closed 1 year ago
Hi there 👋
It looks like you're trying to import an ESM module in CommonJS.
If you're writing code for the browser, I recommend using ESM imports (import { Metaplex } from '...'
) unless you have a bundler that can fix that for you.
Closing this as this is not an issue with the SDK.
I encounter a strange problem and confused me for several days. in a class definition:
In test case, getMetaplex() return the expected result and no error occured. But when I use
yarn start
and in browser(chrome), the browser console says:Uncaught (in promise) TypeError: Metaplex is not a constructor.
and error points to the source line:this.metaplex = new Metaplex(connection);
Any idea? Thanks.