refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
27.93k stars 2.17k forks source link

[BUG] @refinedev/antd doesn't work with NextJS 14.0.3 #5353

Closed w20k closed 10 months ago

w20k commented 10 months ago

Describe the bug

Refine doesn't support latest Next.js (tested version: 14.0.3).

Steps To Reproduce

  1. Generate project with npm create refine-app@latest
  2. Upgrade nextjs and next-i18next (if installed) to the latest ("next-i18next": "^15.0.0", "next": "^14.0.3")
  3. Add missing dependencies: "react-i18next": "13.3.1", "i18next": "23.7.7"
  4. Run with yarn dev or npm run dev

Expected behavior

Dev build should start without errors.

Screenshot

Screenshot_2023-12-06_at_00_02_05-2

Desktop

Mobile

Additional Context

Seems like it's related to the bug within the next.js: https://github.com/vercel/next.js/issues/58817

This particular answer doesn't work, removing or adding those doesn't solve a thing.

Tried with and without (added all as from comment above):

  transpilePackages: [
    '@refinedev/antd',
    '@refinedev/inferencer',
    '@refinedev/ui-types',
    'antd',
    '@ant-design/icons',
    '@ant-design/pro-components',
    '@ant-design/pro-layout',
    '@ant-design/pro-utils',
    '@ant-design/pro-provider',
    '@rc-component',
    'rc-cascader',
    'rc-checkbox',
    'rc-collapse',
    'rc-dialog',
    'rc-drawer',
    'rc-dropdown',
    'rc-field-form',
    'rc-image',
    'rc-input',
    'rc-input-number',
    'rc-mentions',
    'rc-menu',
    'rc-motion',
    'rc-notification',
    'rc-pagination',
    'rc-picker',
    'rc-progress',
    'rc-rate',
    'rc-resize-observer',
    'rc-segmented',
    'rc-select',
    'rc-slider',
    'rc-steps',
    'rc-switch',
    'rc-table',
    'rc-tabs',
    'rc-textarea',
    'rc-tooltip',
    'rc-tree',
    'rc-tree-select',
    'rc-upload',
    'rc-util',
  ],
BatuhanW commented 10 months ago

Hello @w20k, as you also pointed, this issue isn't related to refine, so we can't do anything about it.

w20k commented 10 months ago

The purpose of this bug is solely for visibility and tracking, ensuring that other 'refine' users are not confused. In most cases, any configurations will have no effect.

@BatuhanW, I believe it's not advisable to close this issue. This is because it still doesn't function properly with refine-antd and the latest version of next.js. It's not as if it can be fixed or completed from your end, but it's still a bug and it doesn't work with refine library.