DEV Community

Ashish Regmi
Ashish Regmi

Posted on

Issue with spl-associated-token-account Version Conflict in anchor-spl v0.30.1

Hello everyone,

I'm working on a Solana program using Anchor, and I’ve encountered a version conflict when running cargo update with anchor-spl v0.30.1. The issue arises from the dependency on spl-associated-token-account = "^3", but the latest version available on crates.io is 1.0.3.

Here is the error I’m seeing:

vbnet
Copy code
error: failed to select a version for the requirement spl-associated-token-account = "^3"
candidate versions found which didn't match: 1.0.3, 1.0.2, 1.0.1
location searched: crates.io index
required by package anchor-spl v0.30.1
I’ve checked my Cargo.toml, and I’m only importing anchor-spl as suggested, without any direct reference to spl-associated-token-account. I've also tried removing any patches or overrides, and the problem still persists.

Steps I’ve taken:
Verified my Cargo.toml to ensure there’s no direct import of spl-associated-token-account.
Tried downgrading to anchor-spl v0.29.0, which still caused a similar issue but with a lower version requirement for spl-associated-token-account = "^2.2".
Removed any patches or overrides that may have been conflicting.
Additional Information:
Rust version: rustc 1.80.1
Anchor version: 0.30.1
Cargo version: 1.80.0
Solana version: 1.18.0
Has anyone else faced this issue with anchor-spl v0.30.1? Any suggestions or workarounds would be greatly appreciated!

Thank you!

Top comments (0)