Error serving new ionic react project

Trying out ionic for the first time. I am familiar with React and noticed it was a supported framework. I am on a windows 10 machine.

Followed the instructions from https://ionicframework.com/docs/installation/cli

  1. Installed nodeJS LTS latest version
  2. installed ionic via npm
  3. Created a project using ionic start
  4. cd to project dir and tried ionic serve

I get the following error message

[react-scripts] Starting the development server...
[react-scripts]
[react-scripts] Failed to compile.
[react-scripts]
[react-scripts] c:/Workspace/myapp/src/App.tsx
[react-scripts] TypeScript error in c:/Workspace/myapp/src/App.tsx(39,4):
[react-scripts] Type '{ children: Element; }' is missing the following properties from type 'Pick<IonicReactExternalProps<IonApp & ReactProps, HTMLIonAppElement>, "style" | "title" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | ... 159 more ... | "onDblClickCapture">': style, title, accessKey, contentEditable, and 162 more.  TS2740
[react-scripts]     37 |
[react-scripts]     38 | const App: React.FC = () => (
[react-scripts]   > 39 |   <IonApp>
[react-scripts]        |    ^
[react-scripts]     40 |     <IonReactRouter>
[react-scripts]     41 |       <IonTabs>
[react-scripts]     42 |         <IonRouterOutlet>

I am not sure how to debug this issue. It worked on a different windows 10 machine, but trying to set up the environment on a second machine has been fruitless.

Any suggestions would be welcome.

Please updtae “@ionic/react”: version to “^4.10.0-rc.3”, In your package .json and before npm install please remove node_modules directory and then reinstall node modules with update version of “@ionic/react”, It will work

1 Like

Thank you for the suggestion, I was able to serve the project successfully.