Vue regression in 2.4.3
See original GitHub issueDescribe the bug
This looks like a Vue or SFC compiler bug, but the only thing that changed (I double-checked by diffing package-lock.json
) is Vite being upgraded from 2.4.1 to 2.4.3.
In 2.4.1 my app works fine.
In 2.4.3 it doesn’t start because of this error, straight in my root (App) component:
TypeError: Cannot destructure property 'Component' of 'undefined' as it is undefined.
Where it fails is this SFC generated code:
_createVNode(_component_router_view, null, {
// Apparently at runtime this lambda receives undefined so destructuring fails
default: _withCtx(({ Component, route }) => [
// ...
Reproduction
My App.vue contains this template, which is the (first?) part that fails:
<router-view v-slot="{ Component, route }">
<suspense :key="route.path" v-else>
<component :is="Component" />
<template #fallback>Loading...</template>
</suspense>
</router-view>
System Info
System:
OS: Windows 10 10.0.18363
CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
Memory: 5.97 GB / 15.79 GB
Binaries:
Node: 15.5.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.3.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.18362.1593.0)
Internet Explorer: 11.0.18362.1
npmPackages:
@vitejs/plugin-vue: ^1.2.4 => 1.2.4
vite: ^2.4.2 => 2.4.3
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Issue Analytics
- State:
- Created 2 years ago
- Comments:26 (21 by maintainers)
Top Results From Across the Web
vue 2.4.3 ssr critical CSS not injected (regression from 2.4.2)
Version 2.4.3 Reproduction link http://无法提供Steps to reproduce npm install 最新的vue/vue-server-renderer/vue-template-compiler (2.4.3) ...
Read more >Vue.js v2.4.4 Release - GitClear
Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on ... vue 2.4.3 ssr critical CSS not injected (regression from 2.4.2).
Read more >Where is Vue 3 versions list? - Stack Overflow
Option 1: NPM version page. Use Vue's NPM version page. The version numbers listed in the "Version" column can be copied exactly into...
Read more >How can I install Vue Storefront and integrate with Magento ...
How can I install Vue storefront for Magneto 2.4.3 and also specify the version for node and yarn with proper steps?
Read more >Chapter 19 Machine Learning - JavaScript for R
js, a library that brings machine learning to JavaScript. It covers quite a few models; we only include one: the linear regression. This...
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 Free
Top 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
Given all the changes to dependency pre-bundling in 2.9, I think it is a good idea to close it now. As you said @jods4, it would be great if you find the time to test your project again. Please create a new issue against latest linking to this one if there is still an issue. Thanks!
Haven’t seen it in a while, I must admit. I’m soon gonna pick up work on the project that was problematic above, I’ll close the issue if it now works without issue.