Nuxt3 精简需要注意的问题 升级注意的问题

问题汇总

  1. 升级 nuxt-windicss@2.5.5 2.5.3 等会报错, 删除后换个浏览器或者重新打开浏览器才能看出来

500
Cannot read properties of undefined (reading 'res')

at writeServerCookie (./node_modules/.pnpm/nuxt3@3.0.0-rc.13-27772354.a0a59e2_meulvl465cbihuljsrc34u445u/node_modules/nuxt3/dist/app/composables/cookie.mjs:64:27)
at writeFinalCookieValue (./node_modules/.pnpm/nuxt3@3.0.0-rc.13-27772354.a0a59e2_meulvl465cbihuljsrc34u445u/node_modules/nuxt3/dist/app/composables/cookie.mjs:32:9)
at _function (./node_modules/.pnpm/hookable@5.4.2/node_modules/hookable/dist/index.mjs:102:14)
at ./node_modules/.pnpm/hookable@5.4.2/node_modules/hookable/dist/index.mjs:39:82
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ./.nuxt/dev/index.mjs:616:3
at async ./.nuxt/dev/index.mjs:107:22
at async Object.handler (./node_modules/.pnpm/h3@0.8.6/node_modules/h3/dist/index.mjs:634:19)
at async Server.toNodeHandle (./node_modules/.pnpm/h3@0.8.6/node_modules/h3/dist/index.mjs:698:7)
  1. 删除 prettier eslint-config-prettier eslint-plugin-prettier
  2. 在里package.json删除或者更新版本的之后 得删除各自lock.json才能正常 Remove lockfile (package-lock.json, yarn.lock, or pnpm-lock.yaml) and reinstall dependencies.
    {
      "devDependencies": {
    --    "nuxt": "^3.0.0-rc.1"
    ++    "nuxt": "npm:nuxt3@latest"
      }
    }
    
本文版权归 123456.blog 所有
转载请附上原文出处链接和本声明
本文链接:
数字工·「」· https://123456.blog ip: 34.225.194.102
Copyright © 2022 Hotpot. All rights reserved. Made with ❤ , 3Q ; Deployed: Kubernetes(k8s),Docker
Design by HotpoT; VvE3 ,NuxT3 123456.blog@0.1.0