@nuxtjs/tailwindcss: 5.3.3
nuxt: 2.15.8
platform: Windows 11.
https://github.com/PawFV/platform-portal
yarn install && yarn dev
Project should start in development mode
FATAL Cannot destructure property 'nuxt' of 'this' as it is undefined. 11:14:20
at postcss8Module (node_modules\@nuxt\postcss8\dist\index.js:16:10)
at installModule (/C:/Users/paujo/platform-portal/node_modules/@nuxt/kit/dist/index.mjs:416:9)
at async setup (/C:/Users/paujo/platform-portal/node_modules/@nuxtjs/tailwindcss/dist/module.mjs:186:7)
at async ModuleContainer.normalizedModule (/C:/Users/paujo/platform-portal/node_modules/@nuxt/kit/dist/index.mjs:167:5)
at async ModuleContainer.addModule (node_modules\@nuxt\core\dist\core.js:239:20)
at async ModuleContainer.ready (node_modules\@nuxt\core\dist\core.js:51:7)
at async Nuxt._init (node_modules\@nuxt\core\dist\core.js:478:5)
╭─────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
╰─────────────────────────────────────────────────────────────────────────────────╯
error Command failed with exit code 1.
relevant issue in nuxt/framework: nuxt/nuxt#15489
Same issue with:
@nuxtjs/tailwindcss: 5.3.5
nuxt: 2.15.8
platform: Mac (M1)
As pointed by a coworker, this line in @nuxt/postcss8/dist/index...:
const {nuxt} = this;
...crashes due to "this" being undefined:
Nuxt Fatal Error
TypeError: Cannot destructure property 'nuxt' of 'this' as it is undefined.
The crash is not in Tailwind itself, but coming from a dependency. And not happening in previous verisons of Tailwind.
temporarily solved by using overrides
property.
npm version >= 8.3
// package.json
...
"overrides": {
"@nuxtjs/tailwindcss": {
"@nuxt/kit": "3.0.0-rc.13"
}
},
...
> npm list @nuxt/kit
└─┬ @nuxtjs/[email protected]
└── @nuxt/[email protected] overridden
I have this Issue using v5.3.2 with [email protected] @danielroe
My solution for now:
Downgrade to version 4.2.1.
yarn add @nuxtjs/[email protected]
good idea
By this action you will downgrade to tailwind v2, and it may cause some error, as it did in my project.
My solution for now:
Downgrade to version 4.2.1.
yarn add @nuxtjs/[email protected]
It works for me:
My solution for now:
Downgrade to version 4.2.1.
yarn add @nuxtjs/[email protected]
This is the only workaround working for me too.
This is workaround and works, but this is not a solution.
"overrides"
is easy to setup in when you have access to package.json, but what about libraries that use nuxt/tailwind module as dependency ? There is no way to setup overrides
.
Even if we force "@nuxt/kit": "3.0.0-rc.13"
as dependency in the library.
According to the documentation this module should works with nuxt2, but the problem is still there.
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 |
Issue Title | Created Date | Updated Date |
---|