ant-design / ant-design-charts

A React Chart Library
https://ant-design-charts.antgroup.com/
MIT License
1.94k stars 363 forks source link

🐛[BUG]nextjs 14.0.4使用ant0design-charts 2.0.2 build error #2425

Open Wizarddm opened 8 months ago

Wizarddm commented 8 months ago

🐛 bug 描述 [详细地描述 bug,让大家都能理解]

ReferenceError: document is not defined at 35085 (/Users/xiaomin/code/zz-frontend/.next/server/app/dashboard/page.js:1:15501) at t (/Users/xiaomin/code/zz-frontend/.next/server/webpack-runtime.js:1:128) at F (/Users/xiaomin/code/zz-frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:91937) at /Users/xiaomin/code/zz-frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:94352 at W._fromJSON (/Users/xiaomin/code/zz-frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:94790) at JSON.parse () at N (/Users/xiaomin/code/zz-frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:91658) at t (/Users/xiaomin/code/zz-frontend/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:98043)

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

🏞 期望结果 [描述你原本期望看到的结果]

💻 复现代码 [提供可复现的代码,仓库,或线上示例]

官方示例的圆环图

© 版本信息

🚑 其他信息 [如截图等其他信息可以贴在这里]

image
lxfu1 commented 8 months ago

dynamic import? https://github.com/ant-design/ant-design-charts/issues/215

kyujonglee commented 6 months ago

same problem. :(

SsspongeBob commented 3 months ago

same problem, have you fixed it?