Skip to content

[Bug]: @layer build error for non tailwind styling #410

@ralph-kudo

Description

@ralph-kudo

Please take a moment to familiarize yourself with this project scope and standards

Environment

- Operating System: `Darwin`
- Node Version:     `v24.1.0`
- Nuxt Version:     `4.1.3`
- CLI Version:      `3.29.3`
- Nitro Version:    `2.12.7`
- Package Manager:  `[email protected]`
- Builder:          `-`
- User Config:      `devtools`, `ssr`, `experimental`, `nitro`, `colorMode`, `ui`, `build`, `postcss`, `app`, `runtimeConfig`, `css`, `modules`, `googleFonts`, `googleSignIn`, `socialShare`, `tailwindcss`, `swiper`, `vite`, `components`, `router`, `image`, `hooks`, `routeRules`, `bugsnag`, `compatibilityDate`, `ogImage`, `robots`, `site`, `sitemap`, `schemaOrg`, `linkChecker`
- Runtime Modules:  `@storyblok/[email protected]`, `@pinia/[email protected]`, `[email protected]`, `[email protected]`, `@nuxtjs/[email protected]`, `@nuxt/[email protected]`, `@nuxtjs/[email protected]`, `[email protected]`, `@nuxt/[email protected]`, `@nuxtjs/[email protected]`, `@vueuse/[email protected]`, `@stefanobartoletti/[email protected]`, `@nuxt/[email protected]`, `[email protected]`, `@nuxt/test-utils/[email protected]`, `[email protected]`
- Build Modules:    `-`

Minimal reproduction link

Unable to provide at the moment

Describe the bug/issue

I recently upgraded from 1.2.1 to 2.1.0, however i am getting a

[nuxi 11:34:03 AM] ERROR Nuxt Build Error: [vite:css] [postcss] [redacted]/node_modules/@stefanobartoletti/nuxt-social-share/dist/runtime/SocialShare.vue?vue&type=style&index=0&lang.css:2:1: @layer components is used but no matching @tailwind components directive is present.

I use scss in my vue components. I reverted back for now and it's working fine.

Browsers

No response

Logs

[nuxi 11:34:03 AM]  ERROR  Nuxt Build Error: [vite:css] [postcss] /Users/[redacted]/node_modules/@stefanobartoletti/nuxt-social-share/dist/runtime/SocialShare.vue?vue&type=style&index=0&lang.css:2:1: @layer components is used but no matching @tailwind components directive is present.
file: /Users/[redacted]/node_modules/@stefanobartoletti/nuxt-social-share/dist/runtime/SocialShare.vue?vue&type=style&index=0&lang.css:2:0

    at Input.error (node_modules/postcss/lib/input.js:135:16)
    at AtRule.error (node_modules/postcss/lib/node.js:146:32)
    at normalizeTailwindDirectives (node_modules/tailwindcss/lib/lib/normalizeTailwindDirectives.js:72:32)
    at node_modules/tailwindcss/lib/processTailwindFeatures.js:29:98
    at plugins (node_modules/tailwindcss/lib/plugin.js:38:69)
    at LazyResult.runOnRoot (node_modules/postcss/lib/lazy-result.js:361:16)
    at LazyResult.runAsync (node_modules/postcss/lib/lazy-result.js:290:26)
    at LazyResult.async (node_modules/postcss/lib/lazy-result.js:192:30)
    at LazyResult.then (node_modules/postcss/lib/lazy-result.js:436:17)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions