Closed muhammad-grayphite closed 1 year ago
Would you provide a reproduction? 🙏
I'm having the same problem. In my case, the problem is solved when I comment out the v-toolbar-title
and v-app-bar-title
line. It might be a bug of Vuetify I think
Same error Reproduction steps:
default layout
default layout
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core
at <FragmentWrapper >
at <NuxtLayout>
at <VApp>
at <App key=3 >
at <NuxtRoot>
chunk-LGAZO65B.js?v=c0b43372:3361 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__asyncLoader')
BUT
default layout
)clean layout
)default layout
@pavloniym If would be very helpful if you would create a reproduction from https://stackblitz.com/github/nuxt/starter/tree/v3.
So I fixed this issue by adding defineAsyncComponent. if you are importing components dynamically like ()=> import() you need import like this.
component: defineAsyncComponent(() => import('component'))
I had some dynamic imports like this comp: () => import('../../comp.vue')
, I changed them like above and it is working fine now. here is from official doc https://vuejs.org/guide/components/async.html#basic-usage.
this https://github.com/nuxt/nuxt/issues/13309 thread helped me specially https://github.com/nuxt/nuxt/issues/13309#issuecomment-1398427660
@bilal-grayphite Thanks, but not working for me ...
My routing file
import {defineAsyncComponent} from 'vue'
// Routes
export const HOME_ROUTE = 'HOME_ROUTE'
export default [
{
path: '/',
name: HOME_ROUTE,
meta: { layout: 'app' },
component: defineAsyncComponent(() => import('~/pages/home/HomePage'))
}
]
Console warning from nuxt
vue-router.js?v=b113b80d:43 [Vue Router warn]: Component "default" in record with path "/home" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".
And same error
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core
at <FragmentWrapper >
at <NuxtLayout>
at <VApp>
at <App key=3 >
at <NuxtRoot>
warn2 @ chunk-LGAZO65B.js?v=76ac36e3:1381
logError @ chunk-LGAZO65B.js?v=76ac36e3:1633
handleError @ chunk-LGAZO65B.js?v=76ac36e3:1625
callWithErrorHandling @ chunk-LGAZO65B.js?v=76ac36e3:1582
flushJobs @ chunk-LGAZO65B.js?v=76ac36e3:1767
Promise.then (async)
queueFlush @ chunk-LGAZO65B.js?v=76ac36e3:1683
queueJob @ chunk-LGAZO65B.js?v=76ac36e3:1677
(anonymous) @ chunk-LGAZO65B.js?v=76ac36e3:6216
triggerEffect @ chunk-LGAZO65B.js?v=76ac36e3:589
triggerEffects @ chunk-LGAZO65B.js?v=76ac36e3:579
triggerRefValue @ chunk-LGAZO65B.js?v=76ac36e3:1174
(anonymous) @ chunk-LGAZO65B.js?v=76ac36e3:1304
triggerEffect @ chunk-LGAZO65B.js?v=76ac36e3:589
triggerEffects @ chunk-LGAZO65B.js?v=76ac36e3:574
triggerRefValue @ chunk-LGAZO65B.js?v=76ac36e3:1174
(anonymous) @ chunk-LGAZO65B.js?v=76ac36e3:1304
triggerEffect @ chunk-LGAZO65B.js?v=76ac36e3:589
triggerEffects @ chunk-LGAZO65B.js?v=76ac36e3:574
triggerRefValue @ chunk-LGAZO65B.js?v=76ac36e3:1174
set value @ chunk-LGAZO65B.js?v=76ac36e3:1218
finalizeNavigation @ vue-router.js?v=b113b80d:2399
(anonymous) @ vue-router.js?v=b113b80d:2312
Promise.then (async)
pushWithRedirect @ vue-router.js?v=b113b80d:2281
push @ vue-router.js?v=b113b80d:2207
navigate @ vue-router.js?v=b113b80d:1463
callWithErrorHandling @ chunk-LGAZO65B.js?v=76ac36e3:1580
callWithAsyncErrorHandling @ chunk-LGAZO65B.js?v=76ac36e3:1588
invoker @ chunk-LGAZO65B.js?v=76ac36e3:8198
chunk-LGAZO65B.js?v=76ac36e3:3361 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__asyncLoader')
at isAsyncWrapper (chunk-LGAZO65B.js?v=76ac36e3:3361:38)
at unmount (chunk-LGAZO65B.js?v=76ac36e3:6472:36)
at unmountChildren (chunk-LGAZO65B.js?v=76ac36e3:6584:7)
at unmount (chunk-LGAZO65B.js?v=76ac36e3:6493:9)
at unmountComponent (chunk-LGAZO65B.js?v=76ac36e3:6564:7)
at unmount (chunk-LGAZO65B.js?v=76ac36e3:6478:7)
at unmountChildren (chunk-LGAZO65B.js?v=76ac36e3:6584:7)
at unmount (chunk-LGAZO65B.js?v=76ac36e3:6493:9)
at unmountChildren (chunk-LGAZO65B.js?v=76ac36e3:6584:7)
at unmount (chunk-LGAZO65B.js?v=76ac36e3:6493:9)
@danielroe Will create as soon as possible, thanks
@pavloniym sorry for late reply. are you still getting this error?
basically we were using some dyanamic imports without defineAsyncComponent and some with it. I simply changed them using defineAsyncComponent in the whole project and its working fine. try using defineComponent
if that works. maybe there is am issue with using different layouts.
After my recovery and some code research i have found an issue:
This variant produces an error:
<v-list-subheader v-text='"OR"' />
This variant works correct, without error:
<v-list-subheader>OR</v-list-subheader>
v-list-subheader
- vuetify component (test on vuetify v3+).
Do not know why this syntax '"OR"'
crashes vue/nuxt ...
@pavloniym Based on your description, this is an upstream issue: https://github.com/vuejs/core/issues/6435 (and others)
I have updated to:
"vue-router": "^4.2.4", "vuetify": "^3.3.10",
and I no longer get this problem
Closing as this is not a Nuxt issue.
Environment
This is my package.json dependencies
{ "private": true, "scripts": { "build": "nuxt build", "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare" }, "engines": { "node": ">=18.0.0" }, "devDependencies": { "nuxt": "^3.4.1" }, "dependencies": { "@mdi/font": "^7.1.96", "@mdi/js": "^7.1.96", "@pinia/nuxt": "^0.4.6", "@vuepic/vue-datepicker": "^4.2.3", "axios": "^1.2.2", "pinia": "^2.0.29", "sass": "^1.58.0", "vuetify": "^3.1.14" }, "overrides": { "vue": "latest" } }
Reproduction
Ah I dont have it right now
Describe the bug
Basically we are migrating from nuxt2 to nuxt3, we have a menu bar in the left corner, by clicking on them user can go to the other pages of the site. on clicking the menu we are using nuxt this.$router.push(slug), but when for some reason it throws an error
peError: Cannot read properties of undefined (reading '__asyncLoader')
This is the code that run after selecting the nav item. I have checked if I comment out this.$router.push it works fine.
onNavClick(menu) { try{ this.isHidden = !this.isHidden; if (menu.url.match('http')) { window.open(menu.url, '_blank'); } else { this.$router.push(menu.url); } }catch(e){ console.error(e) }
I am clueless here, I'll appreciate if you guys can give me some hints. Also attaching screenshot and a gif to clerify
Additional context
No response
Logs