Skip to content

Vue Slot Component Causes "Cannot Read Properties of Null (reading 'ce')" Error When Rendering #13073

@Kaifuny

Description

@Kaifuny

Vue version

3.5.13

Link to minimal reproduction

https://github.com/Kaifuny/test-vue-slot-component-package

Steps to reproduce

GitHub Repo: https://github.com/Kaifuny/test-vue-slot-component-package

yarn install

yarn build:ui

yarn dev

when you at the root of the app project

apps/desktop/src/App.vue

<script setup lang="ts">
import { Button1, Button2 } from '@test/ui';
</script>

<template>
  <div>
    <!-- <Button1></Button1> -->
    <Button2>bbb</Button2>
  </div>
</template>

Button2 is not working, but Button1 is working.

the error message is

index.mjs:618 Uncaught TypeError: Cannot read properties of null (reading 'ce')
    at renderSlot (index.mjs:618:32)
    at Proxy._sfc_render (index.mjs:1262:5)
    at renderComponentRoot (chunk-3SZSTCRY.js?v=05012731:8581:17)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-3SZSTCRY.js?v=05012731:7403:46)
    at ReactiveEffect.run (chunk-3SZSTCRY.js?v=05012731:481:19)
    at setupRenderEffect (chunk-3SZSTCRY.js?v=05012731:7538:5)
    at mountComponent (chunk-3SZSTCRY.js?v=05012731:7313:7)
    at processComponent (chunk-3SZSTCRY.js?v=05012731:7266:9)
    at patch (chunk-3SZSTCRY.js?v=05012731:6782:11)
    at mountChildren (chunk-3SZSTCRY.js?v=05012731:7014:7)

What is expected?

should render correctly without throwing an error, just like . Both components should be usable when imported from @test/ui in App.vue.

What is actually happening?

index.mjs:618 Uncaught TypeError: Cannot read properties of null (reading 'ce')
    at renderSlot (index.mjs:618:32)
    at Proxy._sfc_render (index.mjs:1262:5)
    at renderComponentRoot (chunk-3SZSTCRY.js?v=05012731:8581:17)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-3SZSTCRY.js?v=05012731:7403:46)
    at ReactiveEffect.run (chunk-3SZSTCRY.js?v=05012731:481:19)
    at setupRenderEffect (chunk-3SZSTCRY.js?v=05012731:7538:5)
    at mountComponent (chunk-3SZSTCRY.js?v=05012731:7313:7)
    at processComponent (chunk-3SZSTCRY.js?v=05012731:7266:9)
    at patch (chunk-3SZSTCRY.js?v=05012731:6782:11)
    at mountChildren (chunk-3SZSTCRY.js?v=05012731:7014:7)

System Info

System:
    OS: macOS 15.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 347.48 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
Binaries:
    Node: 23.7.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.1.0 - /opt/homebrew/bin/npm
    bun: 1.2.3 - ~/.bun/bin/bun
Browsers:
    Chrome: 134.0.6998.89
    Safari: 18.4

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions