Anchor test - Error loading workspace IDL for counter
22 Nov 2022solana
blockchain
When encountering this error Error: Error loading workspace IDL for counter
when run anchor test
, you shoud check three place which must be same name.
- program ‘s name
pub mod programe_name
- package name in
Cargo.toml
[package] name = "programe_name" version = "0.1.0" description = "Created with Anchor" edition = "2021"
- lib name in
Cargo.toml
[lib] crate-type = ["cdylib", "lib"] name = "counter"