How do I create new things?

I am trying to use collection factories to create a new resource, and by following the guide, it told me to do

local tree = collectionfactory.create("treeFactory")

but when i run that i just get an error:
java.lang.AssertionError: Assert failed: Cycle detected on node type editor.collection/CollectionNode and output :build-targets
(not (contains? (:in-production evaluation-context) [node-id label]))

how am I supposed to use collection factories to make multiple of an object without just copy and pasting?

My guess is that the collection that contains the collectionfactory is also the collection referenced by the collection factory itself.

I personally feel as if my issue is that I don’t even understand how collection factories work. All the manual told me is to use that line, but I don’t understand anything on collection factories. Is there some sort of better guide that can teach me how to use them?

A factory or collection factory component is used to create an instance of a game object or a group of game objects (a collection).

Collections are explained here:

And the collection factory component here: