Note that there are some explanatory texts on larger screens.

plurals
  1. POMeteor won't load client libraries
    text
    copied!<p>I'm trying to use chartjs by DevExpress in a meteor project and I am unable to load the required client libraries. In my project directory I have a 'client' folder with two items; dx.chartjs and globalize.min</p> <p>I recieve two errors when the loading the page:</p> <pre><code>Uncaught TypeError: Cannot read property 'DevExpress' of undefined </code></pre> <p>and</p> <pre><code>Exception from Deps afterFlush function: TypeError: Object [object Object] has no method 'dxPieChart' at Object.Template.hello.rendered (http://localhost:3000/chart.js?15ecf0e00ba2737900c70309ae9e83a5e6402b17:15:22) at Spark.createLandmark.rendered (http://localhost:3000/packages/templating.js?3e5f495522f23490e6711696b729358477f2105b:181:42) at http://localhost:3000/packages/spark.js?89d98339d0de8299aab5a40fa82010709f0606ee:443:32 at Array.forEach (native) at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?ab3604ad6a217062906fb40c8236bb7e59f51a7f:130:11) at http://localhost:3000/packages/spark.js?89d98339d0de8299aab5a40fa82010709f0606ee:441:7 at _.extend.flush (http://localhost:3000/packages/deps.js?3ca61f7bda24db4f00839466f22fd1d61de37661:265:11) </code></pre> <p>my code is incredibly simple HTML file</p> <pre><code>&lt;head&gt; &lt;title&gt;chart&lt;/title&gt; &lt;/head&gt; &lt;body&gt; {{&gt; hello}} &lt;/body&gt; &lt;template name="hello"&gt; &lt;div id="chartContainer"/&gt; &lt;/template&gt; </code></pre> <p>and the js file</p> <pre><code>if (Meteor.isClient) { Template.hello.rendered = function() { var dataSource = [ { country: "Russia", area: 12 }, { country: "Canada", area: 7 }, { country: "USA", area: 7 }, { country: "China", area: 7 }, { country: "Brazil", area: 6 }, { country: "Australia", area: 5 }, { country: "India", area: 2 }, { country: "Others", area: 55 } ]; $("#chartContainer").dxPieChart({ size:{ width: 500 }, dataSource: dataSource, series: [ { argumentField: "country", valueField: "area", label:{ visible: true, connector:{ visible:true, width: 1 } } } ], title: "Area of Countries" }); } } </code></pre> <p>I have yet to replicate this problem using another machine. I have uninstalled and re-installed multiple times with no luck. Has anybody encountered or can shed light on why this error might be occurring?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload