0

This is the error message I get:

warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.

I can't figure out why I get this error with tailwind. Here is a very good explanation what the error is about. I checked all my paths and can't find my mistake. I assume that one path is wrong.

My code can be found here.

tailwind.config.js links to "./index.html", which is in the root folder.

buleva
  • 99
  • 7

1 Answers1

1

It seems like you may be running Tailwind CSS CLI from the tailwindcss folder, as in:

cd tailwindcss
npx tailwindcss -i input.css -o output.css

In which case, ./index.html would mean the file tailwindcss/index.html which does not exist and thus the warning from the CLI.

You could consider changing the path to ../index.html if you would like to continue to initiate the tailwindcss command from within the tailwindcss folder.

Alternatively, you could run Tailwind CSS CLI from the root of the project:

npx tailwindcss -c tailwindcss/tailwind.config.js -i tailwindcss/input.css -o tailwindcss/output.css
Wongjn
  • 8,544
  • 2
  • 8
  • 24