rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values
http://rendro.github.io/easy-pie-chart
MIT License
2.07k stars 501 forks source link

Uncaught Error: Mismatched anonymous define() module #150

Open f-w opened 9 years ago

f-w commented 9 years ago

I have a Node app created using yeoman, which using injector to insert bower components into index.html. After adding easy-pie-chart 2.1.6 with bower install, I got error appended. I also noticed require.js was inserted using script tag before jquery.easy-pie-chart/dist/jquery.easypiechart.js.

Uncaught Error: Mismatched anonymous define() module: function ($) {

/**
 * Renderer to render the chart on a canvas object
 * @param {DOMElement} el      DOM element to host the canvas (root of the plugin)
 * @param {object}     options options object of the plugin
 */
var CanvasRenderer = function(el, options) {
...
vrockai commented 9 years ago

+1

afflick commented 9 years ago

+1

azhaziqgoh commented 9 years ago

got this issue also using yeoman. i remove the require.js and the easypie work with no issue but i'm not sure the effect of removing the require.js

tetsuoreynolds commented 9 years ago

@azhaziqgoh did it work with grunt build? I have it working in dev but once I go to build I get the error again.

azhaziqgoh commented 9 years ago

@tetsuoreynolds i'm removing the require.js totally from bower.json reside in easy-pie so that when I do grunt build it does not download the require.js

nickewansmith commented 8 years ago

+1

santoshkt commented 8 years ago

+1

How are you able to resolve this ? Manually removing require.js from index.html helped get rid of the error. But when I run grunt build, it gets included automatically and I cannot control this.

enkodellc commented 8 years ago

+1 I am getting it with angular... Uncaught Error: Mismatched anonymous define() module: function (angular) {

enkodellc commented 8 years ago

I solved my issue by update my bower to override the jquery.easy-pie-chart dependencies

"overrides": { "jquery.easy-pie-chart": { "dependencies": { "jquery": ">=1.9.0" }, "main": [ "dist/angular.easypiechart.min.js" ] }

hellorich commented 8 years ago

It seems like this is still happening as the latest release is 2.1.6 so that's what bower installs when anyone uses it to include this script.

The issue appears to have been fixed for 2.1.7 as the latest bower.json shows no dependency for require.js.

@rendro Would it be possible to get 2.1.7 released, or does it still require further development?