"No such file or directory" error could be more specific

I’ve gotten the following error a few times when running dfx build. It would be nice if the error listed what files weren’t found so I can more easily address the problem. As it is, unless you’re building very often and happen to catch the missing file as you add a reference somewhere, it’s hard to track down exactly what’s missing.

The error is as follows:

$ dfx build
Building canisters...
Building frontend...
Build failed. Reason:
  Postbuild step failed for canister cxeji-wacaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q with error: An error occured:
    Os {
        code: 2,
        kind: NotFound,
        message: "No such file or directory",

I’m running dfx version 0.6.12

1 Like

We’ve had some major rework of how internal errors are represented. Watch for the next few releases, it should have more information.