探索 Meteor,第 3-5 章:纯灰色屏幕且无数据

Discover Meteor, Chapter 3-5: plain grey screen and no data

这是关于 的后续问题。

Discover Meteor 的第 3 章开始,每当我 运行 服务器访问 http://localhost:3000/ URL(或任何应用程序的其他页面),我只看到一个普通的灰色屏幕,上面什么也没有:

我决定继续学习本教程,希望下一章能够通过更新一些文件来修复错误,但事实并非如此。

服务器日志没有错误,所以我不能在这里重现。

但是,您可以在GitHub上找到项目的所有文件:https://github.com/thibaudclement/microscope

更新:这是客户端控制台日志:

Uncaught TypeError: Template.__create__ is not a function
meteor.js:225 Uncaught TypeError: Cannot read property 'prototype' of undefined
iron-router.js:1475 Uncaught TypeError: undefined is not a function
global-imports.js:3 Uncaught TypeError: Cannot read property 'RouteController' of undefined
template.layout.js:2 Uncaught ReferenceError: Template is not defined
template.loading.js:2 Uncaught ReferenceError: Template is not defined
template.post_item.js:2 Uncaught ReferenceError: Template is not defined
template.post_page.js:2 Uncaught ReferenceError: Template is not defined
template.posts_list.js:2 Uncaught ReferenceError: Template is not defined
template.main.js:2 Uncaught ReferenceError: Template is not defined
router.js:1 Uncaught ReferenceError: Router is not defined
post_item.js:1 Uncaught ReferenceError: Template is not defined
posts_list.js:1 Uncaught ReferenceError: Template is not defined
posts.js:1 Uncaught ReferenceError: Meteor is not defined
meteor.js:888 Exception in defer callback: TypeError: Cannot read property 'insert' of undefined
    at Utils.extend.autoRender (http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1636:17)
    at http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1465:16
    at _.extend.withValue (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:955:17)
    at http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:435:45
    at Object.<anonymous> (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:983:22)
    at onGlobalMessage (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:372:23)

知道我做错了什么吗?

或者至少,我应该从哪里开始寻找问题所在?

问题可能是您正在关注旧版本的书或使用显微镜(不确定)

我克隆了您的应用并尝试 运行

在您的 .meteor/packages 文件中

改变

iron-router
spin

 iron:router
 sacha:spin

这些更改对我来说效果很好