How To Fix Cannot Destructure Property 'nuxt' of 'this' as it is undefined.

Soefyan Syah
Soefyan Syah1 Apr 2023
CSSNuxtTailwindcss

When I try to run "npm run dev" nuxt got this error "Nuxt Fatal Error TypeError: Cannot destructure property 'nuxt' of 'this' as it is undefined".

How To Fix Cannot Destructure Property 'nuxt' of 'this' as it is undefined.
Photo by Sigmund on Unsplash

hai hai...

When I try to run "npm run dev" nuxt got this error "Nuxt Fatal Error TypeError: Cannot destructure property 'nuxt' of 'this' as it is undefined".

Solution

  1. First Solution

Add it to package.json and build it again

"resolutions": {
    "@nuxt/kit": "3.0.0-rc.13"
  }
  1. Second Solution

If the first solution still shows the same error you can't follow this script

go to -> nuxt.config.js -> replace this

'@nuxtjs/tailwindcss' 

with

'@nuxt/postcss8'.

I hope this can help you to fix a error .

Soefyan Syah

Written by Soefyan Syah

Hey there! I hope you find this post useful. If you have anything to say, questions or feedback, send me a tweet or an email.