Skip to content
FLAVIO COPES
flaviocopes.com
2026

Fix Tailwind 'unable to resolve dependency tree' in Next.js

By Flavio Copes

Learn how to fix the unable to resolve dependency tree error when installing Tailwind in a Next.js project by installing tailwindcss@latest and postcss@latest.

~~~

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

Terminal showing npm ERESOLVE errors with PostCSS dependency conflicts when installing Tailwind packages

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!

Tagged: Next.js · All topics
~~~

Related posts about next: