ant-design: `5.17.0` cause `next build` too long

Reproduction link

https://github.com/lobehub/lobe-chat/tree/repoduction/antd-5.17.0

Steps to reproduce

git clone https://github.com/lobehub/lobe-chat

git checkout repoduction/antd-5.17.0

# 安装依赖
pnpm i / bun i

# 构建
npm run build

What is expected?

完成构建,大约用时在 5 分钟左右

What is actually happening?

持续卡住在 Generating static pages 阶段,可能用时达到 20~30 分钟

image
Environment Info
antd 5.17.0
React 18
System macOS
Browser any

不确定是否 minimal 的仓库是否会遇到这个问题,但是 LobeChat 作为一个已经相对较为复杂的 next antd 应用遇到这个问题了,感觉应该是 5.17.0 的其中某些机制出了问题。

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 21
  • Comments: 19 (4 by maintainers)

Most upvoted comments

We are facing the same issue. After reverting back to antd@5.16.5 it is working fine

yes me too

@Ethan-Arrowood , I’ve create the reproduce branch:

Reproduce

clone:

https://github.com/ant-design/ant-design-examples.git

checkout:

tmp-antd-next-reproduce

cd router:

/examples/with-nextjs-app-router-inline-style

Install deps:

pnpm i

Run build:

pnpm build

Hi @Ethan-Arrowood , here is my copy issue in Next.js: https://github.com/vercel/next.js/issues/65512

In antd side, we’ve patch the @rc-component/async-validator (https://github.com/react-component/async-validator/pull/9) for workaround. You can reproduce it with lock @rc-component/async-validator@5.0.2 to reproduce (This workaround patch is on 5.0.3).

Here is my dig info that you can ref (See Background and solution part):

https://github.com/ant-design/ant-design/pull/48829

same,next build run infinitely under antd@5.17.0, downgrade to version 5.16.5 fix the problem.

Same 40 minutes to build an almost empty project