Summary
sm new project (CLI v0.0.36) generates package.json with tailwindcss@^4.2.2 and @tailwindcss/vite@^4.2.2 as deps, but no @tailwindcss/cli. The Tailwind v4 packages no longer ship a standalone CLI in tailwindcss itself — the CLI binary is provided by @tailwindcss/cli. So after npm install, node_modules/.bin/tailwindcss does not exist.
SimpleModule.Hosting.targets then runs "\$(RepoRoot)node_modules/.bin/tailwindcss" -i ... -o ... --minify during dotnet build and fails:
SimpleModule.Hosting.targets(64,5): error MSB3073: The command "...node_modules/.bin/tailwindcss" -i ... exited with code 127.
Net effect: a freshly-scaffolded project doesn't compile until you manually npm install -D @tailwindcss/cli.
Repro
dotnet tool install -g SimpleModule.Cli # 0.0.36
sm new project Repro
cd Repro
npm install # (after working around #150 by removing @simplemodule/tsconfig)
dotnet build
# fails with MSB3073, exit code 127, missing tailwindcss bin
Expected
Build succeeds without manual dep additions. Either:
- Add
@tailwindcss/cli to the template's package.json devDependencies (alongside @tailwindcss/vite).
- Switch the Tailwind build target to invoke
npx tailwindcss … so npm resolves the binary regardless of which package provides it.
- Move the Tailwind CSS compilation into the Vite pipeline (
@tailwindcss/vite plugin already does this) and remove the standalone tailwindcss CLI invocation from SimpleModule.Hosting.targets.
Option 1 is the smallest change. Option 3 is the cleanest long-term given that Tailwind v4 prefers the bundler-integrated path.
Workaround
Add to package.json devDependencies: "@tailwindcss/cli": "^4.2.2", then npm install.
Environment
sm --version: 0.0.36
dotnet --version: 10.0.201
tailwindcss installed: 4.2.4
@tailwindcss/cli available: yes (latest 4.2.4)
Related
#150 (also about npm-dep gaps in the template).
Summary
sm new project(CLI v0.0.36) generatespackage.jsonwithtailwindcss@^4.2.2and@tailwindcss/vite@^4.2.2as deps, but no@tailwindcss/cli. The Tailwind v4 packages no longer ship a standalone CLI intailwindcssitself — the CLI binary is provided by@tailwindcss/cli. So afternpm install,node_modules/.bin/tailwindcssdoes not exist.SimpleModule.Hosting.targetsthen runs"\$(RepoRoot)node_modules/.bin/tailwindcss" -i ... -o ... --minifyduringdotnet buildand fails:Net effect: a freshly-scaffolded project doesn't compile until you manually
npm install -D @tailwindcss/cli.Repro
Expected
Build succeeds without manual dep additions. Either:
@tailwindcss/clito the template'spackage.jsondevDependencies (alongside@tailwindcss/vite).npx tailwindcss …so npm resolves the binary regardless of which package provides it.@tailwindcss/viteplugin already does this) and remove the standalonetailwindcssCLI invocation fromSimpleModule.Hosting.targets.Option 1 is the smallest change. Option 3 is the cleanest long-term given that Tailwind v4 prefers the bundler-integrated path.
Workaround
Add to
package.jsondevDependencies:"@tailwindcss/cli": "^4.2.2", thennpm install.Environment
sm --version: 0.0.36dotnet --version: 10.0.201tailwindcssinstalled: 4.2.4@tailwindcss/cliavailable: yes (latest 4.2.4)Related
#150 (also about npm-dep gaps in the template).