bridge
bridge copied to clipboard
Error in setup: "Error: Instance $root not found"
Environment
- Operating System:
Linux
- Node Version:
v16.16.0
- Nuxt Version:
2.16.0-27616340.013f051b
- Package Manager:
[email protected]
- Builder:
webpack
- User Config:
app
,bridge
,alias
,ssr
,target
,publicRuntimeConfig
,head
,loading
,css
,plugins
,components
,modules
,apollo
,i18n
,router
,typescript
,vuetify
,build
,serverHandlers
,devServerHandlers
,buildModules
- Runtime Modules:
@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@pinia/[email protected]
- Build Modules:
@nuxt/[email protected]
Reproduction
git clone https://github.com/devind-team/dcis
cd client
rm -r node_modules && rm yarn.lock && yarn
yarn run dev
Open browser: browser is always loading
Describe the bug
I want to upgrade project up latest version of nuxt/bridge.
We use composition api and after run dev got this error:
Additional context
Use apollo and pinia.
Logs
No response
Would you please provide a more minimal reproduction? I can't run this as it seems to need a graphql server running, etc.
https://stackblitz.com/github/nuxt/starter/tree/v2-bridge
Error may depend with getCurrentInstance.
https://stackblitz.com/edit/github-5xqxyf?file=layouts%2Fdefault.vue,pages%2Findex.vue,composables%2Findex.ts
Stackblitz had an internal bug logging the vm instance. But otherwise the sandbox seems to be working: https://stackblitz.com/edit/github-5xqxyf-wxr7av
Would you be able to provide a reproduction? 🙏
More info
Why do I need to provide a reproduction?
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.
If needs reproduction
labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
We have a couple of templates for starting with a minimal reproduction:
👉 https://stackblitz.com/github/nuxt/starter/tree/v2-bridge 👉 https://codesandbox.io/p/github/nuxt/starter/v2-bridge-codesandbox
A public GitHub repository is also perfect. 👌
Please ensure that the reproduction is as minimal as possible. See more details in our guide.
You might also find these other articles interesting and/or helpful: