Dfx build fails when canister alias doesn't match filename case

On dfx 0.5.11, given this dfx.json:

{
  "canisters": {
    "a": {
      "main": "A.mo",
      "type": "motoko"
    },
    "B": {
      "main": "b.mo",
      "type": "motoko"
    }
}

Running dfx build returns an error:
No actor found, cannot generate JS bindings

Changing the file names to a.mo and B.mo, respectively, fixes it.

@hansl

1 Like

Haha what? I’ll look at it tomorrow morning.

Can you try with 0.5.13 (you’ll have to change the package.json to point to @dfinity/agent latest)

Just tried with 0.5.13, same error :confused:

Okay I have a fix in PR, will be in the next release.

1 Like

Unrelated to the above but I didn’t want to create a new topic:

In the user library, is IDL.PrincipalClass correct? Looks like the encoding is expecting a CanisterId instead

You are correct. The types aren’t right. A CanisterID is a Principal but a Principal can be more. It will be fixed soon.