Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

V2: tutorial - cannot find module

$
0
0

@beck24 wrote:

I'm trying out ionic V2, followed the getting started guide and have a working tutorial.

Next I tried to add a custom page.

ionic g page testpage

This did what it was supposed to and created app/pages/testpage/testpage.(scss | js | html)
(Q: for typescript should it generate a .ts file?)

However I can't seem to get this page to work in the tutorial app.

In app.js

import {TestpagePage} from './pages/testpage/testpage';

...

// set our app's pages
this.pages = [
{ title: 'Hello Ionic', component: HelloIonicPage },
{ title: 'My First List', component: ListPage },
{ title: 'TestPage', component: TestpagePage }
];

And it throws the error:

uncaught error: cannot find module './pages/testpage/testpage'

I can't see what I'm doing differently than the tutorial. The path './pages/testpage/testpage' is relative to app.(js | ts) just the same as the tutorial pages. I've read all the examples I can find and it all looks like it should be this easy and should work, it's just not. Do I have a fundamental misunderstanding of something here?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles