npx tailwindcss init not working
See original GitHub issueDescribe the problem:
Using tailwind in post-css compatibility mode
I’ve got tailwind 2.0 installed and the build process runs, however now I want to set up a config file so I can add custom colors etcetera. I run the npx tailwindcss init command and it fails with this output.
λ npx tailwindcss init
npx: installed 86 in 8.321s
Cannot find module 'autoprefixer'
I can see autoprefix in both package.json "autoprefixer": "^9.8.6", and the autoprefixer folder in the node_modules folder.
Not sure how to resolve this, please advise.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:20
- Comments:48 (5 by maintainers)
Top Results From Across the Web
Issues installing Tailwindcss, specifically with "npx tailwindcss ...
Step : 2 Not working above step : 1 then try this command : npx tailwindcss-cli@latest init -p . Share.
Read more >Installation - Tailwind CSS
The simplest and fastest way to get up and running with Tailwind CSS from scratch is with the Tailwind CLI tool.
Read more >How to set up Tailwind CSS 2.0?
Run the following command to create the tailwind config file. npx tailwindcss init. This command creates a file in the root directory named...
Read more >Install and configure Tailwind CSS | oneweekgraphql.com
config.js where we can customize the config for the newly installed dependencies. Inside the terminal, run the following: npx tailwindcss init - ...
Read more >tailwindcss | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had trouble generating the configuration file while using the compatibility package. I updated my tailwindcss, postcss, and autoprefixer packages to the latest versions and this allowed me to generate a configuration successfully. I then downgraded my packages back to the compatibility versions.
This worked for me. Hacky but it worked