Meteor not detecting new files


#1

I’m trying to follow the official tutorial (using Blaze), but I’m getting this error:

Here are the steps I’m following: https://www.meteor.com/tutorials/blaze/templates

It works fine if I restart the server.

How can I fix this?


Blaze ToDoList Tutorial step 5 issue
Meteor 1.4.2.1 is an important patch for 1.4.2 users
Todo app does not work, cannot find module './main.html';
#2

I have the same problem.

  • 1

#3

Show us your folder/file structure. Where do you import that file ? Where is that file located ? :slight_smile:


#4

I’m just copying the tutorial, but here it is:

//client/main.js
import '../imports/ui/body.js';
//imports/ui/body.js
import { Template } from 'meteor/templating';
 
import './body.html';
 
Template.body.helpers({
  tasks: [
    { text: 'This is task 1' },
    { text: 'This is task 2' },
    { text: 'This is task 3' },
  ],
});

And finally the html file:

<body>
  <div class="container">
    <header>
      <h1>Todo List</h1>
    </header>
 
    <ul>
      {{#each tasks}}
        {{> task}}
      {{/each}}
    </ul>
  </div>
</body>
 
<template name="task">
  <li>{{text}}</li>
</template>

#5
Template.body.helpers({
<template name="task">

Fix is:
Template.task.helpers


#6

I’m still getting the same error.


#7

Someone with the same problem: http://stackoverflow.com/questions/40295188/meteor-simple-todos-tut-step-2-uncaught-error-cannot-find-module-template


#8

meteor update --release 1.4.1.3

Use that version until they fix it. I see now what you mean… this sucks!


#9

Ah, thought it was intended to separate helpers from other code. If you create that file it does actually work and that file gets loaded as well.


#10

It works! Thanks! :grin:

I was about to give up.

I hope they fix it soon…


#11

I get the same error, I found that NOT upgrading to 1.4.2 fixed the problem; staying on 1.4.1.3 has been working so far.


The tutorial bugs are harming referrals to the platform
#12

Please try this again after running

meteor update --release 1.4.2.2-beta.0

in an existing app, or

meteor create --release 1.4.2.2-beta.0 your-new-app

to create a new app using the latest beta version.