Skip to content

Build fails on fresh install #2

@corygabrielsen

Description

@corygabrielsen

I'm new to Solana and struggling to find a single example repo that actually builds and works.


Build fails with

Error: `idl-build` feature is missing. To solve, add
[features]
idl-build = ["anchor-lang/idl-build"]
in `/path/to/CRUD-dApp/anchor/programs/journal/Cargo.toml`.
Warning: run-commands command "anchor build" exited with non-zero status code

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target anchor for project anchor (47s)

         With additional flags:
           build

    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]

Adding the idl-build = ["anchor-lang/idl-build"] line also fails with:

Error: IDL doesn't exist
Warning: run-commands command "anchor build" exited with non-zero status code

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target anchor for project anchor (17s)

         With additional flags:
           build

    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions