vue.js create-nuxt-app v5.0.0 + Tailwind用户界面错误-致命无法解构“this”的属性“nuxt”,因为它未定义

dfty9e19  于 2023-03-19  发布在  Vue.js
关注(0)|答案(1)|浏览(193)

我无法得到create-nuxt-app v5.0.0与顺风运行。
我已经采取的步骤:
我尝试通过NVM安装节点v 18.15.0
我尝试添加“@nuxt/kit”:“3.2.3”,添加到包. json
我试过“覆盖”:{“@nuxt/套件”:“3.0.0-rc.12“},
我试过“决心”:{“@nuxt/套件”:“第3.2.3节”},
我手动安装了顺风

yarn run v1.22.19
$ nuxt

 WARN  The dependency stylelint not found. Please run yarn add stylelint --dev or npm install stylelint --save-dev

ℹ Using default Tailwind CSS file from runtime/tailwind.css  nuxt:tailwindcss 15:06:00

 FATAL  Cannot destructure property 'nuxt' of 'this' as it is undefined.      15:06:00

  at postcss8Module (node_modules/@nuxt/postcss8/dist/index.js:15:10)
  at installModule (node_modules/@nuxt/kit/dist/index.mjs:451:21)
  at async setup (node_modules/@nuxtjs/tailwindcss/dist/module.mjs:186:7)
  at async ModuleContainer.normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:169:17)
  at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:167:20)
  at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:34:7)
  at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:342:5)

  ✖ Nuxt Fatal Error                                                 
                                                                         
      TypeError: Cannot destructure property 'nuxt' of 'this' as it is   
     undefined. 

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yh2wf1be

yh2wf1be1#

我确实得到了create-nuxt-app v5.0.0的工作。
对我来说,关键是不要在命令行中初始安装create-nuxt-app的过程中安装Tailwind,而是按照以下说明操作:https://tailwindcss.com/docs/guides/nuxtjs
我确实也在运行node v 18.15.0。

相关问题