Skip to content

error on interpreting @plugin in css file #17794

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

Open
stalexxx opened this issue Apr 26, 2025 · 2 comments
Open

error on interpreting @plugin in css file #17794

stalexxx opened this issue Apr 26, 2025 · 2 comments

Comments

@stalexxx
Copy link

stalexxx commented Apr 26, 2025

Phoenixframework with no nodejs
v4.0.9-4.1.4
tailwindcss-macos-arm64 binary from https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64

...
@plugin "../vendor/daisyui" {
  themes: false;
}

Then i am doing


❯ ./tailwindcss-macos-arm64 -v
...
≈ tailwindcss v4.1.4

Done in 514ms

❯ ./tailwindcss-macos-arm64 -i  ./assets/css/app.css  -o priv/static/assets/css/app.css
Error: The plugin "../vendor/daisyui" does not accept options

but

as soon as I am changing to

@plugin "../vendor/daisyui";

i am getting

❯ ./tailwindcss-macos-arm64 -i  ./assets/css/app.css  -o priv/static/assets/css/app.css
TypeError: handler is not a function. (In 'handler(pluginApi)', 'handler' is an instance of Object)

i made reproducing repo https://github.com/stalexxx/tailwind_plugin_case

That is wierd, cause i tried on different env (linux) and both are not reproducing

@stalexxx stalexxx changed the title @plugin in css file is wrong interpreted error on interpreting @plugin in css file Apr 26, 2025
@philipp-spiess
Copy link
Member

Hey there! I was trying to run this on my ARM mac and it seems fine (I have to comment out the heroicons plugin though since that is loading a dependency that isn't there):

Image

Are you on an Intel Mac?

@prem-prakash
Copy link

I could reproduce this error. Same phoenix version. Same tailwind version. Same Mac.

I did it by adding a package.json and package-lock.json to root folder. By removing them the error stops happening. I am using a tool that adds package.json and package-lock.json to the root of the project.

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

No branches or pull requests

3 participants