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

Open
#996 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
nuxt, tailwindcss, typescript
Domain
frontend

Research direction

Start by reproducing the reported Nuxt 3 setup with @nuxtjs/tailwindcss 7.0.0-beta.0, using the dependency versions and Windows environment listed in the issue. Investigate the virtual .nuxt/tailwind.css failure to resolve tailwindcss; done means the project starts without the reported pre-transform error.

Written by the indexing model from the issue text.

Description

bug
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

Dominant language
TypeScript
Stars
1.9k
Forks
192
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nuxt-modules/tailwindcss

All issues in nuxt-modules/tailwindcss

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.