{"id":186,"hash":"252de0d17a512b99d67833e527e6762f707d9be7dd5cda353f610b2af193074d","pattern":"Tailwind error when installing shadcn in Vite React App","full_message":"I was setting up shadcn in a React App using Vite by using the following command:\n\nnpx shadcn@latest init\n\nand I received an error (please see error below). I had installed tailwind and did setup as mentioned on official website.\n\nnpm install -D tailwindcss postcss autoprefixer\n\nnpx tailwindcss init -p\n\nError:\n\nNo Tailwind CSS configuration found at\n/Users/mubashirahmed/Code/shadcn-project.\n\nIt is likely you do not have\nTailwind CSS installed or have an invalid configuration.\n\nInstall\nTailwind CSS then try again. \n\nVisit https://tailwindcss.com/docs/guides/vite to get started.\n\nWhat could be the possible reason for that?","ecosystem":"npm","package_name":"reactjs","package_version":null,"solution":"So after some search, I found a fix (from GitHub issues of repo) and the fix is quite simple you just have to add tailwind headers to index.css (global css file) of your project.\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\nYou can see other discussion here as well: https://github.com/shadcn-ui/ui/issues/4677","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/78979789/tailwind-error-when-installing-shadcn-in-vite-react-app","votes":25,"created_at":"2026-04-19T04:41:28.226402+00:00","updated_at":"2026-04-19T04:51:09.967590+00:00"}