coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.58k stars 1.32k forks source link

Class extends value undefined is not a constructor or null #3117

Open zAndrey95 opened 2 months ago

zAndrey95 commented 2 months ago
TypeError: Class extends value undefined is not a constructor or null
    at node_modules/@coral-xyz/anchor/node_modules/@solana/web3.js/lib/index.browser.esm.js (chunk-ZGB4AY2M.js?v=d20c72e9:3843:62)
    at __init (chunk-KK4SFAKU.js?v=d20c72e9:24:56)
    at @coral-xyz_anchor.js?v=d20c72e9:1898:1

My version packages:

"@coral-xyz/anchor": "0.30.0",
"@solana/web3.js": "1.91.7",

Use Vite.

How I can fix it, thx

acheroncrypto commented 2 months ago

The error seems to be coming from @solana/web3.js/lib/index.browser.esm.js, which likely means you'd get it even if you didn't use @coral-xyz/anchor.

I've searched the error in solana-labs/solana-web3.js and found a similar issue here: https://github.com/solana-labs/solana-web3.js/issues/2783