1

No matching version is found by solita for anchor-cli: 0.28.0 on https://crates.io/crates/anchor-cli/versions , which gives error.

enter image description here

2 Answers 2

2

fix I'm using:

in cargo.toml inside programs/name_of_your_program change anchor-lang to 0.27.0

do NOT run anchor build

then run yarn solita, it will initialy start working but fail at the end

that will create anchor v27 binary inside /name_of_your_program/.crates/bin

avm use 0.28.0

where anchor

copy that binary to .crates/bin/anchor to replace the 27 that solita built there

then change back cargo.toml to 0.28.0

rerun yarn solita

Hopefully soon anchor crate.io will get published at that whole tedious process won't be needed

3

Solution posted by @zkKirol : https://discord.com/channels/848060988636921856/849844496941842432/1153277836157796383

Download the anchor-cli : 0.28.0 binary and copy paste it in .crates folder which solita creates then run yarn solita again.

You can download the binary either using avm or from https://www.npmjs.com/package/@coral-xyz/anchor-cli?activeTab=code

1
  • This worked great for me. I already had it in my node_modules so just had to copy it over Commented Dec 23, 2023 at 1:53

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.