[Vuejs]-Nuxt Fatal Error TypeError: Cannot destructure property 'nuxt' of 'this' as it is undefined. Nuxt Js

0👍

Solve this problem with these steps:

  1. Install the development dependencies again as instructed in the tailwind documentation

  2. Remove ‘@nuxtjs/tailwindcss’ and add ‘@nuxt/postcss8’ to nuxt.config.js

  3. Configure the nuxt.config.js build property by adding

build: {
    postcss: {
      plugins: {
        tailwindcss: {},
        autoprefixer: {},
      },
    },
},

Reference: https://tailwindcss.com/docs/guides/nuxtjs

0👍

I get a project from github and I had the same problem. I solved this problem adding code below to "package.json" file :

"resolutions": {
"@nuxt/kit": "3.0.0-rc.13"

}

and next I enter this below command:

npm add nuxt

and at the last part I use this command :

npm run dev

but I am not sure about you. maybe it usefull for others.
thanks.

Leave a comment