Creating a nested/child actor/canister class failed

Error: Node.mo:13.31-13.39: type error [M0056], variable Canister is in scope but not available in compiled code

dfx: 0.15.2-beta.1

Hi I am trying to create a child Node canister if the parent Node’s storage is full…
or I must not create a child Node canister within the parent Node canister? What is the best practice for this?

1 Like

Compiled actor classes cannot be recursive in this way. This is a limitation of the way they are compiled a t the moment.

Your best best to move the create functionality elsewhere, perhaps into the code that imports the actor class.

1 Like