Nuxt-bridge useNuxtApp() not available inside middleware
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.15.0
- Nuxt Version:
2.16.0-27616340.013f051b
- Package Manager:
yarn@3.2.1
- Builder:
webpack
- User Config:
srcDir
,bridge
,ssr
,dev
,webpackOptimisations
,alias
,image
,generate
,head
,typescript
,publicRuntimeConfig
,privateRuntimeConfig
,css
,loading
,loadingIndicator
,plugins
,components
,buildModules
,modules
,proxy
,axios
,vuetify
,build
,serverHandlers
,devServerHandlers
- Runtime Modules:
@nuxtjs/vuetify@1.12.3
,@nuxt/image@0.6.2
,@nuxtjs/axios@5.13.6
,@nuxtjs/proxy@2.1.0
,nuxt-social-meta@1.0.0
- Build Modules:
()
,nuxt-storm@1.1.3
,nuxt-compress@5.0.0
,nuxt-webpack-optimisations@2.2.4
,@pinia/nuxt@0.3.0
,@nuxt/bridge@3.0.0-27636329.42ea75b
Reproduction
Describe the bug
useNuxtApp() inside a middleware fails with an error
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:15 (3 by maintainers)
Top Results From Across the Web
nuxtApp availability in nuxt 2 middleware · Issue #48 - GitHub
Hi, sorry is not for API Middleware, I was talking about Nuxt-Bridge and route middleware (nuxt 2).
Read more >Nuxt 2 Bridge: How to set a middleware on a page?
In Nuxt 2 Bridge middlewares are still set the old non-composition way. This can be used next to the composition API:
Read more >Migrate to Bridge: Composition API - Nuxt
Nuxt Bridge provides access to Composition API syntax. ... In order to access Vuex store instance, you can use useNuxtApp().$store .
Read more >What's new in Nuxt 3 - LogRocket Blog
While there is currently no stable migration technique for a smooth transition from Nuxt 2 to Nuxt 3, Nuxt Bridge (which we will...
Read more >Middleware directory - Nuxt
The middleware will be executed in series in this order: nuxt.config.js (in the order within the file); Matched layouts; Matched pages. Router Middleware....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you share minimal reproduction or middleware code?
@Luferov yeah, let’s wait and hope for a fix.