# Canister dependency not working?

**URL:** <https://forum.dfinity.org/t/canister-dependency-not-working/31377>\
**Category:** Developers\
**Created:** [May 30, 2024, 5:00pm UTC](https://forum.dfinity.org/t/canister-dependency-not-working/31377 "2024-05-30T17:00:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![marcpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/marcpp/32/14921_2.png) [@marcpp](https://forum.dfinity.org/u/marcpp)\
**Post date:** [May 30, 2024, 5:00pm UTC](https://forum.dfinity.org/t/canister-dependency-not-working/31377/1 "2024-05-30T17:00:32Z")

</div>

Hi guys,

Probably a quick one, but I can’t get it working ☹

Here’s my dfx.json

```auto
{
  "canisters": {
    "internet_identity": {
      "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did",
      "frontend": {},
      "remote": {
        "id": {
          "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
        }
      },
      "type": "custom",
      "wasm": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm.gz"
    },
    "icp_ledger_canister": {
      "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"
        }
      }
    },
    "myapp_backend": {
      "main": "src/myapp_backend/main.mo",
      "type": "motoko",
      "dependencies": [
          "icp_ledger_canister"
      ]
    },
    "myapp_frontend": {
      "dependencies": [
        "myapp_backend"
      ],
      "source": [
        "src/myapp_frontend/dist"
      ],
      "type": "assets",
      "workspace": "myapp_frontend"
    }
  },
  "defaults": {
    "build": {
      "args": "",
      "packtool": ""
    }
  },
  "output_env_file": ".env",
  "version": 1
}

```

However in my main.mo

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/5/3/53d043a4c3916240401d047d9235e01433060cf3.png)

I’ve tried to run dfx deploy. I’ve tried to restart my VSCode. Nothing fixes it and I’m out of ideas.  
(Also, I don’t see any difference between my code and this [sample code](https://github.com/dfinity/examples/tree/master/motoko/icp_transfer)).

Any help appreciated!

---

_[View the full topic](https://forum.dfinity.org/t/canister-dependency-not-working/31377)._
