1

I am trying to run css tailwind on my device and it works. But it shows me every time I create a tailwind CSS file.

[deprecation] Running tailwindcss without -i, please provide an input file.

I do not understand why?

4

3 Answers 3

3

With -cli@latest it should work just fine.

npx tailwindcss-cli@latest build css/tailwind.css -o build/main.css
Sign up to request clarification or add additional context in comments.

Comments

0

Accoridng to the latest Tailwind docs

The 'build' command has been replaced with '-i' as in this code.

"build-css": "npx tailwindcss-cli -i src/style.css -o style.css"

I tried it and it worked for me

Comments

-1

From tailwindcss docs https://tailwindcss.com/docs/installation#using-a-custom-css-file

/* ./src/tailwind.css */

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .btn {
    @apply px-4 py-2 bg-blue-600 text-white rounded;
  }
}

/* terminal */

npx tailwindcss -i ./src/tailwind.css -o ./dist/tailwind.css

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.