AgID / spid-oidc-check-op

SPID OIDC Conformance Test Tool for OP
Apache License 2.0
4 stars 3 forks source link

problem compiling npm run build #1

Closed gianpaolo-tndigit closed 2 years ago

gianpaolo-tndigit commented 2 years ago

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';

damikael commented 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

gianpaolo-tndigit commented 2 years ago

thanks, with that fix the client npm run build