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

[BUG] use refine with next and antd #6110

Closed
ccdarvin opened this issue Jul 5, 2024 · 5 comments
Closed

[BUG] use refine with next and antd #6110

ccdarvin opened this issue Jul 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ccdarvin
Copy link

ccdarvin commented Jul 5, 2024

Describe the bug

I try to use refine with next antd y turbobuild

Steps To Reproduce

change package.json

"dev": "next dev --turbo", or
"dev": "cross-env NODE_OPTIONS=--max_old_space_size=4096 refine dev --turbo"

Expected behavior

I have this error:

image

Packages

"@ant-design/icons": "^5.0.1",
"@ant-design/nextjs-registry": "^1.0.0",
"@refinedev/antd": "^5.37.4",
"@refinedev/cli": "^2.16.21",
"@refinedev/core": "^4.47.1",
"@refinedev/devtools": "^1.1.32",
"@refinedev/kbar": "^1.3.6",
"@refinedev/nextjs-router": "^6.0.0",
"@refinedev/supabase": "^5.7.4",
"@supabase/ssr": "^0.3.0",
"antd": "^5.0.5",
"js-cookie": "^3.0.5",
"next": "^14.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"

Additional Context

No response

@ccdarvin ccdarvin added the bug Something isn't working label Jul 5, 2024
@BatuhanW BatuhanW changed the title use refine with next and antd [BUG] [BUG] use refine with next and antd Jul 12, 2024
@alicanerdurmaz
Copy link
Member

Hi @ccdarvin, thanks for the report. We will reproduce this bug with turbopack and investigate it.

@BatuhanW
Copy link
Member

Hey @ccdarvin, I think turbo should ignore installed package's tsconfig file. It could be an issue with turbopack configuration.

@ccdarvin
Copy link
Author

I think the issue is in the package @refinedev/antd", because when I comment this line //transpilePackages: ['@refinedev/antd'], in next.config.mjs, it works well.

@alicanerdurmaz
Copy link
Member

alicanerdurmaz commented Jul 16, 2024

The problem between Next.js and Ant Design has existed for a long time. Since create refine-app doesn't create the project with Turbo, I prefer not to remove transpilePackages.

Thank you @ccdarvin for the issue and solution. From now on, anyone with this problem can easily fix it.

@jackytank
Copy link

Hi I get same issue as you but after remove @refinedev/antd from transpilePackages now it work well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants