Meteor app在本地运行,但在部署到meteor.com时不会加载

时间:2015-08-29 16:11:51

标签: meteor

我不知道该怎么做。一切都很好,但是当我现在部署时突然间我得到了神秘的错误

Uncaught TypeError: Cannot read property 'helpers' of undefined
bf828391c4c2197419ba1631eee96dfda64d3e0a.js:111 Uncaught TypeError: Cannot read property 'ServiceConfiguration' of undefined
memrey.meteor.com/:1 Document was loaded from Application Cache with manifest http://memrey.meteor.com/app.manifest
memrey.meteor.com/:1 Application Cache Checking event
bf828391c4c2197419ba1631eee96dfda64d3e0a.js:3 Exception in callback of async function: TypeError: Cannot read property 'form' of undefined
    at x.setState (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:135:16160)
    at a.contains.o.route.a.extend.onBeforeAction (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:142:3525)
    at p (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:72:4036)
    at http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:3:6711
    at C (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:82:4631)
    at p (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:72:4036)
    at http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:3:6711
    at b (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:82:4559)
    at p (http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:72:4036)
    at http://memrey.meteor.com/bf828391c4c2197419ba1631eee96dfda64d3e0a.js:3:6711
memrey.meteor.com/:1 Application Cache NoUpdate event
bf828391c4c2197419ba1631eee96dfda64d3e0a.js:64 Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?

代码在本地工作得很好。所以我迷路了。我甚至不知道从哪里开始调试。

我正在使用带有useraccounts模板包的铁路由器。我不确定它是否与此有关。

2 个答案:

答案 0 :(得分:1)

好的,我发现了问题所在。

当我定义模板助手时:

Template.notification.helpers

我拼错了notification

导致所有错误。但奇怪的是它在本地工作但在部署时却没有。

答案 1 :(得分:1)

可以容忍异常,因为它们在开发模式下工作时处于单独的文件中,但是当它们在生产中部署时,它们会被缩小并加入,因此停止执行js文件。

Source