Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ESM module #193

Open
himself65 opened this issue Aug 8, 2022 · 1 comment · May be fixed by #214
Open

support ESM module #193

himself65 opened this issue Aug 8, 2022 · 1 comment · May be fixed by #214

Comments

@himself65
Copy link

Server Error
Error: require() of ES Module /Users/himself65/Code/textea-sheet/node_modules/react-dnd/dist/index.js from /Users/himself65/Code/textea-sheet/node_modules/react-dnd-preview/dist/cjs/usePreview.js not supported.
Instead change the require of index.js in /Users/himself65/Code/textea-sheet/node_modules/react-dnd-preview/dist/cjs/usePreview.js to a dynamic import() which is available in all CommonJS modules.

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Object.<anonymous>
.../node_modules/react-dnd-preview/dist/cjs/usePreview.js (8:17)
Object.<anonymous>
.../node_modules/react-dnd-preview/dist/cjs/Preview.js (12:20)
Object.<anonymous>
.../node_modules/react-dnd-preview/dist/cjs/index.js (26:16)
Object.<anonymous>
.../node_modules/react-mosaic-component/node_modules/react-dnd-multi-backend/dist/cjs/components/Preview.js (20:48)
Object.<anonymous>
.../node_modules/react-mosaic-component/node_modules/react-dnd-multi-backend/dist/cjs/index.js (56:16)
Object.<anonymous>
...node_modules/react-mosaic-component/lib/Mosaic.js (39:49)
Object.<anonymous>
.../node_modules/react-mosaic-component/lib/index.js (20:16)
react-mosaic-component
.../app/.next/server/pages/sheet/[id].js (1330:18)
__webpack_require__
.../app/.next/server/webpack-runtime.js (33:42)
__webpack_require__.t
.../app/.next/server/webpack-runtime.js (139:38)
Lonli-Lokli added a commit to Lonli-Lokli/react-mosaic that referenced this issue May 10, 2024
@Lonli-Lokli Lonli-Lokli linked a pull request May 10, 2024 that will close this issue
@Lonli-Lokli
Copy link

I've created PR to address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants