C
C#2d ago
k23478

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
14 verbose stack Error: could not determine executable to run
14 verbose stack at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
14 verbose stack at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
14 verbose stack at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
14 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5)
14 verbose stack Error: could not determine executable to run
14 verbose stack at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
14 verbose stack at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
14 verbose stack at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
14 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5)
7 Replies
k23478
k23478OP2d ago
Thanks, unfortunately there's no installation guide for asp.net so should I just switch to v3 ?
Angius
Angius2d ago
Have you looked at the Tailwind documentation? Since, you know, that's what you're trying to use?
k23478
k23478OP2d ago
yes
k23478
k23478OP2d ago
I don't see one using ASP.NET and I'm unsure whether to use Vite or PostCSS in their example
No description
Angius
Angius2d ago
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 stylesheet
k23478
k23478OP2d ago
I managed to get it working by overwriting style.css with tailwinds output

Did you find this page helpful?