devtools icon indicating copy to clipboard operation
devtools copied to clipboard

fix: Enabling timeline shows error: useAuth is not a function

Open martinszeltins opened this issue 1 year ago â€ĸ 1 comments

🐛 The bug

If I enable the timeline then I get this error:

500 useAuth is not a function

at useAppInit (./composables/useAppInit.ts:8:3)
at setup (./app.js:31:5)
at _sfc_main.setup (./app.js:63:23)
at callWithErrorHandling (./node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:195:19)
at setupStatefulComponent (./node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7554:25)
at setupComponent (./node_modules/.pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7515:36)
at renderComponentVNode (./node_modules/.pnpm/@[email protected][email protected]/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:623:15)
at Module.ssrRenderComponent (./node_modules/.pnpm/@[email protected][email protected]/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:84:10)
at default (./node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/nuxt/dist/app/components/nuxt-root.js:86:37)

If I disable the timeline then everything works.

đŸ› ī¸ To reproduce

https://stackblitz.com/github/martinszeltins/nuxt-error-repro?file=app.vue

🌈 Expected behavior

Either it should always show the error or never show the error. And it is not clear what the error is about or what is the cause.

â„šī¸ Additional context

No response

martinszeltins avatar May 13 '24 15:05 martinszeltins

I thought in my case the problem was related to layers but I see you don't use them on your repro project, so I'm guessing timeline tries to render/load pages/components before composables are available?

hacknug avatar Feb 26 '25 15:02 hacknug