Error: No provider for "bpmnFactory"!


I have implemented a complex modeler with properties-panel, custom renderer, custom elements and so one … and it works fine as Modeler.

When I start the viewer, I receive following error message.


The modeler runs with a lot of modules, but the viewer does not need or should not need all of these modules. I found 1 file which contains “bpmnFactory”. It is my CustomElementFactory.js which is part of my CustomRenderer. The CustomRenderer is necessary to show my customElements in the viewer.
I used the CustomElement ( example as guidance.

Do you have any idea how to solve this issue?

Thanks in advance,

Hi @Anja
its true that the Viewer does not include the bpmnFactory module per default. So you have to use the modeler instead or including the module separately into the viewer. See this post or also this for more information.

It is always a good idea to provide some more input via code examples or test cases so we can help you in detail.

Hi Niklas,

thank you very much for your reply.
I move my CustomElementFactory.js into another module and it worked again.

Best Regards,

1 Like