Skip to content

I encountered an error while setting up Tailwind CSS in a Nuxt 3 environment. #996

@DarkSKL

Description

@DarkSKL

Environment

Working directory: X:/Demo/Nuxt3/Financial nuxi 15:24:43
Nuxt project info: (copied to clipboard) nuxi 15:24:43


  • Operating System: Windows_NT
  • Node Version: v20.11.1
  • Nuxt Version: 3.17.4
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.12
  • Package Manager: pnpm@9.12.3
  • Builder: -
  • User Config: compatibilityDate, devtools, modules
  • Runtime Modules: @element-plus/nuxt@1.1.2, @nuxtjs/tailwindcss@7.0.0-beta.0
  • Build Modules: -

"dependencies": {
"@nuxtjs/tailwindcss": "7.0.0-beta.0",
"nuxt": "^3.17.4",
"vue": "^3.5.16",
"vue-router": "^4.5.1"
}

Reproduction

No response

Describe the bug

I got an error when trying to install/configure Tailwind CSS in my Nuxt 3 project. Here’s the error message: ERROR Pre-transform error: Can't resolve 'tailwindcss' in 'X:\Demo\Nuxt3\Financial' 15:19:00
Plugin: @tailwindcss/vite:generate:serve
File: virtual:nuxt:X%3A%2FDemo%2FNuxt3%2FFinancial%2F.nuxt%2Ftailwind.css

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions