Update ionic 2 to ionic 3 project

Congrats! We all can relate to the relief it must give.

If this worked or should work please create an issue at https://github.com/ionic-team/ionic-app-scripts/issues

Anyone stumbling across this thread: it’s not just this issue. You will have many problems if you try to jam multiple components into a single file. Give each of them their own file, and you will be happier.

1 Like

Hi

I could not reproduce this error.

I created a new project (sidemenu), duplicated ListPage in list.ts and renamed to ListPage2 (so 2 components in 1 file), assured all declarations in app.component.ts and app.module.ts have references to ListPage2.

The app renders perfectly, no errors.

cli packages: (C:\Users\XXXXAppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.10.2
    ionic (Ionic CLI) : 3.10.3

local packages:

    @ionic/app-scripts : 2.1.4
    Ionic Framework    : ionic-angular 3.6.1

System:

    Node : v6.11.2
    npm  : 3.10.10
    OS   : Windows 7

I guess there error is somewhere else, and if you are unlucky, will pop up again mysteriously.

Regards

Tom

Tom I used modal components, no normal pages.

Hi

Which decorator did you use then? @Component? You post said “multiple components”

I tested using @Component.

But irrespective, it should be possible (but not desirable) to put multiple definitions in one file.

Regards,

Tom