MARKLESS_MODULE_INSTANCE_DIVERGENT_HANDLERS
This module-scope instance would become one instance per handler: a Markless compiler error.
Error from the compiler, while it builds your .tsrx files.
What happened
Markless prints the message, the reason, and a suggestion:
MARKLESS_MODULE_INSTANCE_DIVERGENT_HANDLERS: Module-scope instance "<name>" is carried into <length> handler modules (<symbolIds>). Each of those modules runs its own constructor, so they hold <length> separate instances and anything one of them records is invisible to the others.
Every handler symbol module is loaded on its own when its handler first fires, so a declaration in the authoring file has to be copied into each one that names it. One handler gets the intended browser-side instance. Two or more get a copy each, and nothing at runtime reveals that they have drifted apart.
Move "<name>" and its class into their own module and import it. An import resolves to one module instance that every handler module shares, so the handlers agree.
https://markless.dev/errors/MARKLESS_MODULE_INSTANCE_DIVERGENT_HANDLERS
Words in angle brackets change from case to case.
How to fix it
Start with the suggestion in the message above.
This page has no guide yet. Help write it.
Where it comes from
@markless/compiler raises this code. Source:
Read how to read a Markless error, or go back to all error codes.
