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

pnpm generate failed: new Error(${programName} idl generation failed); #111

Open
AuroraLantean opened this issue Feb 21, 2025 · 0 comments

Comments

@AuroraLantean
Copy link

AuroraLantean commented Feb 21, 2025

Please add Readme instruction on how to generate Anchor JS client with Solana Web3.js v2.0

pnpm create solana-program
cd my-program
pnpm install
pnpm generate

Then I got error:

   Compiling anchor-cli v0.30.1
    Finished `release` profile [optimized] target(s) in 1m 35s
  Installing .../my-program/.cargo/bin/anchor
   Installed package `anchor-cli v0.30.1` (executable `anchor`)
warning: be sure to add `.../my-program/.cargo/bin` to your PATH to be able to run the installed binaries
Failed to execute: anchor build,--idl,.../my-program/program
.../my-program/node_modules/.pnpm/@[email protected]/node_modules/
            @metaplex-foundation/shank-js/dist/generators/anchor.js:24
        throw new Error(`${programName} idl generation failed`);
              ^

Error: solana_program_my_program idl generation failed
    at generate (.../my-program/node_modules/.pnpm/@[email protected]/node_modules/
            @metaplex-foundation/shank-js/dist/generators/anchor.js:24:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async generateIdl (.../my-program/node_modules/.pnpm/@[email protected]/node_modules/
            @metaplex-foundation/shank-js/dist/generateIdl.js:13:17)

Node.js v23.7.0
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
@AuroraLantean AuroraLantean changed the title Add Readme instruction on how to generate Anchor JS client with Solana Web3.js v2.0 pnpm generate failed: new Error(${programName} idl generation failed); Feb 21, 2025
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