Meteor 1.3.rc-4 import from imports folder

I am following the directory structure at I tried below with rc3 & rc4 both (and beta earlier).

I have routes.jsx in imports/startup/client folder.

In client/main.js I am trying to import the routes.jsx, but it is not working. The path patterns that I tried are:

  1. import ‘/imports/startup/client’; (referred from
  2. import ‘/imports/startup/client/routes.jsx’;
  3. import ‘./…/imports/startup/client’;
  4. import ‘./…/imports/startup/client/routes.jsx’;
  5. import ‘…/imports/startup/client’;
  6. import ‘…/imports/startup/client/routes.jsx’;

But I keep getting this error (as seen in browser console)

Error: Cannot find module '/imports/startup/client’

What is the correct way to import from imports folder in client ?

Off-topic: Is 1.3 released? Where did you find that guide?

1.3 is not yet released, but I found the guide at

1 Like

Just checked our code (also with file structure copied from the latest Todos example) and we have the same as your version 6, but without the semi-colon: import '../imports/startup/client/routes.jsx'

I’m not convinced that’s your issue though, if you get that exact same error no matter what you try then it seems like you must be trying to import '/imports/startup/client' somewhere, I’d search your code for that. Failing that, maybe try meteor reset or clearing your browser cache (clutching at straws a bit there!).

Feeling stupid at my mistake. As you suggested I searched the project and found that the error was coming from somewhere else.

Thank you for your time and tip. :slight_smile:

1 Like