You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have everything setup and no errors in the code. I doubles check the idl file exist and I am using the import { UserGMarket } from "../target/types/user_g_market";
and the file exist and when I run cursor on it, giving me the same file, but when I run anchor test --skip-local-validator, its giving me this error Error: target/idl/user_g_markets.json doesn't exist. Did you run anchor build?
and I run many times anchor clean and anchor build
But facing the same issue. Here is my cargo.toml file
It looks like you named your program user-g-market and then renamed it to user-g-markets (or the other way around), but you forgot to change the name in some places. The fix is simple; make program name consistent in all places. For example, in the package section your Cargo.toml, you use user-g-markets:
[package]
name = "user-g-markets"
but in the lib section, you use:
[lib]
name = "user_g_market"
Make sure the names match while keeping the casing consistent e.g. set lib.name to user_g_markets.
And lastly, you didn't share this but, also rename your program module name to user_g_markets:
#[program]mod user_g_markets {// ...}
That's it. However, I'm leaving this open because I think we can improve the error message to include which program names from anchor.workspace is available.
I have everything setup and no errors in the code. I doubles check the idl file exist and I am using the
import { UserGMarket } from "../target/types/user_g_market";
and the file exist and when I run cursor on it, giving me the same file, but when I run anchor test --skip-local-validator, its giving me this error
Error: target/idl/user_g_markets.json doesn't exist. Did you run
anchor build?
and I run many times
anchor clean and anchor build
But facing the same issue. Here is my cargo.toml file
Here is my Anchor.toml file
and here is the screen shot also
The text was updated successfully, but these errors were encountered: