if you are using next.js with typescript which most likely is the case, you will need to also install the typescript types for react and react-dom. Next 9 added built-in zero-config typescript support ...