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

The container-queries plugin does not work in a Ruby on rails application #10606

Closed
aayestashn opened this issue Feb 16, 2023 · 1 comment
Closed
Assignees

Comments

@aayestashn
Copy link

What version of Tailwind CSS are you using?

v3.2.6

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

Ruby version: 3.1.2, Rails 7.0.4

What version of Node.js are you using?

N/A

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

N/A

Describe your issue

I am trying to include the container queries plugin in the tailwind.config.js file in a ruby on rails application.

  plugins: [
    require("@tailwindcss/forms"),
    require("@tailwindcss/aspect-ratio"),
    require("@tailwindcss/typography"),
    require("@tailwindcss/container-queries"),
  ],

When I run the command: bin/dev the following error messages appear:

18:28:42 css.1     | Error: Cannot find module '@tailwindcss/container-queries'
18:28:42 css.1     | Require stack:
18:28:42 css.1     | - /Users/astorayestas/work/eel-backend/config/tailwind.config.js
18:28:42 css.1     | - /snapshot/tailwindcss/lib/cli/build/plugin.js
18:28:42 css.1     | - /snapshot/tailwindcss/lib/cli/build/index.js
18:28:42 css.1     | - /snapshot/tailwindcss/lib/cli.js
18:28:42 css.1     | - /snapshot/tailwindcss/standalone-cli/standalone.js
18:28:42 css.1     | 1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
18:28:42 css.1     |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
18:28:42 css.1     |     at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)
18:28:42 css.1     |     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
18:28:42 css.1     |     at Module.require (node:internal/modules/cjs/loader:1005:19)
18:28:42 css.1     |     at Module.require (pkg/prelude/bootstrap.js:1855:31)
18:28:42 css.1     |     at Module.require (/snapshot/tailwindcss/standalone-cli/standalone.js:25:22)
18:28:42 css.1     |     at require (node:internal/modules/cjs/helpers:102:18)
18:28:42 css.1     |     at Object.<anonymous> (/Users/astorayestas/work/eel-backend/config/tailwind.config.js:77:5)
18:28:42 css.1     |     at Module._compile (node:internal/modules/cjs/loader:1105:14)
18:28:42 css.1     |     at Module._compile (pkg/prelude/bootstrap.js:1894:32) {
18:28:42 css.1     |   code: 'MODULE_NOT_FOUND',
18:28:42 css.1     |   requireStack: [
18:28:42 css.1     |     '/Users/astorayestas/work/eel-backend/config/tailwind.config.js',
18:28:42 css.1     |     '/snapshot/tailwindcss/lib/cli/build/plugin.js',
18:28:42 css.1     |     '/snapshot/tailwindcss/lib/cli/build/index.js',
18:28:42 css.1     |     '/snapshot/tailwindcss/lib/cli.js',
18:28:42 css.1     |     '/snapshot/tailwindcss/standalone-cli/standalone.js'
18:28:42 css.1     |   ],
18:28:42 css.1     |   pkg: true
18:28:42 css.1     | }

Ruby version: 3.1.2
Rails 7.0.4
The application was created with this instruction: rails new my-app --css tailwind.
Does the tailwindcss standalone-cli include the container query plugin?

@reinink reinink self-assigned this Feb 17, 2023
@reinink
Copy link
Member

reinink commented Feb 17, 2023

Hey! So the standalone builds should definitely include the container queries plugin. I actually added this last November: #9865

I just downloaded the v3.2.6 standalone build for MacOS (tailwindcss-macos-arm64) and was able to add the container queries plugin without any issues.

I've also setup a new Rails project with Tailwind enabled and was able to use the container queries plugin there as well.

So from what I can tell, everything looks right 😅

If you'd like to provide a minimum reproduction as a Git repo I'd be happy to have a closer look!

@reinink reinink closed this as completed Feb 17, 2023
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

2 participants