Meteor not detecting new files

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

Here are the steps I’m following: Meteor

It works fine if I restart the server.

How can I fix this?

I have the same problem.

  • 1

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

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>
Template.body.helpers({
<template name="task">

Fix is:
Template.task.helpers

I’m still getting the same error.

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

meteor update --release 1.4.1.3

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

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.

It works! Thanks! :grin:

I was about to give up.

I hope they fix it soon…

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.

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.