Ionic 5 React - ionic serve fails

Hi,

I just installed Ionic CLI and I wanted to start playing with it.
When I create a new ionic react project with any starter template (blank or tabs) and try to run it using ionic serve I get this error:


More info about my env:

Note: If I try to build the project, everything works as expected and I can run the project on my browser.

Any idea what can cause this issue?

Thanks in advance.

Try uninstalling the ionic and node and then reinstall.

I tried on another MacBook and I get the same error.

I’m having the same issue. I tested all 4 @ionic/cli 6.0.0+ versions. The weird thing I found is that this error is present only when choosing a template where the Capacitor prompt pops up:
Integrate your new app with Capacitor to target native iOS and Android?

So the my-first-app and conference starter templates work fine for me.

It’s an error related to react-scripts version 3.3.*, has been fixed in 3.4.0
Github issue: https://github.com/facebook/create-react-app/issues/8490

2 Likes