ardas / stripo-plugin

stripo-plugin
19 stars 32 forks source link

Uncaught Error: In this configuration Angular requires Zone.js #12

Closed MartinManev closed 3 years ago

MartinManev commented 3 years ago

Hi. We tried to open the built-in image editor:

Screenshot from 2021-01-29 10-38-48_3

But upon clicking the button nothing happens and we get the following error in the browser console:

Screenshot from 2021-01-29 10-46-37

We are using the plugin, version 1.29.0. I also tried with older versions, but the problem persists. Also tried on different browsers.

From my understanding it seems that the library zone.js is not detected by the plugin. This is strange, because the plugin has code that explicitly loads the library and I can see that the browser successfully downloads it.

Screenshot from 2021-01-29 10-52-14

Screenshot from 2021-01-29 10-51-12

If I write typeof Zone in the browser's console, then I get undefined.

We also tested this on the official Stripo website, but the image editor is working fine there. I analyzed the code and It seems to me that the library zone.js is already loaded beforehand and the above code skips downloading it. If I write typeof Zone in the console, then I get function. So it is working on the official Stripo website, but not when using the plugin separately.

Any ideas how to fix this?

Edit: I was informed that the image editor worked properly a few days ago. That got me thinking that it might be the plugin version, but I already tried using previous versions down to 1.15.0 and the problem persists. Version 1.14.0 and further gives me different errors.

MartinManev commented 3 years ago

The problem is on our end. We recently started using system.js and its extras/amd which messes with the global window object. I'm not yet familiar with that library and can't add anything useful right now. I'll close the issue.