Hi,
I’m setting up a React frontend to work with Payload CMS as the backend, and I’m trying to install Tailwind CSS (v4.1.11) for styling.
After running:
npm install -D tailwindcss postcss autoprefixer
I try to initialize the config files using:
npx tailwindcss init -p
But I get this error:
Error: could not determine executable to run
I’ve tried:
Deleting node_modules and package-lock.json
Reinstalling Tailwind and dependencies
Confirming tailwindcss is present in node_modules/.bin
Running directly: ./node_modules/.bin/tailwindcss init -p
Still facing the same issue.
My setup:
Node.js v20.19.2 via NVM
npm v10.8.2
Linux (Debian-based)
React project separate from Payload (not customizing the admin UI)
Any guidance would be appreciated!