meteor with mrt - iron:router: no such package

岁酱吖の 提交于 2019-12-12 12:15:27

问题


I'm learning meteor 0.8.3 and trying to get some basic routing set up using iron-router

My smart.json contains:

{
  packages: {
    iron-router: {
      git: https://github.com/EventedMind/iron-router.git,
      branch: blaze-integration
    }
  }
}

I added this, and then ran mrt install and mrt update

Then I did this, and got this error:

$ meteor add iron:router
iron-router: updating npm dependencies -- connect...
iron:router: no such package

I'm still able to run the application with mrt, and the application starts, but I get Uncaught TypeError: Cannot read property 'extend' of undefined from layout.js:92 and nothing shows up on the page.

My Router block looks like this:

 Router.map( function() {
   this.route('home', { path: '/' });
   this.route('create');
   this.route('tasksShow', { 
     path: '/tasks/:_id',
     data: function() { return Tasks.findOne(this.params._id); }
   });
 });

What am I doing wrong, how can I get iron-router working?


回答1:


Installation of IronRouter :

Meteor 0.8.3 and older

$ mrt add iron-router

Meteor 0.9.0 and newer

$ meteor add iron:router

More about this issue here: Installation issues with iron-router (newest) on Windows 7 x64 (Meteor 0.8.3)



来源:https://stackoverflow.com/questions/25384231/meteor-with-mrt-ironrouter-no-such-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!