Skip to content

BUG | provideLocal and injectLocal | In Vue's vapor mode, getCurrentInstance returns null #4875

@Nakus0426

Description

@Nakus0426

Describe the bug

In Vue v3.6.0-alpha.1, getCurrentInstance() returns null in Vapor components will cause these two functions to fail to run because they cannot pass the environment check

Image

Reproduction

https://stackblitz.com/edit/vitejs-vite-m1bs1kix?file=src%2FApp.vue

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
    Memory: 12.32 GB / 31.31 GB
Binaries:
    Node: 22.15.1 - D:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
    pnpm: 10.12.2 - D:\Program Files\nodejs\pnpm.CMD
Browsers:
    Edge: Chromium (127.0.2651.98)
    Internet Explorer: 11.0.22621.3527
npmPackages:
    @vueuse/core: ^13.4.0 => 13.4.0
    vue: v3.6.0-alpha.1 => 3.6.0-alpha.1

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvue: vaporvaper mode related issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions