0

I have been getting the following error after adding solana to my project. I have tried adding the @solana/spl-token package ($ yarn add @solana/spl-token) but that didn't work. Please help. enter image description here

1
  • 2
    I’m voting to close this question because it appears to be about development tools that are not specific to solana
    – trent.sol
    Commented Aug 18, 2022 at 20:35

1 Answer 1

1

I ran into this error recently. You haven't posted any code, so I've included an example of what was causing it for me, and how I worked around it.

TLDR; Set your version to @solana/spl-token": "^0.2.0". ... memo ts build is not compatible, but it looks like it might have been fixed or update in the works at least: source.

OR

Instead of:

connection.getParsedTokenAccountsByOwner(publicKey, { programId: TOKEN_PROGRAM_ID });

This made that error disappear, without needed to change spl-token version:

connection.getParsedTokenAccountsByOwner(publicKey, { programId: new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA') });
1
  • The error didn't resolve for me after following the above steps. Commented Aug 27, 2022 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.