google / google-visualization-issues

288 stars 35 forks source link

RequireJS throws "mismatch" error #2070

Open nwhittaker opened 9 years ago

nwhittaker commented 9 years ago

The latest RC, v43, includes an updated version of Web Font Loader. If an AMD library like Require is already apart of the user's project, and detected, this version of Web Font Loader creates an anonymous module. Because the Google API is loaded via a static <script> tag, the attempted creation of the anonymous module causes RequireJS to throw a "mismatched anonymous define() modules" error. This error halts further JavaScript execution.

Please see plunker for example.

nwhittaker commented 9 years ago

I created an upstream issue with Web Font Loader: https://github.com/typekit/webfontloader/issues/278

dlaliberte commented 9 years ago

Thanks. If Web Font Loader can be updated to avoid this problem, I can cherrypick the fix into v43. That would be the easiest fix for us.

dlaliberte commented 9 years ago

There is a workaround. This plunker demonstrates how you can use the Google Charts frozen loader with the Material Bar chart, which loads the webfontloader: http://plnkr.co/edit/t0K141vBz7zSXnaQypsc

tanghia commented 8 years ago

I got same issue, However, sometimes, page is loaded without error, and this error appears again after refresh page. I tried some solutions but not work.