I encountered an error while setting up Tailwind CSS in a Nuxt 3 environment.
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: [email protected]
- Builder: -
- User Config: compatibilityDate, devtools, modules
- Runtime Modules: @element-plus/[email protected], @nuxtjs/[email protected]
- 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