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

Nextjs + antd, Compilation failed, antd component library reports error "Cannot find module" #75783

Open
zmbxy opened this issue Feb 7, 2025 · 1 comment
Labels
Output Related to the the output configuration option.

Comments

@zmbxy
Copy link

zmbxy commented Feb 7, 2025

Link to the code that reproduces this issue

https://github.com/zmbxy/next-antd-demo

To Reproduce

run yarn & yarn build,console print error:

unhandledRejection [Error: Cannot find module 'next-antd-demo/node_modules/rc-util/es/utils/get' imported from next-antd-demo/node_modules/rc-util/es/utils/set.js] {
  type: 'Error',
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///next-antd-demo/node_modules/rc-util/es/utils/get'
}

I'm not sure if it's a problem with next script or antd, hope you can help me.

Current vs. Expected behavior

Expected: can compile isomorphism normally

Provide environment information

environment: 

pc: mac m1
node: 22.13.0
yarn: 1.22.19

Which area(s) are affected? (Select all that apply)

Output

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

No response

@github-actions github-actions bot added the Output Related to the the output configuration option. label Feb 7, 2025
@zmbxy zmbxy changed the title Nextjs + antd, set output=standalone to compile, antd component library reports error "Cannot find module" Nextjs + antd, Compilation failed, antd component library reports error "Cannot find module" Feb 10, 2025
@samcx
Copy link
Member

samcx commented Feb 11, 2025

@zmbxy Can you clarify if you are receiving an error without output: 'standalone' mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output Related to the the output configuration option.
Projects
None yet
Development

No branches or pull requests

2 participants