question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue regression in 2.4.3

See original GitHub issue

Describe 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
patak-devcommented, Apr 1, 2022

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!

1reaction
jods4commented, Mar 14, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found