Angular 6 Runtime Crash

Hello,
I’m trying to use BPMN.IO inside an Angular 6 application. I’m basing my code on this project (https://github.com/narve/angular-bpmn), but got the same problem: works fine when running in development mode, but crashes on runtime when building with the --prod flag.

To check the bug, just clone the repo, run npm install, then ng build – prod and then serve the files with your favorite web server.

Any idea of what could be happening?

Thanks!

What is the error message? It crashes is kind of generic.

This only happens when the --prod flag is used.

ERROR TypeError: this._createContainer is not a function
    at F_.Nd (main.727aac04946db895b159.js:1)
    at new F_ (main.727aac04946db895b159.js:1)
    at e.ngOnInit (main.727aac04946db895b159.js:1)
    at main.727aac04946db895b159.js:1
    at main.727aac04946db895b159.js:1
    at wc (main.727aac04946db895b159.js:1)
    at qc (main.727aac04946db895b159.js:1)
    at Object.updateDirectives (main.727aac04946db895b159.js:1)
    at Object.updateDirectives (main.727aac04946db895b159.js:1)
    at Object._c [as checkAndUpdateView] (main.727aac04946db895b159.js:1)

Known issue. Unfortunately it seems like the minifier used by Angular optimizes away crucial bits of our tool.

See this issue in our official Angular example.

1 Like