nuxt-modules/tailwindcss

Cannot start nuxt: Cannot find module 'postcss-custom-properties'

ericvdberge opened this issue · 5 comments

Environment


  • Operating System: Windows_NT
  • Node Version: v18.20.0
  • Nuxt Version: 3.12.2
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: pnpm@9.4.0
  • Builder: -
  • User Config: devtools, modules, future, srcDir, imports
  • Runtime Modules: @nuxtjs/tailwindcss@6.12.0
  • Build Modules: -

Reproduction

Create a new nuxt project, add tailwindcss module and start dev

npx nuxi@latest init <projectname>
npx nuxi@latest module add tailwindcss
pnpm run dev

Describe the bug

I created a new Nuxt v3.12 (latest) project.
After using your docs, I added your module and restarted my Nuxt app.
I tried to create a new Nuxt project multiple times, but i get the following error: Cannot start nuxt: Cannot find module 'postcss-custom-properties'

I can install the package manually and then everything works, but this seems to be a bug in this package.

Additional context

No response

Logs

No response

Hi, thanks for opening an issue on this repository. This is a previous related issue: #576 which was believed to be fixed for the versions at the time; however, following #835 the plugin was removed and kept to be added on users' requirements. Are you able to replicate or possibly help pin-point where/why this plugin may be being used? (Possibly another PostCSS plugin using it)

@ineshbose, I tried to pinpoint this issue some more and I can at least mention that changing the version from '@nuxtjs/tailwindcss' from '6.12.0' back to '16.11.4' resolved the issue, so I think this issue is at least created in your last version. I will try to pinpoint where it is used, but that takes some more time.

@ineshbose, I downloaded the 6.12.0 source code from the github releases tab. I did a pnpm install to see if I could spot any postcss-custom-properties dependencies that were needed from your package. as you can see in the image below does postcss (a package that you depend on) still need to postcss-custom-properties dependency. I do not know what is going on exactly, but it looks like you are indirectly depending on this package without adding it as a dependency to your package json. This explains the error that I am getting after installing this package.
image

Many thanks for investigating ❤️

Those dependencies seem to be for the repository's Nuxt 2 playground/fixtures, I would still think that PNPM would also resolve this if required. 🤔

You would think so, but I only have this problem with this version of the plugin. It looks that there still is a sub-dependency on this package that is not resolved.