You will need to fix the version for @types/react package because many react libraries have dependency set as @types/react : "*", which will take the latest version of the package. (I suppose they just released version 18)
To do that you can add this in your package.json
if you use yarn
"resolutions": {
"@types/react": "17.0.43"
}
$ yarn
OR in npm
"devDependencies": {
"@types/react": "^17.0.41"
}
OR
"devDependencie": {
"@types/react": "18.0.8"
}
and run $ npm install
you can also use resolutions with npm-force-resolutions library
to do that you need to add to the script section in package.json file
"preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions"
And then after doing npm install
see github issue