skip to Main Content

I tried to build my project anchor build but I got

$ Error: IDL doesn't exist

target/idl/ and target/types/ were generated but they were empty.
Then I tried anchor clean , anchor build. The same.

Then I tried anchor idl init -f <filepath> <program id>

$ Error: Is a directory (os error 21)

Then I finally tried anchor build -v

Using image "backpackapp/build:v0.29.0"
Run docker image
Error during Docker build: Docker build failed: No such file or directory (os error 2)
Error: Docker build failed: No such file or directory (os error 2)

I also tried:

  • change idl = true in Anchor.toml
  • delete no-idl = [] string in Cargo.toml

I’m on Ubuntu

2

Answers


  1. Chosen as BEST ANSWER

    i found solution.

    cargo uninstall anchor-cli

    cargo install anchor-cli --version 0.27.0


  2. Getting the same thing after starting a fresh project

    Anchor 0.29.0
    Solana 1.17.22

    $ anchor init test-program
    $ cd test-program
    $ anchor build
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search