Description
What version of Tailwind CSS are you using?
v4.0.17
What build tool (or framework if it abstracts the build tool) are you using?
vite 6.2.0
What version of Node.js are you using?
v20.18.2
What browser are you using?
Chromium 128.0.6613.137
What operating system are you using?
OpenBSD/adJ 7.6
Reproduction URL
https://github.com/vtamara/minvt4
Cloning and running
% npm install
% npm run dev
will present the problem on OpenBSD/adJ 7.6.
Describe your issue
The steps to reproduce the problem from scratch on an OpenBSD/adJ 7.6 are:
% npm create vite@latest minvt4 -- --template react
% cd minvt4
Editing package.json
to add:
"overrides": {
"rollup": "npm:@rollup/wasm-node"
}
Then starting the development server with
% npm install
% npm run dev
And opening in a browser http://localhost:5173/ will work:
After we stop the server and add tailwindcss
by following the instructions of https://tailwindcss.com/docs/installation/using-vite
% npm add tailwindcss @tailwindcss/vite
Then we edit vite.config.js
to make it:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [
react(),
tailwindcss(),
],
})
Then we add at the beginning of src/index.css
:
@import "tailwindcss";
And finally running with npm run dev
and trying to open http://localhost will produce the error:
failed to load config from /home/vtamara/comp/tailwindcss/minv/vite.config.js
error when starting dev server:
Error: Unsupported OS: openbsd, architecture: x64
at Object.<anonymous> (/home/vtamara/comp/tailwindcss/minv/node_modules/@tailwindcss/oxide/index.js:303:11)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
...
We experienced the same problem with tailwindcss v4 in a new project with next.js, we wrote the steps to reproduce it at https://github.com/vtamara/tailwindcss/wiki/Problem-with-tailwind-4-on-adJ-OpenBSD
There we also described a workaround by downgrading to tailwindcss v3.