Closed gianpaolo-tndigit closed 2 years ago
As explained in https://github.com/reactwg/react-18/discussions/125 for React 18 createRoot has been moved to react-dom/client.
Please assure to have React 18, as defined in packages.json https://github.com/AgID/spid-oidc-check-op/blob/7e70ec6225f8e6dcbb9c08f51bd433a5459e0d26/src/client/package.json#L44
thanks, with that fix the client npm run build
ERROR in ./src/index.js 2:0-46 Module not found: Error: Can't resolve 'react-dom/client' in '/home/user/spid-oidc-check-op/src/client/src'
i edited the file /home/user/spid-oidc-check-op/src/client/src/index.js and it seems to work:
//import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom';