CR-V 1998, while driving the engine dies suddenly. I couldn't start it at first then I waited 5 min then it started.?

The next day, I drove my car and it happened again. But this time I noticed the engine light indicator turned on before the engine died. I waited for another 5 minutes then it started. Any opinion on this?
6 answers 6