#Tailwind 4.x + React Setup Fails: npx tailwindcss init -p ➜ "could not determine executable to run"

6 messages · Page 1 of 1 (latest)

delicate silo
#

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!

coral rockBOT
tropic fulcrum
#

I went through and followed these installation instructions from scratch the other week and updated the guide accordingly—give that a shot and let me know if you get stuck still

delicate silo
# tropic fulcrum Hey <@1297855122310955100> with tailwind 4 and up it's no longer necessary to ru...

Hey @tropic fulcrum , I have followed and successfully installed tailwind but having an issue in the color editing part.

I have created a custom component but having an issue in the color affect in the UI.

`import React from 'react'

const BeforeLogin: React.FC = () => {
return (
<div className='p-4 border-4 border-solid border-red-600'>
<p>
<b>Welcome to your dashboard!</b>
{' This is where site admins will log in to manage your website.'}
</p>
</div>
)
}

export default BeforeLogin`

delicate silo
#

solved the issues. Thanks.