elado / next-with-less

Next.js + Less CSS Support
MIT License
143 stars 24 forks source link

`next` dev mode not working with next 12.0.3, antd 4.16.13 #17

Closed lgenzelis closed 2 years ago

lgenzelis commented 2 years ago

Hi! I'm using the latest versions of next (12.0.3), antd (4.16.13) and next-with-less (2.0.2). Things were working fine until next 12.0.2. However, something broke with 12.0.3. Production mode (next build && next start) works fine, but dev mode (next) doesn't. This is the error I'm getting:

error - ./node_modules/antd/dist/antd.less:4:0
Module not found: Can't resolve '../lib/image/style/data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4='

I'm reporting this here because, since next doesn't support less, I don't think they're gonna regard this as their issue 😓

chemicalkosek commented 2 years ago

It's a bug within Next.js. Should be fixed in 12.0.4. You can wait for that, or stick to 12.0.2 for now. Or try next@canary as it should be fixed there.

lgenzelis commented 2 years ago

Awesome, thanks for that quick reply @chemicalkosek . I'll leave this open until next 12.0.4 is released and I can confirm that it indeed solves this problem.

chemicalkosek commented 2 years ago

https://github.com/vercel/next.js/issues/30895

iicdii commented 2 years ago

We can safely close it now since the bug has been fixed in next 12.0.4.