Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iron Router showing splash page when deployed, works fine on local

I am using Meteor 1.0.2.1 and iron:router 1.0.7. I have managed to set up a route for '/' which works fine locally however when I deploy on meteor I get the iron:router splash.

Here is my route:

Router.route('/', {name: 'landing.index'});

and I have a controller called LandingIndex and a template called LandingIndex as well.

Any help is greatly appreciated.

edit:

The controllers looks as follows:

LandingIndexController = RouteController.extend({
   waitOn: function () {
   },

   data: function () {
   },

   action: function () {
     this.render();
   }
});
like image 264
teh0wner Avatar asked Jan 17 '15 11:01

teh0wner


2 Answers

In my case I had duplicate templates. A quick look at the console pointed out the problem.

like image 184
Julian K Avatar answered Nov 15 '22 10:11

Julian K


Are you by any chance using Twitter Bootstrap? I ran into this same problem today, non-reproducible on localhost as well. After way too many hours of trying to reproduce this on a remote env with meteor deploy xxxxx.meteor.com, I figured out that it was because of a file contained within Twitter Bootstrap. If you straight up download the .zip file of bootstrap and indiscriminately copy its 3 directories into your project (css/ fonts/ js/), js/npm.js will be copied along with it.

I think js/npm.js is only needed during the build process with Grunt, so I just deleted it. It solved the issue for me, although I'm not sure why...

like image 26
Grant David Bachman Avatar answered Nov 15 '22 09:11

Grant David Bachman