1.3 import module errors

I have a project with the following structure :

Project : 

So in my routes.jsx I want to import module from mainlayouts and hompepage, and this is what I did:

import {MainLayout} from '../client/layouts/mainlayouts.jsx';
import HomePage from '../client/templates/homepage.jxs';

But I got this error:

Error: Cannot find module '../client/layouts/mainlayouts.jsx'

Also tried with absolute path:
import {MainLayout} from '/client/layouts/mainlayouts.jsx';

And still got the error.

What did I do wrong?

The server won’t have the /client folder bundled! Move your routes to the client :slight_smile:

(If using SSR, put your components in /lib)


Yes, you are right. Changing the client folder to something else works.