ionic serve fails after renaming app

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:

  1. Setup a new Ionic app - ionic start myApp blank
  2. Add required platforms - ionic add platform ios/android
  3. Copy and paste the 'www' file into the new project
  4. Install required 'ngCordova' plugins
  5. Build app - ionic build ios
  6. Run or Emulate app - ionic run/emulate ios/android

I hope this helps,
Good luck.