Ionic v8 Minimum React Router & Router-Dom Version

I’m in the process of updating to Ionic v8 and React v18. I’ve ran into an issue where upgrading to the latest version of react-router and react-router-dom causes the build to fail with the following error:

It appears that the @ionic/react-router does not support the latest version of react-router & router-dom. So what is the minimum supported version?

I had similar problems when switching to react18. I had to leave a version of router-dom before 6

"@ionic/react": "^7.8.3",
"@ionic/react-router": "^7.8.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",