Skip to content
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

tailwindcss cli throws #2814

Closed
PutziSan opened this issue Nov 19, 2020 · 8 comments
Closed

tailwindcss cli throws #2814

PutziSan opened this issue Nov 19, 2020 · 8 comments

Comments

@PutziSan
Copy link

Describe the problem:

Cannot find module 'autoprefixer'

image

Link to a minimal reproduction:

mkdir tmp-tester-tailwind
cd tmp-tester-tailwind
npx tailwindcss build -o tailwind.css

I am using windows 10.

@stuki
Copy link

stuki commented Nov 19, 2020

MacOS 10.15.7, Same thing happens to me

@adamwathan
Copy link
Member

Ah crap we know about this but forgot. I'll fix! In the mean time:

npx -p autoprefixer postcss -c "tailwindcss build -o tailwind.css"

Ugly right? We'll make it better soon, sorry!

@ericholdridge
Copy link

Describe the problem:

Cannot find module 'autoprefixer'

image

Link to a minimal reproduction:

mkdir tmp-tester-tailwind
cd tmp-tester-tailwind
npx tailwindcss build -o tailwind.css

I am using windows 10.

Did you get this working?

@SamuelMS
Copy link

npx -p autoprefixer postcss -c "tailwindcss build -o tailwind.css"

@adamwathan I just get npx: command not found: postcss with this now.

@badguybluebane
Copy link

Same here. Just when in try to npx tailwind init

@adamwathan
Copy link
Member

Forgot a -p sorry:

npx -p autoprefixer -p postcss -c "tailwindcss build -o tailwind.css"

@pikeas
Copy link

pikeas commented Nov 21, 2020

Also seeing a warning from yarn:

warning " > tailwindcss@2.0.1" has unmet peer dependency "autoprefixer@^10.0.2".

I'm using Next.js, updating to TW 2.0 went smoothly but did require a small additional step of adding PostCSS and autoprefixer to package.json as explicit devDependencies.

Phenomenal upgrade guide overall, one of the best I've ever seen!

@RobinMalfait
Copy link
Contributor

Hey!

We've fixed this with a cleaner tailwind-cli for npx:

npx tailwindcss-cli@latest build -o tailwind.css

More information: https://tailwindcss.com/docs/installation#using-tailwind-without-post-css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants