You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Environment
Node.js Version: 20.11.0
Next.js Version: 12.3.4
Anything else?
No response
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: