Tailwind CSS No Utility Classes Were Found


Trying to get Tailwind to work via CLI instructions here. I’ve got a (simplified) file structure of


I’ve followed the installation docs and a video on YouTube to try get it to work but when I set up tailwind.config.js with this :

module.exports = {
  content: [
  theme: {
    extend: {},
  plugins: [],

and try a simple test using Tailwind classes on index/index.pug like this :

extends ../index/layout

block content

    | Hello world!

and run npx tailwindcss -i ./public/stylesheets/tailwind.css -o ./public/stylesheets/styles.css --watch

I’m just getting a completely unformatted H1 on the frontend and a terminal warning of warn - No utility classes were detected in your source files. If this is unexpected, double-check the content option in your Tailwind CSS configuration.. What am I doing wrong?


In your Tailwind config file, your template path is listed as '/views/**/*.pug'.

The specified path starts at the root of your filesystem and not relative to the folder you’re running the command from.

Update the path to './views/**/*.pug'

Answered By – Nathan Dawson

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.