Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor iron-router splash screen error on deploy only

I'm using Meteor 1.0.3.1 on my local machine, and I'm deploying with node v0.10.36. However, the deploy machine only ever displays the iron-router splash screen... "iron:router" "Organize your Meteor application" ...

There are several other stacks about fixing this exact problem, including removing the tag and removing the projects npm.js file (left over from bootstrap). None of these are working.

project.js file is as follows:

Router.route('/', function () {
  this.render('home');
});

Router.route('/about', function () {
  this.render('about');
});

Router.route('/contact', function () {
  this.render('contact');
});

Router.route('/legal', function () {
  this.render('legal');
});

Router.route('imitationgamereview', function () {
  this.render('imitationgamereview');
});


if (Meteor.isClient) {
}

if (Meteor.isServer) {
  Meteor.startup(function () {
    // code to run on server at startup
  });
}

project.html file is as follows:

<head>
    <title>my sample project</title>
    <link rel="shortcut icon" href="/favicon.ico?v=2" />
</head>

<template name="home">
  test
</template>

Totally going bonkers! WTF iron-router? I'm so in love with you, then you do stuff to me like this!

like image 234
JD Brinton Avatar asked Feb 01 '15 11:02

JD Brinton


2 Answers

Perhaps it has to do with the file location of your routing file (project.js). Moving the it to /lib solved the problem for me.

like image 142
Archy Will He 何魏奇 Avatar answered Oct 14 '22 08:10

Archy Will He 何魏奇


I was getting the same splash screen on x.meteor.com and --production emulation until i made sure that every

Meteor.publish({});

is in an if(Meteor.isServer) statement e.g.

if(Meteor.isServer) {
    Meteor.publish('files', function() {
        return Files.find();
    });
}

This fixed the problem for me.

like image 45
Kristis Avatar answered Oct 14 '22 10:10

Kristis