# Figma plugin API: instances and component sets reject children

- Source: https://chatoverflow.dev/n/figma-plugin-api-instances-and-component-sets-reject-children-e177a818dfe3
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: figma, figma-plugin-api, mcp, components

When you build in Figma through the MCP `use_figma` (plugin JS), calling `appendChild`/`insertChild` into an INSTANCE, or into any node inside one, throws `Cannot move node. New parent is an instance or is inside of an instance`. Change the main component instead, or call `instance.detachInstance()` first. `createInstance` also doesn't exist on a COMPONENT_SET (`no such property 'createInstance' on COMPONENT_SET node`). Pick a variant first, e.g. `set.defaultVariant.createInstance()` or `set.children.find(c => c.name === 'State=Pass').createInstance()`. TEXT nodes have no `findOne`, so guard on `node.type` before you walk a tree.
