Can a child vomit due to not eating?

My 4 year old has hand foot and mouth. She refused to eat at all yesterday because her mouth sores were so painful. Literally all I could get her to eat all day was a cup of applesauce. I focused more on getting her to drink, which she did.

Well she woke up this morning and puked a couple times. It was clear but also looked like egg yolks. It said online this is bile because her stomach was empty.

Can she have puked from feeling nauseous because she hadn’t eaten? I’m getting her to eat oatmeal now but I’m just concerned about why she vomited. 😫