Next.js Discord

Discord Forum

While setting up nextJS project, by default tailwind v3 is installed?

Answered
Northern snakehead posted this in #help-forum
Open in Discord
Northern snakeheadOP
I was trying to set up a next js project using - npx create-next-app@latest ./. Since, tailwind v4.0 has been released, I would like to use that in my project, but by default it's installing v3.4.1?
Answered by B33fb0n3
you can just follow the installation for tailwind v4 with using:
npm i tailwindcss @tailwindcss/postcss;

Or directly set tailwindcss to 4.0.0 and add @tailwindcss/postcss yourself.

Keep in mind, that that's not the only thing that's changed. Make sure to execute their upgrade command:
npx @tailwindcss/upgrade@next
View full answer

4 Replies

@Northern snakehead I was trying to set up a next js project using - `npx create-next-app@latest ./`. Since, tailwind v4.0 has been released, I would like to use that in my project, but by default it's installing v3.4.1?
you can just follow the installation for tailwind v4 with using:
npm i tailwindcss @tailwindcss/postcss;

Or directly set tailwindcss to 4.0.0 and add @tailwindcss/postcss yourself.

Keep in mind, that that's not the only thing that's changed. Make sure to execute their upgrade command:
npx @tailwindcss/upgrade@next
Answer
Northern snakeheadOP
I tried to run this command - npx @tailwindcss/upgrade@next, but it's showing this. I think, first I've to commit all my changes, right?