Properties Panel: Angular/Preact Build Issue

I have an issue using the properties panel in an Angular project.

It seems like the preact library throws errors:

ERROR TypeError: n.__ is not a function
    at k (hooks.module.js:1:2971)
    at Array.forEach (<anonymous>)
    at b (hooks.module.js:1:1804)
    at timer (zone.js:2405:41)
    at _ZoneDelegate.invokeTask (zone.js:406:31)
    at Object.onInvokeTask (core.mjs:26278:33)
    at _ZoneDelegate.invokeTask (zone.js:405:60)
    at Zone.runTask (zone.js:178:47)
    at invokeTask (zone.js:487:34)
    at ZoneTask.invoke (zone.js:476:48)
preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed @ hooks.module.js:1
preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed @ hooks.module.js:1
j @ preact.module.js:1

core.mjs:7643 ERROR TypeError: n.__ is not a function
    at k (hooks.module.js:1:2971)
    at Array.forEach (<anonymous>)
    at b (hooks.module.js:1:1804)
    at timer (zone.js:2405:41)
    at _ZoneDelegate.invokeTask (zone.js:406:31)
    at Object.onInvokeTask (core.mjs:26278:33)
    at _ZoneDelegate.invokeTask (zone.js:405:60)
    at Zone.runTask (zone.js:178:47)
    at invokeTask (zone.js:487:34)
    at ZoneTask.invoke (zone.js:476:48)

Sometimes it works, if I randomly rebuild the Angular project. Maybe Webpack is not able to build the project correctly?

I used the following lines to import the Form-JS libary:

package.json:

...
"@bpmn-io/form-js": "^0.11.0",
...

Angular Component:

constructor() {
        this.formEditor = new FormEditor({});
    }

    ngAfterContentInit(): void {
        // attach Form-JS instance to DOM element
        this.formEditor.attachTo(this.elFormeditor.nativeElement);

        this.formEditor.importSchema(this.schema);

    }

This is a common issue if there is more than one Preact inside a project.

Please verify this (against a package-lock.json or similar lock file) and use tools to de-duplicate your dependency tree. If the issue persists, get back to us.

I used ‘npm ddp’ to filter duplicates and it worked:

Unbenannt2

But I still get the same exception. There is a BPMN-Editor with properties panel in the same project.
Could this cause the error and how could I solve it?