Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: target/idl/user_g_markets.json doesn't exist. Did you run anchor build? #3505

Open
sardarahmedkhan505 opened this issue Jan 22, 2025 · 0 comments

Comments

@sardarahmedkhan505
Copy link

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

`[package]
name = "user-g-markets"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "user_g_market"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.29.0"
anchor-spl = "0.29.0"
`

Here is my Anchor.toml file


`[toolchain]

[features]
seeds = false
skip-lint = false

[programs.localnet]
user_g_market = "AnhNCUWgAswftBjPb9So3hXRwzgQk6WdR3ToM14ej9tW"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
wallet = "/home/ahmed/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
`

and here is the screen shot also

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant