我正在使用Meteor的0.9.3.1版本开展项目。我刚刚升级到版本1.2.0.1以恢复我的项目。
我已经通过运行meteor add alanning:roles
安装了最新版本的meteor-roles,因此应该是最新版本。我看过docs,但这并没有真正帮助。
任何人都对这个错误是什么以及如何解决它有任何想法?
Exception in template helper: ReferenceError: Match is not defined
at Object.Roles._uiHelpers.isInRole (http://localhost:3000/packages/alanning_roles.js?0f20b892d4a0a11a6ea8431da3d0a0953ba951a9:809:10)
at bindDataContext (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:2986:16)
at Blaze._wrapCatchingExceptions (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:1650:16)
at http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3038:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3671:12)
at wrapHelper (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3037:27)
at Spacebars.call (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:167:18)
at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:104:25)
at Object.Spacebars.dataMustache (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:136:39)
at http://localhost:3000/app/client/layout/adminlayout.compiled.html.js?c582d42dde65584f4e6c48e70d8d65fa2cba7589:6:22
答案 0 :(得分:8)
我相信GitHub上针对alanning:roles
的{{3}}有你想要的线索。您可能需要安装check
软件包,因为它可能是未声明的依赖项。
$ meteor add check
答案 1 :(得分:1)
challett似乎解决了这个问题:
https://github.com/challett/meteor-roles/commit/dfd967e1e2ea27dc20b34e2bd17f38de70ebed72
//roles/package.js
Package.describe({
summary: "Authorization package for Meteor",
- version: "1.2.12",
+ version: "1.2.13",
git: "https://github.com/alanning/meteor-roles.git",
name: "alanning:roles"
});
@@ -8,7 +8,7 @@ Package.describe({
Package.on_use(function (api) {
api.versionsFrom && api.versionsFrom("METEOR@0.9.0");
var both = ['client', 'server'];
- api.use(['underscore', 'accounts-base'], both);
+ api.use(['underscore', 'accounts-base', 'check'], both);
api.use(['handlebars'], 'client', {weak: true});