Getting error "Cannot find module './group_page.html'


#1

Hi
I’m just trying out meteor 1.3.2.4 and running into some problems with loading templates. I’m trying to use flowrouter and it isn’t finding my templates.

In lib/router.js I have

import ‘…/imports/ui/pages/group_page.js’
FlowRouter.route(’/’, {
name: ‘group’,
action() {
BlazeLayout.render(‘App_body’, {main: ‘group_page’});
}
});

and then in
imports/ui/pages/group_page.js I have

import {Meteor} from ‘meteor/meteor’;
import {Template} from ‘meteor/templating’;
import {Groups} from '…/…/api/groups.js’
import ‘./group_page.html’;

This errors every time with ‘Cannot find module ./group_page.html’.

group_page.html is in the same directory (imports/ui/pages) and is just a template file.

Am I misunderstanding how the structure should work or missing something?

Many thanks
David


#2

I ended up moving all the templates from the imports to the client directory and everything started working.

So I’ll put it down to misunderstanding how the structure should work :slight_smile: