I'm integrating PlateJS into my React application using create-react-app and @craco/craco. However, I encounter a compilation error with @udecode/plate-core:
Failed to compile.
./node_modules/@udecode/plate-core/dist/index.mjs
Attempted import error: 'nanoid' is not exported from 'nanoid/non-secure' (imported as 'nanoid2').
I've confirmed 'nanoid' is installed, deleted node_modules and package-lock.json, and reinstalled dependencies. I've also tried different versions of 'nanoid' and ensured all related packages are up to date. My project uses craco for configuration.
I'm integrating PlateJS into my React application using create-react-app and @craco/craco. However, I encounter a compilation error with @udecode/plate-core:
I've confirmed 'nanoid' is installed, deleted
node_modules
andpackage-lock.json
, and reinstalled dependencies. I've also tried different versions of 'nanoid' and ensured all related packages are up to date. My project uses craco for configuration.craco.config.js:
Environment:
React: ^18.2.0 react-dom: ^18.2.0 Any suggestions for resolving this issue would be greatly appreciated.
Funding