nuxt / bridge

🌉 Experience Nuxt 3 features on existing Nuxt 2 projects
MIT License
273 stars 29 forks source link

TypeError: nuxtCtx.set is not a function #238

Closed productdevbook closed 2 years ago

productdevbook commented 2 years ago

https://github.com/productfrontenddeveloper/nuxt3_bug

Environment

Nuxt CLI v3.0.0-27234155.9f06830 17:54:57 Nuxt project info: (copied to clipboard) 17:54:57


Describe the bug and expected behavior

CleanShot 2021-10-12 at 17 55 48

productdevbook commented 2 years ago

@antfu https://github.com/productfrontenddeveloper/nuxt3_bug

pi0 commented 2 years ago

Would you please use yarn why @nuxt/kit? One of the modules seems is using a very old version of kit.

productdevbook commented 2 years ago

Would you please use yarn why @nuxt/kit? One of the modules seems is using a very old version of kit.

@pi0

=> Found "@nuxt/kit@0.6.4"
info Has been hoisted to "@nuxt/kit"
info Reasons this module exists
   - Hoisted from "@pinia#nuxt#@nuxt#kit"
   - Hoisted from "nuxt-windicss#@nuxt#kit"
info Disk size without dependencies: "448KB"
info Disk size with unique dependencies: "5.31MB"
info Disk size with transitive dependencies: "10.5MB"
info Number of shared dependencies: 52
=> Found "@nuxt/bridge#@nuxt/kit@3.0.0-27234169.3c132a8"
info This module exists because "@nuxt#bridge" depends on it.
info Disk size without dependencies: "404KB"
info Disk size with unique dependencies: "5.66MB"
info Disk size with transitive dependencies: "11.06MB"
info Number of shared dependencies: 58
=> Found "@nuxt/nitro#@nuxt/kit@3.0.0-27234155.9f06830"
info This module exists because "@nuxt#bridge#@nuxt#nitro" depends on it.
info Disk size without dependencies: "404KB"
info Disk size with unique dependencies: "5.66MB"
info Disk size with transitive dependencies: "11.06MB"
info Number of shared dependencies: 58

I did exactly what you said here. https://v3.nuxtjs.org/getting-started/bridge.

pi0 commented 2 years ago

Indeed you didn't do anything wrong probably. The error you are having is because pinia and windicss are using an outdated version of nuxt kit. I've reported both and added them to module upgrade list: https://github.com/nuxt/framework/discussions/751

You are using so many modules so there is a high chance some others are also incompatible and we need module authors to push fixes.

productdevbook commented 2 years ago

Thank you pinia update fixed, new problem nuxt/bridge#226