After updating from dfx version 0.13.1 to 0.15.1, I get an error when attempting to call dfx build CANISTER_NAME --network ic

I just updated the DFX SDK from version 0.13.1 to version 0.15.1, and now whenever I attempt to call the dfx build function on the ICP network, I get the following error message:

  Failed while trying to build all canisters in the canister pool.
    Failed to build dependencies graph for canister pool.
      Failed to get dependencies for canister 'default'.
        Failed to create <Type>CanisterInfo for canister 'default'.
          `main` attribute is required on Motoko canisters in dfx.json

does anyone know what breaking change I may be encountering and how I could resolve it?

I can’t find any relevant breaking changes in our changelog (search for !: to find all the breaking changes). Can you show the dfx.json entry for default? I suspect there’s something up with that

2 Likes

I resolved it. I had some dead code that was breaking things. I removed it

2 Likes