tailwindcss: Cannot start nuxt: Cannot read properties of undefined (reading 'push')
Version
- Operating System:
Darwin - Node Version:
v16.15.0 - Nuxt Version:
3.0.0-rc.1-27525381.1f8e3e2 - Package Manager:
yarn@1.9.2 - Builder:
vite - User Config:
typescript,publicRuntimeConfig,privateRuntimeConfig,css,buildModules,build - Runtime Modules:
- - Build Modules:
@nuxtjs/tailwindcss@5.0.4,@vueuse/nuxt@7.7.1,@nuxtjs/partytown@1.1.2
Steps to reproduce
i do yarn upgrade-interactive and upgrade @nuxtjs/tailwindcss@5.0.4 to @nuxtjs/tailwindcss@5.1.2
and then do yarn dev but it can not start
it shows Cannot start nuxt: Cannot read properties of undefined (reading 'push')
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 24
- Comments: 32 (1 by maintainers)
Commits related to this issue
- Update nuxt.config.js https://github.com/nuxt-community/tailwindcss-module/issues/480#issuecomment-1138276828 — committed to vlemoine/shadesof.blue by vlemoine 2 years ago
- Update nuxt.config.js https://github.com/nuxt-community/tailwindcss-module/issues/480#issuecomment-1138276828 — committed to vlemoine/shadesof.blue by vlemoine 2 years ago
also, adding an empty array named devServerHandlers to nuxt.config file will solve the issue.
devServerHandlers: [],I had this error after upgrading nuxt3 to RC 13. I manually updated @nuxt/tailwindcss from 6.1.1 to 6.1.3 and it fixed it.
Adding
devServerHandlers: []tonuxt.config.tsdid not fix this for me. This was working yesterday, and I just booted my project up today to find it no longer working 😕This issue is not related to
nuxt-community/tailwindcss-modulemodule itself. It’s error in@nuxt/kitimplementation. They missed type safe assignment. I was able to get rid of this issue by making this patch@pi0 I’ve got the same error when upgrade from 5.0.4 to 5.1.2 on both Nuxt2 and Nuxt3, here’s a stack trace of this error.
On Nuxt2
On Nuxt3
This also happened when fresh install the module as well.
Combination of
nuxt 3.0.0with@nuxtjs/tailwindcss 6.xfixed problem for me.This did the trick for me.
This work!! Thank youuuuuuuuu
This is the exact solution.
"nuxt": "3.0.0-rc.13""@nuxtjs/tailwindcss": "^6.1.3",Leaving this here for anyone else that may need it;
Thanks @yulafezmesi for the workaround
Be sure to use
nuxt ^3.0.0andnuxtjs/tailwindcss ^6.1.3, also, follow the official installation guide: https://tailwindcss.com/docs/guides/nuxtjs#3The same issue still exists, I solved it by downgrading to v5.0.0 the issue appears after v5.0.0, So I assume all the >= v5.0.1 and v5.1.x will have the same issue. Not to fall behind with the changes I will accept changes from ^5.2.x which is not available yet and hopefully, it will be fixed by then.
"devDependencies": { ...., "@nuxtjs/tailwindcss": "5.0.0||^5.2.x", ...., },Downgraded from edge channel (rc-13) to rc-12, this fixed it for me
I have tried that, it caused other issues.
Im experiencing the same problem, have setted up this reproductions
devServerHandlersis nitro’s option used for register server routes on dev mode which@nuxtjs/tailwindcssgenerated via tailwind viewer.src/module.ts from module’s repo
But for some reason,
addDevServerHandler()give an error (unless you use nuxt-3.0.0-rc.3) because ofdevServerHandlersis not an Array. So we have to adddevServerHandlers: []to fix this.