我刚刚更新铁路由器到最新的0.7.0,并有错误。错误:路由器未定义V0.7.0流星0.8.0
更新之前我使用“dev”分支Blaze,一切正常。
我在/lib/router.js中有routes.js,所以它可以在客户端和服务器上首先加载。这是当我运行MRT我得到的错误:
Your app is crashing. Here's the latest log.
/Users/pemmy/.meteor/tools/c2a0453c51/lib/node_modules/fibers/future.js:173
throw(ex);
^
ReferenceError: Router is not defined
at app/lib/routes.js:1:36
at app/lib/routes.js:79:3
at /Users/pemmy/projects/Meteor/projects/toonokio/.meteor/local/build/programs/server/boot.js:155:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/pemmy/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:79:11)
at /Users/pemmy/projects/Meteor/projects/toonokio/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
这是我对我的router.js文件:
1. Router.configure({
2. // layoutTemplate: 'basicLayout',
3. notFoundTemplate: 'notFound',
4. yieldTemplates: {
5. // 'header': { to: 'header' },
6. // 'footer': { to: 'footer' }
7. }
8. });
79. Router.map(function() {
80. this.route('home', {
81. path : '/',
82. controller : HomeController
83. });
84. });
什么我做错了,以及如何解决它的任何建议?
感谢, Praney
您是否删除了铁路由器包并重新安装? –
谢谢,修好了! – praneybehl