Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Build artifacts throw an error when using npm package @wooorm/starry-night #425

@Chrysochrome

Description

@Chrysochrome

Describe the bug

When I'm using @wooorm/starry-night, the dev server works fine, but the build artifacts reject to run with an error

Uncaught TypeError: Cannot read properties of undefined (reading 'Registry')
    at f (index-BJd6lo6e.js:3920:13712)
    at M (index-BJd6lo6e.js:3920:12558)
    at index-BJd6lo6e.js:3920:13976

P.S. Actually it's same as #276 but with a minimal reproduction under below

Reproduction

https://github.com/Chrysochrome/bug-reproduction/tree/starry-night-rolldown-vite

Steps to reproduce

  • pull the repo
  • checkout branch starry-night-rolldown-vite
  • npm i
  • npm run build
  • npm run preview
  • navigate to the browser Devtools Console panel

System Info

System:
    OS: macOS 26.0
    CPU: (10) arm64 Apple M1 Pro
    Memory: 121.66 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.19.0 - /opt/homebrew/opt/node@22/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.4.2 - /opt/homebrew/bin/npm
    pnpm: 9.12.3 - /opt/homebrew/bin/pnpm
    bun: 1.2.22 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 26.0
  npmPackages:
    rolldown-vite:  7.1.12

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: upstreamBug in a dependency of Vite

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions