Tailwindcss-module: Tailwind Viewer doesn't work in 4.0.0/4.0.1

Created on 16 Mar 2021  路  4Comments  路  Source: nuxt-community/tailwindcss-module

Version

@nuxtjs/tailwindcss: 4.0.1
nuxt: 2.15.3
node: 14.15.4
npm: 7.5.4

Reproduction Link

N/A

Steps to reproduce

Create a fresh Nuxt project with version 2.15.3 (I used npm init nuxt-app nuxt-tailwind2-test). Then follow steps from https://tailwindcss.nuxtjs.org/setup to install TailwindCSS

What is Expected?

Running npm run dev should start the tailwind viewer at http://localhost:3000/_tailwind/

What is actually happening?

I'm getting the error message Cannot find module 'tailwindcss/resolveConfig' when running npm run dev. Tailwind CSS compilation and Nuxt dev server works though.

Bildschirmfoto 2021-03-16 um 11 33 27

The error doesn't appear if I set viewer: false for tailwind in the nuxt.config.js

bug

Most helpful comment

Can you tell that when running npm install tailwindcss it works?

All 4 comments

Update:
This seems to have something to do with npm. I saw that the sandbox was using yarn and I couldn't reproduce the error there. Tried using yarn on my local machine and it worked there as well.

@Atinux: Would you generally advise against using nuxt with npm? I see in the nuxt docs that yarn is the "first class citizen" shown for the guides and I'm wondering if this is just a matter of taste or if you would advise me to run existing and new nuxt projects with yarn.

Can you tell that when running npm install tailwindcss it works?

Can you tell that when running npm install tailwindcss it works?

Yes, then it works. 馃憤馃徎

@pi0 Your fix is merged in v1.5.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acidjazz picture acidjazz  路  3Comments

stevenho0811 picture stevenho0811  路  3Comments

Yee1014 picture Yee1014  路  5Comments

TNortnern picture TNortnern  路  9Comments

duthanhduoc picture duthanhduoc  路  7Comments