DEV Community

Discussion on: Using Ant Design with NextJS (custom variables for Ant Design)

Collapse
 
nickbeukema profile image
Nick Beukema

Thanks for the guide! Just as an FYI for anyone following this as well, and running into issues with importing the ~antd/dist/antd.less file within antd.less, make sure you install the less package targeted at version ^3.12.2.

It looks like version ^4.0.0 is installed by default and triggers the following error:

error - ./styles/antd.less

.@{ant-prefix}-anchor {
  .reset-component;
                ^
Unrecognized input. Possibly missing '(' in mixin call.
Enter fullscreen mode Exit fullscreen mode