Uncaught error when using top-level await in <script setup>
Version
3.2.30
Reproduction link
(Uncomment line 11 in App.vue)
Steps to reproduce
- Create default Vite + Vue app
- Use a top-level await in a component's
- Observe component no longer renders, and console errors below:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')
at parentNode (runtime-dom.esm-bundler.js:35:30)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5108:17)
at ReactiveEffect.run (reactivity.esm-bundler.js:167:25)
at callWithErrorHandling (runtime-core.esm-bundler.js:155:36)
at flushJobs (runtime-core.esm-bundler.js:394:17)
[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 <RouterView>
at <App>
What is expected?
await should be allowed within
What is actually happening?
await appears to break the component render
I understand this should be supported in the