🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻💻 Design to Code in one click
I am encountering an issue when building my Next.js application that uses the @douyinfe/semi-ui library. The error message indicates a problem with importing an ES Module in the @douyinfe/semi-foundation package.
Semi Version
No response
Current Behavior
Error: require() of ES Module C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@mdx-js\mdx\index.js from C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js not supported. Instead change the require of index.js in C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js to a dynamic import() which is available in all CommonJS modules.
Expected Behavior
I expected the build process to complete without errors, as I am using compatible versions of the dependencies.
Steps To Reproduce
Install the @douyinfe/semi-ui package in a Next.js project.
Run yarn build.
Observe the error message related to ES module imports.
ReproducibleCode
Error: require() of ES Module C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@mdx-js\mdx\index.js from C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js not supported. Instead change the require of index.js in C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js to a dynamic import() which is available in all CommonJS modules.
Is there an existing issue for this?
Which Component
I am encountering an issue when building my Next.js application that uses the @douyinfe/semi-ui library. The error message indicates a problem with importing an ES Module in the @douyinfe/semi-foundation package.
Semi Version
No response
Current Behavior
Error: require() of ES Module C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@mdx-js\mdx\index.js from C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js not supported. Instead change the require of index.js in C:\Users\Administrator\Desktop\witcube\frontend\node_modules\@douyinfe\semi-foundation\lib\cjs\markdownRender\foundation.js to a dynamic import() which is available in all CommonJS modules.
Expected Behavior
I expected the build process to complete without errors, as I am using compatible versions of the dependencies.
Steps To Reproduce
Install the @douyinfe/semi-ui package in a Next.js project. Run yarn build. Observe the error message related to ES module imports.
ReproducibleCode
Environment
Anything else?
No response