Hey guys,
I’m trying to deploy an app which consists of 4 canisters (that are my code) + 2 canisters that are:
- icp ledger
- internet identity
So my dfx.json file looks like this:
// ...
"icp_ledger": {
"type": "custom",
"candid": "https://raw.githubusercontent.com/dfinity/ic/ec35ebd252d4ffb151d2cfceba3a86c4fb87c6d6/rs/rosetta-api/icp_ledger/ledger.did",
"wasm": "https://download.dfinity.systems/ic/ec35ebd252d4ffb151d2cfceba3a86c4fb87c6d6/canisters/ledger-canister.wasm.gz",
"remote": {
"id": {
"ic": "ryjl3-tyaaa-aaaaa-aaaba-cai"
}
}
},
//...
However when I try to deploy (dfx deploy --network ic
), I get an error:
Error: Failed while trying to deploy canisters.
Caused by: Failed to build all canisters.
Caused by: Failed while trying to build all canisters.
Caused by: The build step failed for canister '6zf4l-iiaaa-aaaal-ajnoa-cai' (xxxx_ledger)
Caused by: Failed to build Motoko canister 'xxxx_ledger'.
Caused by: Failed to compile Motoko.
Caused by: Failed to run 'moc'.
Caused by: The command '"/Users/xxxx/.cache/dfinity/versions/0.20.1/moc" "/Users/xxxx/Code/xxxx/src/xxxx_ledger/main.mo" "-o" "/Users/xxxx/Code/xxxx/.dfx/ic/canisters/xxxx_ledger/xxxx_ledger.wasm" "-c" "--debug" "--idl" "--stable-types" "--public-metadata" "candid:service" "--public-metadata" "candid:args" "--actor-idl" "/Users/xxxx/Code/xxxx/.dfx/ic/canisters/idl/" "--actor-alias" "icp_ledger" "ryjl3-tyaaa-aaaaa-aaaba-cai" "--actor-alias" "internet_identity" "rdmx6-jaaaa-aaaaa-aaadq-cai" "--actor-alias" "xxxx_backend" "6ldls-eyaaa-aaaal-ajnna-cai" "--actor-alias" "xxxx_frontend" "6mcng-jaaaa-aaaal-ajnnq-cai" "--actor-alias" "xxxx_ledger" "6zf4l-iiaaa-aaaal-ajnoa-cai" "--actor-alias" "xxxx_timer" "66e27-fqaaa-aaaal-ajnoq-cai" "--package" "base" ".mops/base@0.11.1/src" "--package" "map" ".mops/map@9.0.1/src"' failed with exit status 'exit status: 1'.
Stdout:
Stderr:
/Users/xxxx/Code/xxxx/src/xxxx_ledger/main.mo:7.1-7.39: import error [M0009], file "/Users/xxxx/Code/xxxx/.dfx/ic/canisters/idl/ryjl3-tyaaa-aaaaa-aaaba-cai.did" does not exist
I remember when I first launched the icp ledger canister locally, I had to run this command:
dfx deploy --specified-id ryjl3-tyaaa-aaaaa-aaaba-cai icp_ledger_canister --argument..
(as per documentation)
I always thought I wouldn’t have to run such a command when I first deployed because the icp ledger canister already exists live. But now I’m running into this error, so maybe I’m wrong? (see error in green where ryjl3-tyaaa-aaaaa-aaaba-cai is the icp ledger).
Cheers!