Trying to use Tailwind CSS in an ASP.NET project
Hello I'm trying to use tailwind instead of bootstrap but I'm running in some problems, below is the logfile with error
user@users-MacBook-Pro KE03_INTDEV_SE_1_Base % npx tailwindcss init
npm error could not determine executable to run
npm error A complete log of this run can be found in: /Users/user/.npm/_logs/2025-05-17T14_30_02_887Z-debug-0.log
user@users-MacBook-Pro KE03_INTDEV_SE_1_Base % cat /Users/user/.npm/_logs/2025-05-17T14_30_02_887Z-debug-0.log
7 Replies
Thanks, unfortunately there's no installation guide for asp.net so should I just switch to v3 ?
Have you looked at the Tailwind documentation?
Since, you know, that's what you're trying to use?
yes
I don't see one using ASP.NET and I'm unsure whether to use Vite or PostCSS in their example

Far as I know, there's no built-in integration
Your best bet would be to compile your Tailwind code into CSS with actual classes and use those
I don't think there's anything that would compile your
.razor
or .cshtml
files from <div class=sm-7 us-32 hhtb-max jajja-min gt-dark--auto--91"></div>
into <div class="9813bh2"></div>
with an associated generated stylesheetI managed to get it working by overwriting style.css with tailwinds output