Nuxt 3 Tailwindcss Viewer errors

This issue has been tracked since 2022-11-09.

I run "npm run dev" and launch localhost:3000/_tailwind and I am getting a console error in Chrome Version 107.0.5304.106 (Official Build) (64-bit) that reads:

Uncaught SyntaxError: Unexpected token '<' (at chunk-vendors.d4b2e20c.js:1:1) app.487587de.js:1
Uncaught SyntaxError: Unexpected token '<' (at app.487587de.js:1:1)

And nothing happens, no tailwind viewer, nothing.

Version

"@nuxtjs/tailwindcss": "^6.1.3"
"nuxt": "3.0.0-rc.13",

Steps to reproduce

Fresh install from: npx nuxi init my-app
npm run dev

Here's my setup, I need original TailwindCSS for custom colors, etc.:

// npm run dev
Nuxi 3.0.0-rc.13
Nuxt 3.0.0-rc.13 with Nitro 0.6.1

Local: http://localhost:3000/
Network: http://192.168.1.8:3000/

i Using default Tailwind CSS file from runtime/tailwind.css
i Tailwind Viewer: http://localhost:3000/_tailwind/
i Vite client warmed up in 3334ms
v Nitro built in 1224 ms

Uncaught SyntaxError: Unexpected token '<' (at chunk-vendors.d4b2e20c.js:1:1) app.487587de.js:1
Uncaught SyntaxError: Unexpected token '<' (at app.487587de.js:1:1)

// package.json
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxtjs/tailwindcss": "^6.1.3",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.8",
"nuxt": "3.0.0-rc.13",
"tailwindcss": "^3.2.2"
}
}

// nuxt.config.ts
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss']
})

mlutsiuk wrote this answer on 2022-12-06

Also encountered this issue but only on disabled server side rendering (ssr: true in nuxt.config.ts)

More Details About Repo
Owner Name nuxt-modules
Repo Name tailwindcss
Full Name nuxt-modules/tailwindcss
Language TypeScript
Created Date 2019-04-04
Updated Date 2023-03-29
Star Count 1285
Watcher Count 12
Fork Count 157
Issue Count 57

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date