添加materialize包时出现流星错误

时间:2015-09-16 10:51:37

标签: meteor materialize

我刚刚创建了一个空的流星应用程序,当我启动流星应用程序时,通过运行meteor add materialize:materializematerialize包添加到meteor应用程序中会在浏览器控制台中产生以下错误:

Uncaught TypeError: Cannot set property 'guid' of undefined(anonymous function) @ materialize.js:2(anonymous function) @ materialize_materialize.js?dc17392a9a3ee90d7260ca5fb3f114186ddbe932:42(anonymous function) @ materialize_materialize.js?dc17392a9a3ee90d7260ca5fb3f114186ddbe932:51
global-imports.js?f3a8210e13a775671b88b311040d18b5595730c1:3 Uncaught TypeError: Cannot read property 'Materialize' of undefined(anonymous function) @ global-imports.js?f3a8210e13a775671b88b311040d18b5595730c1:3
template.test-materialize.js?db9efeb690fbdd904fe4b351652e4822e8f5d459:2 Uncaught ReferenceError: Meteor is not defined(anonymous function) @ template.test-materialize.js?db9efeb690fbdd904fe4b351652e4822e8f5d459:2(anonymous function) @ template.test-materialize.js?db9efeb690fbdd904fe4b351652e4822e8f5d459:18
test-materialize.js?c2e184d448010d8345127ffbaf10ce04b6d355e3:1 Uncaught ReferenceError: Meteor is not defined(anonymous function) @ test-materialize.js?c2e184d448010d8345127ffbaf10ce04b6d355e3:1(anonymous function) @ test-materialize.js?c2e184d448010d8345127ffbaf10ce04b6d355e3:25

2 个答案:

答案 0 :(得分:15)

这似乎是最新版本软件包的新问题。这样做是为了解决问题:

MessageQueue

请点击此处查看GitHub问题:https://github.com/Dogfalo/materialize/issues/2043

答案 1 :(得分:0)

通过您的app.js文件中的CDN添加最新版本的materialise

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/css/materialize.min.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/js/materialize.min.js"></script>

我正在遵循这种方法(至少包装固定),&amp;应该适合你的需要。