question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3.0.11 no longer gets postcss as a transitive dependency

See original GitHub issue

What version of Tailwind CSS are you using?

3.0.11

What build tool (or framework if it abstracts the build tool) are you using?

none

What version of Node.js are you using?

v17.0.1

What browser are you using?

N/A

What operating system are you using?

Windows

Reproduction URL

N/A

Describe your issue

Following the instructions at https://tailwindcss.com/docs/installation I installed tailwind and then tried to run npx tailwindcss init and received an error saying Error: Cannot find module 'postcss'.

This is due to postcss-js v4 no longer taking a direct dependency on postcss https://github.com/postcss/postcss-js/commit/034b00a9ae1db85f7b628d0195c931938ddcb718.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
xt0rtedcommented, Jan 5, 2022

I followed the Tailwind CLI steps which say to only install tailwindcss. After some more testing this looks to be an issue when using yarn but not when using npm.

Just learned that yarn doesn’t automatically install peer dependencies like npm (1, 2, 7+) does. Not sure how I haven’t hit this before, but that seems to be the cause here.

2reactions
sevenseacatcommented, Feb 8, 2022

I think this should be re-opened - I’ve just run into the exact same issue.

The documentation for Tailwind CLI (https://tailwindcss.com/docs/installation) only mentions installing tailwindcss, but postcss is also needed to run npx tailwind init (on the next line).

(Using NodeJS v16.13.2, Tailwind CSS 3.0.19, npm 8.1.2)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: PostCSS plugin tailwindcss requires PostCSS 8
I'm using Vue 3.0.7, which should have support for PostCSS 8, but I still get this error. My package-lock.json shows that the PostCSS...
Read more >
postcss-loader | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Dependencies | hlp | npm - Open Source Insights
arrow_right @babel/cli. 7.19.3 Notes Relation Licenses Dependencies 37 Version 7.19.3 Published Description arrow_right @babel/core. 7.20.5 Notes Relation Licenses Dependencies 51 Version 7.20.5 Published Description
Read more >
PostCSS API
If you create a node manually (e.g., with postcss.decl() ), that node will not have a source property and will be absent from...
Read more >
/CHANGELOG.md | lume@v1.14.1 | Deno
It's no longer needed to manually define the mergedKeys _data value. ... Updated dependencies: pagefind , std , terser , postcss-import , lightningcss ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found