DEV Community

Discussion on: The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

Collapse
 
biiishal profile image
bishal • Edited

For anyone coming to this in 2022 with anchor-cli 0.22.1, you want to replace ProgramResult with updated Result<()>

docs.rs/anchor-lang/latest/anchor_...
rather than
docs.rs/anchor-lang/0.18.0/anchor_...

Also, for others who might have a run in with this error message Error: failed to send transaction: Transaction simulation failed: Attempt to load a program that does not exist while running the tests. Check out this github.com/project-serum/anchor/is...

You might want to turn off your solana-test-validator process, delete your node_modules and do a fresh yarn install, and finally try the anchor test. The issue seems to be when the name of a mod is changed the tests fails, which made sense in my case because I was going with a different name for my project (anchor_crud instead of mysolanaapp).