Reputation: 11
I want to make an app in ionic, so I add some custom page in ionic by command :
ionic g page user
But I start ionic server it show error
Runtime Error Cannot find module "../pages/home/home"
Upvotes: 1
Views: 5089
Reputation: 1
I encountered the same problem when I was github clone code. But this is not the problem with the code itself, but because I used cnpm (npm of the Chinese version). Uninstall npm, install npm. The problem is solved
Upvotes: 0
Reputation: 8731
If the app tells you that it misses a file, that's because there's somewhere where you imported this file and it doesn't exist (anymore? maybe you deleted it and forgot to delete an import)
You should make a project-wide text search using grep or your favorite ide to find where you are importing "../pages/home/home".
Your error doesn't come from your ionic g page user
command as this command only generates a page named user.
It seems like you created a page called home and deleted it without deleting imports.
Upvotes: 2