2

I finished up the app I was working on and it works on ionic serve with no issues, however when compiling I was met with this, any help is much appreciated.

[15:40:08]  typescript error 
            Type ResultPage in C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.ts is part of the declarations of
            2 modules: AppModule in C:/Users/Omar/Desktop/InfoKing/src/app/app.module.ts and ResultPageModule in
            C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.module.ts! Please consider moving ResultPage in
            C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.ts to a higher module that imports AppModule in
            C:/Users/Omar/Desktop/InfoKing/src/app/app.module.ts and ResultPageModule in
            C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.module.ts. You can also create a new NgModule that
            exports and includes ResultPage in C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.ts then import
            that NgModule in AppModule in C:/Users/Omar/Desktop/InfoKing/src/app/app.module.ts and ResultPageModule in
            C:/Users/Omar/Desktop/InfoKing/src/pages/result/result.module.ts.
            
            

Error: The Angular AoT build failed. See the issues above
    at C:\Users\Omar\Desktop\InfoKing\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
    at step (C:\Users\Omar\Desktop\InfoKing\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
    at Object.next (C:\Users\Omar\Desktop\InfoKing\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
    at fulfilled (C:\Users\Omar\Desktop\InfoKing\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
    at <anonymous>

1 Answer 1

1

Remove result.module.ts and remove @IonicPage from the result.ts file and run again hope it works for you

Sign up to request clarification or add additional context in comments.

2 Comments

Worked but I also removed the IonicPage import. Thanks :D
Glad that it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.