Option to install only ledger in `dfx nns install/import`

I want to simply install ICP ledger locally, but I cannot do dfx nns import ledger.
Only dfx nns import which installs all nns canisters that I don’t need.

Also dfx nns install doesn’t work:

Checking out the environment...
Error: Failed to install NNS components.

Caused by:
    0: Failed to verify that the local replica type is 'system'.
    1: The replica subnet_type needs to be 'system' to run NNS canisters. Current value: Ok(Application).
       
                    You can configure it by setting local.replica.subnet_type to "system" in your global networks.json:
       
                    1) Create or edit: /Users/zen/.config/dfx/networks.json
                    2) Set the local config to:
                        {
                          "local": {
                            "bind": "127.0.0.1:8080",
                            "type": "ephemeral",
                            "replica": {
                              "subnet_type": "system"
                            }
                          }
                        }
                    3) Verify that you have no network configurations in dfx.json.
                    4) Restart dfx:
                        dfx stop
                        dfx start --clean

Can these steps be skipped if I want to install just a ledger?

You can have a look at Oisy’s repo. I use a script to download and install the ICP ledger and index.

Note that I think this might also be documented somewhere on the website.

Yes, I did it manually with commit hash. But I think it would be cool to be able to do it with just one command. For new developers, ICP ledger is probably most demanded canister for local deployment and I think it should be very simple and require least steps to deploy and start playing with it.

1 Like