project_graphql_blog icon indicating copy to clipboard operation
project_graphql_blog copied to clipboard

Why is create-next-app command creating .tsx files instead of .js files?

Open 19sajib opened this issue 1 year ago • 2 comments

npx create-next-app -e with-tailwindcss is the command I have used. In the pages folder instead of the js file, it's created the tsx file.

19sajib avatar Aug 08 '22 04:08 19sajib

don't include '-e with-tailwindcss'

instead manually install it on your next js after npx create-next-app

just go to tailwind website and find the nextjs docs, i did this to my project, and it's working now

Dreula avatar Aug 11 '22 05:08 Dreula

thank you for your reply. I have also found this answer but now I want to know why this command behaves like this!

19sajib avatar Aug 13 '22 04:08 19sajib

Proper way to install Next.js with Tailwind CSS would be:

npx create-next-app project_name cd project_name npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p

Smokeengine avatar Nov 14 '22 16:11 Smokeengine