ā† flaviocopes.com

How to fix the `unable to resolve dependency tree` PostCSS and Tailwind issue in Next.js

Published May 03 2021

Psssst! The 2023 WEB DEVELOPMENT BOOTCAMP is starting on FEBRUARY 01, 2023! SIGNUPS ARE NOW OPEN to this 10-weeks cohort course. Learn the fundamentals, HTML, CSS, JS, Tailwind, React, Next.js and much more! āœØ

While setting up a new Next.js project with Tailwind I ran into an issue.

This issue might just be a temporary issue due to configuration problems and libraries versions, but Iā€™m writing this in case someone stumbles on it.

I ran:

npm install tailwindcss postcss-preset-env postcss-flexbugs-fixes

In other words, PostCSS 8.1.13 was required but Next installed 8.1.7.

So I ran

npm install tailwindcss@latest postcss@latest
postcss-preset-env postcss-flexbugs-fixes

and it worked!



I write books for developers šŸ‘‡šŸ¼

© 2023 Flavio Copes Flavio Copes made in Italy šŸ‡®šŸ‡¹ using Notion to Site Notion to Site