First, I renamed the repository directory for my app, mv fooapp barapp
. I did a search and replace for literally every instance of every casing of my app's old name, "FooApp", in the repository where it lives. grep -R -i FooApp *
returns absolutely nothing. I then deleted node_modules/
and did npm install
from scratch.
Somehow, somewhy, when I run ionic serve
, I get a page that reads
Error: ENOENT, open '/Users/bistenes/Code/fooapp/www/index.html'
What weird black magic does Ionic do such that ionic serve
still has the old path cached? How do I make it cut it out?
tl;dr: killall ionic
After reinitializing the app along the lines of what adamkwadsworth answered with, I found I was still having the same problem, indicating that the problem was not actually in the files, but either the environment or running processes. It turns out that when you run ionic serve
, even if the process is already running, it will go through a startup sequence. This led me to incorrectly believe that the process was actually terminating at some point. Rather, I still had the same ionic server running from long before any of the renaming. Running killall ionic
before my next ionic serve
solved the problem.
I had a similar issue before and I did the following:
I hope this helps,
Good luck.