Deploying a meteor app from Meteor Galaxy Error: iron:router No route definitions found

197 Views Asked by At

I have deployed my meteor app from Meteor Galaxy. This works fine, but when I enter the address http://perfilesgs.meteorapp.com/, this shows me an error that the route has not been found.

If you need more information that I can give you to solve this problem tell me. I will be careful.

Thanks.

lib/router.js

var request = require('request');
var cheerio = require('cheerio');
var json2csv = require('json2csv');

Router.configure({
  layoutTemplate: 'layout',
  loadingTemplate: 'loading',
  notFoundTemplate: 'notFound'
});

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

Router.route('/inicio', {
  name: 'buscador'
});

Router.route('/results/', function () {
  this.redirect('/inicio');
});

var requireLogin = function() {
  if (! Meteor.user()) {
    if (Meteor.loggingIn()) {
      this.render(this.loadingTemplate);
    } else {
      this.render('accessDenied');
    }
  } else {
    this.next();
  }
}

enter image description here

1

There are 1 best solutions below

1
On

Tested independently, the code you provided seems to work properly. I think that other errors in your code are preventing the client-side iron-router code from executing. I see two errors on the browser console:

console errors

Fix these (both seem trivial), and I imagine iron-router should work as expected. Update the question if this is not the case.