Home
Support Forums

Tailwindcss: not found

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.

Hi there,

I am trying to deploy a static HTML page developed using tailwindcss. app name is musing-ramanujan-10c145

build is failing with error message tailwindcss: not found

I have tailwindcss as my dependency in package.json what possible reason I will be getting this error? Is there a way to sh to the machine so that I can do dev debug stuff?

Thank you

Hi @backenbee

Are you able to share the repository you are deploying from, and the latest deploy log?

4:52:40 PM: ❯ Version
4:52:40 PM: @netlify/build 25.0.1
4:52:40 PM: ​
4:52:40 PM: ❯ Flags
4:52:40 PM: baseRelDir: true
4:52:40 PM: buildId: 61bbb51df3249c0b02235509
4:52:40 PM: deployId: 61bbb51df3249c0b0223550b
4:52:41 PM: ​
4:52:41 PM: ❯ Current directory
4:52:41 PM: /opt/build/repo/public
4:52:41 PM: ​
4:52:41 PM: ❯ Config file
4:52:41 PM: No config file was defined: using default values.
4:52:41 PM: ​
4:52:41 PM: ❯ Context
4:52:41 PM: production
4:52:41 PM: ​
4:52:41 PM: ────────────────────────────────────────────────────────────────
4:52:41 PM: 1. Build command from Netlify app
4:52:41 PM: ────────────────────────────────────────────────────────────────
4:52:41 PM: ​
4:52:41 PM: $ npm run twbuild
4:52:42 PM: > tailwind-tutorial@1.0.0 twbuild
4:52:42 PM: > tailwindcss build -i src/main.css -o public/styles.css
4:52:42 PM: sh: 1: tailwindcss: not found
4:52:42 PM: ​
4:52:42 PM: ────────────────────────────────────────────────────────────────
4:52:42 PM: “build.command” failed
4:52:42 PM: ────────────────────────────────────────────────────────────────
4:52:42 PM: ​
4:52:42 PM: Error message
4:52:42 PM: Command failed with exit code 127: npm run twbuild
4:52:42 PM: ​
4:52:42 PM: Error location
4:52:42 PM: In Build command from Netlify app:
4:52:42 PM: npm run twbuild
4:52:42 PM: ​
4:52:42 PM: Resolved config
4:52:42 PM: build:
4:52:42 PM: base: /opt/build/repo/public
4:52:42 PM: command: npm run twbuild
4:52:42 PM: commandOrigin: ui
4:52:42 PM: publish: /opt/build/repo/public
4:52:42 PM: publishOrigin: default
4:52:42 PM: Caching artifacts
4:52:42 PM: Started saving build plugins
4:52:42 PM: Finished saving build plugins
4:52:42 PM: Started saving pip cache
4:52:42 PM: Finished saving pip cache
4:52:42 PM: Started saving emacs cask dependencies
4:52:42 PM: Finished saving emacs cask dependencies
4:52:42 PM: Started saving maven dependencies
4:52:42 PM: Finished saving maven dependencies
4:52:42 PM: Started saving boot dependencies
4:52:42 PM: Finished saving boot dependencies
4:52:42 PM: Started saving rust rustup cache
4:52:42 PM: Finished saving rust rustup cache
4:52:42 PM: Started saving go dependencies
4:52:42 PM: Finished saving go dependencies
4:52:45 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:52:45 PM: Creating deploy upload records
4:52:45 PM: Failing build: Failed to build site
4:52:45 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
4:52:45 PM: Finished processing build request in 14.061779605s

I have index.html is in /public hence base directory is set to public

Is there a package.json in public? I am guessing (without seeing the repository you are deploying from) that the package.json is in the root of the repository. Therefore, the base directory is not public, but rather the repository root and base directory should have no value set.

yes changing base dir , successfully installed but now it doesn’t find index.html…

Did you set the publish directory?

Your site https://musing-ramanujan-10c145.netlify.app/ appears to work now so perhaps you did.