instead of installing it like this
npm install --save-dev @types/react@~17.0.21
install it like this
npm install --save-dev @types/react@17.0.21
instead of installing it like this
npm install --save-dev @types/react@~17.0.21
install it like this
npm install --save-dev @types/react@17.0.21