dfinity / dfinity/sdk

Can't generate frontend

Open
#3,940 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Rust
Stars
204
Forks
98
PR merge metrics
No merged PRs in 30d

Description

DFX can't build my project, because before every dfx deploy ..., it's automatically called dfx generate that leads to the error:

Error: Failed while trying to generate type declarations for 'bootstrapper_frontend'.
Caused by: Candid file: /home/porton/Projects/icp-package-manager/.dfx/local/canisters/bootstrapper_frontend/assetstorage.did doesn't exist.

But the way to create assetstorage.did is to run dfx generate ... that is, as I described above, is interrupted.

I also noticed, that scripts/prebuild was removed from the schema, so I can't neutralize the dangerous dfx generate command running.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the dfx deploy path that automatically invokes dfx generate, then inspect the schema change that removed scripts/prebuild. Reproduce the missing assetstorage.did failure and determine the expected behavior when generation requires a file that generation itself creates.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.