-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handling for missing tailwindcss executable #530
Conversation
Added a9336a1 because the error message is (imo) better. Before:
after
Or do folks have a better idea? cc @hiredman. |
"--output" tw-output | ||
"--minify") | ||
(catch java.io.IOException _ | ||
(throw (Exception. "Clerk could not find the `tailwindcss` executable. Please install it using `npm install -D tailwindcss` and try again."))))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The install hint in the error is actually not correct which is why I didn't merge it. We currently only rely on the standalone tailwindcss
executable, so installing it via npm install -D tailwindcss
won't work (we'd need to call it via npx then). Do we want to support both installation methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, maybe relying on the standalone executable was a mistake (see also https://github.com/nextjournal/clerk/blob/d80187013d7b7b96db3d8b114b8d99f687170668/.github/workflows/main.yml#L201-L200).
Maybe we could probe the exit code of npx tailwindcss
and then fallback to tailwindcss
for legacy projects?
Actually we need npm install -D tailwindcss @tailwindcss/typography
with our config.
Fixes #507.