我正在尝试整合一个使用dc.js图表库的流星应用程序。 我添加了chrts:dc package。我的流星列表是:
autopublish 1.0.4 (For prototyping only) Publish the entire database to all clients
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI with Meteor Blaze
charts:dc 1.7.4 Multi-Dimensional charts built to work natively with crossfilter rendered with d3.js (dc.js)
ecmascript 0.1.6* Compiler plugin that supports ES2015+ in all .js files
ejson 1.0.7 Extended and Extensible JSON library
es5-shim 4.1.14 Shims and polyfills to improve ECMAScript 5 support
insecure 1.0.4 (For prototyping only) Allow all database writes from the client
jquery 1.11.4 Manipulate the DOM using CSS selectors
meteor-base 1.0.1 Packages that every Meteor app needs
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.3 Adaptor for using MongoDB and Minimongo over DDP
session 1.1.1 Session variable
standard-minifiers 1.0.2 Standard minifiers used with Meteor apps by default.
tracker 1.0.9 Dependency tracker to allow reactive callbacks
当我运行应用程序时,我收到以下错误:
Uncaught ReferenceError: Template is not defined chart.js:8743
Cannot read property 'length' of null pfafman_crossfilter.js:560
也许,流星社区中的任何人都在使用dc.js,并且可以给我一个明确的方向,指出应该添加哪些软件包以使流星与dc.js一起工作
答案 0 :(得分:1)
我为解决这个问题所做的是加载实际的原始库(d3.js和crossfilter.js)而不是智能包代理。只需简单地将两个库放在app / client / lib下,这就可以很好地协同工作了。