Skip to content

Commit

Permalink
remove: dfx deps init warning (#5451)
Browse files Browse the repository at this point in the history
* fix liftoff

* Update 2.3-third-party-canisters.mdx
  • Loading branch information
jessiemongeon1 authored Feb 20, 2025
1 parent 9d8da2c commit 87d4684
Showing 1 changed file with 13 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You will be prompted to select the language that your backend canister will use.
`dfx` versions `v0.17.0` and newer support this `dfx new` interactive prompt. [Learn more about `dfx v0.17.0`](/blog/2024/02/14/news-and-updates/update#dfx-v0170).
:::

Then, select a frontend framework for your frontend canister. Select 'No frontend canister':
Then, select a frontend framework for your frontend canister. Select 'None':

```
  ? Select a frontend framework: ›
Expand All @@ -63,7 +63,7 @@ Then, select a frontend framework for your frontend canister. Select 'No fronten
  Vue
  Vanilla JS
  No JS template
No frontend canister
None
```

Lastly, you can include extra features to be added to your project:
Expand Down Expand Up @@ -129,16 +129,18 @@ The `deps/` folder is also created in your project's root folder. The `deps/pull

```json title="deps/pulled.json"
{
  "canisters": {
    "rdmx6-jaaaa-aaaaa-aaadq-cai": {
      "name": "internet_identity",
      "wasm_hash": "07869792e0841765e24014a2cb23e4a53d3147be6051bfc4966565017cd5fb2c",
      "init_guide": "Use '(null)' for sensible defaults. See the candid interface for more details.",
      "candid_args": "(opt InternetIdentityInit)",
      "gzip": true
"canisters":{
"rdmx6-jaaaa-aaaaa-aaadq-cai": {
"name": "internet_identity"
"wasm_hash": "aad8c68dcfe77df9140581097ad4bb82d1eb6da036d228c1a21dfd25a6558ca2" ,
"wasm_hash_download": "aad8c68dcfe77df9140581097ad4bb82dleb6da036d228c1a21dfd25a6558ca2" ,
"init_guide": "Use '(null)'. for sensible defaults. See the candid interface for more details.",
"init_arg": "(opt record { captcha_config = opt record {-max_unsolved_captchas= 50:nat64; captcha_trigger = variant {Static = variant {CaptchaDisabled}}}})",
"candid_args": "(opt InternetIdentityInit)",
"gzip": • true
    }
  }
}%
}
```


Expand All @@ -150,27 +152,6 @@ Next, you'll set the `init` arguments for the dependency canisters using the `df
dfx deps init
```

This will show that our II canister requires an `init` argument:

```bash
WARN: The following canister(s) require an init argument. Please run `dfx deps init <NAME/PRINCIPAL>` to set them individually:
rdmx6-jaaaa-aaaaa-aaadq-cai (internet_identity)
```

This output shows you that the Internet Identity canister requires an `init` argument, but it doesn't give you any additional information. For more information, run the command `dfx deps init rdmx6-jaaaa-aaaaa-aaadq-cai`, which will provide an error message that shows you more details:

```bash
Error: Canister rdmx6-jaaaa-aaaaa-aaadq-cai (internet_identity) requires an init argument. The following info might be helpful:
init => Use '(null)' for sensible defaults. See the candid interface for more details.
candid:args => (opt InternetIdentityInit)
```

In this error, you can see that to use the canister's defaults, you can use a `null` value as the `init` argument. To pass this value as an `init` argument, run the command:

```bash
dfx deps init rdmx6-jaaaa-aaaaa-aaadq-cai --argument null
```

Now it's time to deploy our pulled dependency canister. Run the command:

```bash
Expand Down Expand Up @@ -224,4 +205,4 @@ Did you get stuck somewhere in this tutorial, or feel like you need additional h

Next, let's take a deeper dive into an introduction of Candid and the role that it plays in development on ICP.

- [2.4 Introduction to Candid](/docs/current/tutorials/developer-liftoff/level-2/2.4-intro-candid).
- [2.4 Introduction to Candid](/docs/current/tutorials/developer-liftoff/level-2/2.4-intro-candid).

0 comments on commit 87d4684

Please sign in to comment.