Today i tried to make my app ready for my website so i ran this command:
npm run build --prod
and then i got this long error on my terminal:
[00:00:50] Error: Type QuestionMessagePage in
pages/question-message/question-message.ts is part
of the declarations of 2 modules:
AppModule in app/app.module.ts and
QuestionMessageModule in pages/question-message/question-message.module.ts!
Please consider moving QuestionMessagePage in
pages/question-message/question-message.ts to a
higher module that imports AppModule in
app/app.module.ts and QuestionMessageModule in
pages/question-message/question-message.module.ts.
You can also create a new NgModule that exports and includes QuestionMessagePage in
pages/question-message/question-message.ts then
import that NgModule in AppModule in
app/app.module.ts and QuestionMessageModule in
pages/question-message/question-message.module.ts.
SOLUTION: to fix this all i had to do was delete a file called question-message.module.ts
you will also need to remove the @IonicPage decorator from question-message.ts
otherwise you might get an error like this:
[10:37:15] Error: pages\question-message\question-message.ts
has a @IonicPage decorator, but it does not have a corresponding "NgModule" at
pages\question-message\question-message.module.ts
Error: pages\question-message\question-message.ts has a @IonicPage dec
does not have a corresponding "NgModule" at pages\question-message\
https://www.webune.com/forums/error-type-module-in-pages-examplets-is-part-of-the-declarations-of-2-modules.html