GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [6.13] Duplicate plugins being loaded from `tailwind.config.ts` · Issue #949 · nuxt-modules/tailwindcss

[6.13] Duplicate plugins being loaded from tailwind.config.ts #949

New issue
Copy link
New issue
Copy link
Closed
Closed
[6.13] Duplicate plugins being loaded from tailwind.config.ts#949
Copy link
Assignees
ineshbose
Labels
bugSomething isn't working

Description

@reitowo
reitowo
opened on Feb 3, 2025
Issue body actions

Environment

  • Operating System: Darwin
  • Node Version: v20.18.1
  • Nuxt Version: 3.15.4
  • CLI Version: 3.21.1
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: app, modules, qrcode, nitro, components, extends, ssr, srcDir, postcss, css, primevue, ui, devtools, typescript, image, compatibilityDate
  • Runtime Modules: @primevue/[email protected], @nuxt/[email protected], @nuxt/[email protected], @vueuse/[email protected], @nuxt/[email protected], @pinia/[email protected], pinia-plugin-persistedstate/[email protected], [email protected], @nuxtjs/[email protected]
  • Build Modules: -

Reproduction

6.12.2 Works: https://stackblitz.com/edit/github-9r8kjuz1
6.13.1 Doesn't work: https://stackblitz.com/edit/github-9r8kjuz1-tuaijd5l

Describe the bug

I use tailwindcss-primeui, after upgrading to 6.13.1, the nuxt postcss warns ambigious name animate-duration-[450ms] and failed to process it.

Change the dep from 6.12.2 to 6.13.1 makes nuxt failed to process primevue tailwind utilities.

6.12.2 log:

ℹ Using default Tailwind CSS file                                                                nuxt:tailwindcss 17:25:24
  ➜ DevTools: press Shift + Alt + D in the browser (v1.7.0)                                                        17:25:30

ℹ Nuxt Icon server bundle mode is set to local                                                                    17:25:33
✔ Nuxt Icon discovered local-installed 1 collections: heroicons                                                   17:25:42
ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                                                   nuxt:tailwindcss 17:25:43
ℹ Compiled plugins.server.mjs in 2439.54ms                                                                        nuxt 17:25:48
ℹ Compiled plugins.client.mjs in 2515.88ms                                                                        nuxt 17:25:48
ℹ Compiled types/plugins.d.ts in 2538.41ms                                                                        nuxt 17:25:48

 ERROR  [uncaughtException] t._onTimeout is not a function                                                              17:25:52

    at https://github9r8kjuz1-3ufs.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:246:4692

ℹ Re-optimizing dependencies because vite config has changed                                                           17:25:53
✔ Vite client built in 3498ms                                                                                          17:25:54
✔ Vite server built in 8365ms                                                                                          17:26:02
✔ Nuxt Nitro server built in 16848 ms                                                                            nitro 17:26:21
ℹ Vite client warmed up in 4218ms                                                                                      17:26:26

6.13.1 log:

ℹ Using default Tailwind CSS file                                                                nuxt:tailwindcss 17:25:53
  ➜ DevTools: press Shift + Alt + D in the browser (v1.7.0)                                                        17:26:02


 WARN  Slow module @nuxt/devtools took 5285.74ms to setup.                                                         17:26:02

ℹ Nuxt Icon server bundle mode is set to local                                                                    17:26:05
ℹ Compiled plugins.server.mjs in 1288.14ms                                                                   nuxt 17:26:19
ℹ Compiled plugins.client.mjs in 1322.95ms                                                                   nuxt 17:26:19
ℹ Compiled types/plugins.d.ts in 1336.23ms                                                                   nuxt 17:26:19
ℹ Re-optimizing dependencies because lockfile has changed                                                         17:26:22
✔ Vite client built in 497ms                                                                                      17:26:22
✔ Vite server built in 11521ms                                                                                    17:26:34

 ERROR  [uncaughtException] t._onTimeout is not a function                                                         17:26:34

    at https://github9r8kjuz1tuaijd5l-wf3b.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:246:4692


 WARN                                                                                                              17:26:59


 WARN  warn - The class animate-duration-[450ms] is ambiguous and matches multiple utilities.                      17:26:59


[17:26:59]  WARN  warn - If this is content and not a class, replace it with animate-duration-[450ms] to silence this warning.


[17:26:59]  ERROR  Pre-transform error: [postcss] /home/projects/github-9r8kjuz1-tuaijd5l/assets/primevue/common.css:28:5: The animate-duration-[450ms] class does not exist. If animate-duration-[450ms] is a custom class, make sure it is defined within a @layer directive.
  Plugin: vite:css
  File: /home/projects/github-9r8kjuz1-tuaijd5l/assets/primevue/common.css:28:4
  26 |  
  27 |  .p-toggleable-content-leave-active {
  28 |      @apply overflow-hidden transition-[max-height] animate-duration-[450ms] ease-[cubic-bezier(0,1,0,1)];
     |      ^
  29 |  }
  30 |  

✔ Nuxt Nitro server built in 20053 ms                                                                       nitro 17:27:01
ℹ Vite client warmed up in 3425ms                                                                                 17:27:04

Activity

  1. reitowo
    added
    bugSomething isn't working
    on Feb 3, 2025
  2. reitowo
    changed the title [-]6.13.1 seems failed to work with tailwindcss-primeui[/-] [+]6.13.1 seems failed to work with plugin[/+] on Feb 3, 2025
  3. ineshbose commented on Feb 4, 2025

    @ineshbose
    ineshbose
    on Feb 4, 2025
    Collaborator
    More actions

    Thanks for opening an issue. I have a very similar project to this, and I noticed minor issues in the project setup..

    1. In assets/tailwind.css, you are importing ./primevue/tailwind after tailwindcss/utilities, but I think I would recommend to import all Tailwind utilities first; moreover, I also tend to use layers within my PrimeVue CSS files, eg. @import 'primevue/common' layer(components).
    2. I haven't made use of tailwindcss-primeui plugin, but it seems to support CJS for now, and you're using that in tailwind.config.ts -- not a big issue, but you could stick to using tailwind.config.cjs maybe.
    3. Most importantly where the issue lies is in nuxt.config. So you have Tailwind CSS imported in assets/tailwind.css while the module tends to look for assets/css/tailwind.css (mind the /css dir). You added ~/assets/tailwind to nuxt.options.css yourself, and that is fine, but it doesn't integrate with the module, so you had two conflicting installations of Tailwind. To fix this, either move tailwind.css into a css/ dir within the assets directory, and no need to add it in nuxt.config; or, within nuxt.config configure the module like so: tailwindcss: { cssPath: false } (for the module to not install another CSS file) or tailwindcss: { cssPath: '~/assets/tailwind.css' } (and remove from css[], for the module to install this into nuxt.options.css itself).

    Let me know how that goes. 😄

    Reacted by reito
  4. reitowo commented on Feb 7, 2025

    @reitowo
    reitowo
    on Feb 7, 2025
    Author
    More actions

    Sadly, it won't work.

    Comparing to 6.12.2 this line is also missing:

    ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                                                   nuxt:tailwindcss 17:25:43
    
  5. ineshbose commented on Feb 8, 2025

    @ineshbose
    ineshbose
    on Feb 8, 2025
    Collaborator
    More actions

    Sadly, it won't work.

    I'll need to know what you did and what issue came up; the issue was fixed with the suggestions I provided on my end! Could you update the Stackblitz?

    Comparing to 6.12.2 this line is also missing:

    ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                                                   nuxt:tailwindcss 17:25:43
    

    This is intentional; you can access the viewer in devtools. The URL is only logged when devtools are disabled or in Nuxt 2.

  6. reitowo commented on Feb 8, 2025

    @reitowo
    reitowo
    on Feb 8, 2025
    Author
    More actions

    However in same configuration that line is outputed in 6.12.2, so I suspect, unless something changed between 6.12.2 and 6.13.1, tailwind may noy loaded properly.

    I'll update that stackblitz later and post a new one here.

  7. reitowo commented on Feb 8, 2025

    @reitowo
    reitowo
    on Feb 8, 2025
    Author
    More actions

    Please take a look: https://stackblitz.com/edit/github-9r8kjuz1-n2rzo1ux

    Same code but 6.12.2 still works: https://stackblitz.com/edit/github-9r8kjuz1-ny3t4uah

  8. reitowo commented on Feb 8, 2025

    @reitowo
    reitowo
    on Feb 8, 2025
    Author
    More actions

    Also notice that this error message is 6.13.1 only, when editing tailwind.config.ts and trigger a reload:

    Image

    So, maybe something wrong with ts support between 6.12.2 - 6.13.1

  9. reitowo
    changed the title [-]6.13.1 seems failed to work with plugin[/-] [+]6.13.1 broke `tailwind.config.ts` support[/+] on Feb 8, 2025
  10. ineshbose commented on Feb 8, 2025

    @ineshbose
    ineshbose
    on Feb 8, 2025
    Collaborator
    More actions

    Ah OK I found the issue..

    It seems that your resolvedConfig loads two of the primeui plugins because of this:

    https://github.com/nuxt/ui/blob/f2d387622ae6bc8781d7893b74595f4030f14a78/src/tailwind.ts#L82

    I think I was aware of this code while working on 6.13, but didn't run into issues in my testing. I should provide a fix within this module in the next patch. Till then please stay on 6.12 🙏 sorry about this!

    Reacted by reito
  11. ineshbose
    changed the title [-]6.13.1 broke `tailwind.config.ts` support[/-] [+][6.13] Duplicate plugins being loaded from `tailwind.config.ts`[/+] on Feb 8, 2025
  12. reitowo commented on Feb 8, 2025

    @reitowo
    reitowo
    on Feb 8, 2025
    Author
    More actions

    No worries, thanks for debugging. Glad to find out what's wrong :)

  13. ineshbose
    self-assigned this
    on Mar 9, 2025
  14. ineshbose
    closed this as completedin f172e36on Mar 10, 2025
  15. ineshbose commented on Mar 10, 2025

    @ineshbose
    ineshbose
    on Mar 10, 2025
    Collaborator
    More actions

    Could you try nightly version please? 🙏

  16. reitowo commented on Mar 10, 2025

    @reitowo
    reitowo
    on Mar 10, 2025
    Author
    More actions

    Fix confirmed.

    Reacted by Inesh Bose
  17. dongnaebi commented on Mar 25, 2025

    @dongnaebi
    dongnaebi
    on Mar 25, 2025
    More actions

    Today, I upgraded from version 6.11.4 to the latest one and encountered this issue. I tried downgrading to 6.12.2, but that didn't work either. Only downgrading back to 6.11.4 allowed it to function properly.

    Here's my situation: Whenever I modify page content and trigger a hot update, I get an error: The color-title class does not exist. If color-title is a custom class, make sure it is defined within a @layer directive.

    My modules include:

    modules: [
        '@nuxt/devtools', // 2.3.1
        '@nuxtjs/device', // 3.2.4
        '@nuxt/eslint', //1.2.0
        '@nuxtjs/i18n', // 9.3.4
        'nuxt-gtag', // 3.0.2
        '@nuxtjs/google-fonts', // 3.2.0
        '@nuxtjs/seo', // 3.0.1
        'nuxt-auth-utils', // 0.5.17
        '@nuxthub/core', // 0.8.18
        '@nuxt/content', // 3.4.0
        'nuxt-time', // 1.0.3
        '@nuxtjs/tailwindcss',
        '@nuxtjs/color-mode' // 3.5.2
      ]
    
    Reacted by Neon
  18. mini-op commented on Mar 31, 2025

    @mini-op
    mini-op
    on Mar 31, 2025
    More actions

    I upgraded from 6.12.1 to 6.13.2 the I got The class is ambiguous and matches multiple utilities errors for icons
    when I downgraded back to 6.12.1 the issue still was there. then I downgraded to 6.11.4 based on the @dongnaebi issue it fixed it.

    I think that might an issue with a peer dep that has been updated recently

    Reacted by 東奈比
  19. cjpearson
    added a commit that references this issue on Apr 25, 2025

    fix(config): dedupe `tailwind.config` from configPaths, closes nuxt-m…

    This issue will close once commit f172e36 is merged into the 'main' branch.
    f172e36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ineshbose
    ineshbose

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.