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: Cluster must be one of [localnet, testnet, mainnet, devnet] or be an http or https url #3483

Open
619 opened this issue Jan 13, 2025 · 1 comment
Labels

Comments

@619
Copy link

619 commented Jan 13, 2025

Setting my anchor.toml to cluster = "http://127.0.0.1:8899" or cluster = "localnet" and then running "anchor build", "anchor clean" or "anchor run" all result in Error: Cluster must be one of [localnet, testnet, mainnet, devnet] or be an http or https url. Why does my anchor.toml need to be configured a certain way for anchor to delete files?

@acheroncrypto
Copy link
Collaborator

Are you sure cluster is the only field you've changed? Pretty sure those values you set should work. We even have tests in CI using exactly cluster = "localnet", e.g.

cluster = "localnet"

There are other places that we use cluster names too. For example, programs.localnet:

[programs.localnet]

It would help to debug if you shared the full Anchor.toml.

Why does my anchor.toml need to be configured a certain way for anchor to delete files?

This is because most commands load Anchor.toml to get your configuration, so if there is an error in your configuration, the whole command fails.

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

No branches or pull requests

2 participants