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

Error: Cannot find module 'tailwindcss/nesting' when providing postcss config #440

Open
rachelgraves opened this issue Nov 27, 2024 · 2 comments

Comments

@rachelgraves
Copy link

rachelgraves commented Nov 27, 2024

Greetings! I am trying to use postcss with tailwindcss-rails so that I can take advantage of nesting. When I follow the instructions in the readme and add the following in config/postcss.config.js I get the error:

Error: Cannot find module 'tailwindcss/nesting'
Require stack:
| - config/postcss.config.js
| - /snapshot/tailwindcss/node_modules/lilconfig/dist/index.js
| - /snapshot/tailwindcss/lib/cli/build/plugin.js
| - /snapshot/tailwindcss/lib/cli/build/index.js
| - /snapshot/tailwindcss/lib/cli/index.js
| - /snapshot/tailwindcss/lib/cli.js
| - /snapshot/tailwindcss/standalone-cli/standalone.js

Rails 7.2 using Propshaft, ruby 3.3.5

@flavorjones
Copy link
Member

@rachelgraves Sorry you're having a problem. Can you share the contents of your postcss.config.js file, and also share what command you're running and the full output?

@ahmeij tagging you in case you have any ideas here (since you wrote the postcss docs).

@ahmeij
Copy link
Contributor

ahmeij commented Nov 28, 2024

Hi, can you provide the used version of tailwindcss-ruby (used by tailwindcss-rails) and tailwindcss-rails itself? (next to the contents for the postcss config file).

Thanks

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

3 participants