Skip to content

Any panics in viteplus has the panic message generated by Rolldown #1285

@sapphi-red

Description

@sapphi-red

When a panic happens, it has a message like below:

error: Lint or type issues found
Rolldown panicked. This is a bug in Rolldown, not your code.

thread '<unnamed>' (8114667) panicked at library/std/src/io/stdio.rs:1165:9:
failed printing to stdout: Resource temporarily unavailable (os error 35)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Please report this issue at: https://github.com/rolldown/rolldown/issues/new?template=panic_report.yml
× eslint-plugin-react(react-in-jsx-scope): `React` must be in scope when using JSX.
    ╭─[src/components/changelog/SignUpForm.tsx:9:6]
  8 │   return (
  9 │     <form className="relative isolate mt-8 flex items-center pr-1">
    ·      ────
 10 │       <label htmlFor={id} className="sr-only">
    ╰────
  help: When using JSX, `<a />` expands to `React.createElement("a")`. Therefore the `React` variable must be in scope.

  × eslint-plugin-react(react-in-jsx-scope): `React` must be in scope when using JSX.
    ╭─[src/components/changelog/SignUpForm.tsx:10:8]
  9 │     <form className="relative isolate mt-8 flex items-center pr-1">
 10 │       <label htmlFor={id} className="sr-only">
    ·        ─────
 11 │         Email address
    ╰────
  help: When using JSX, `<a />` expands to `React.createElement("a")`. Therefore the `React` variable must be in scope.

(Reported at rolldown/rolldown#8906)

This is confusing because the panic is not caused by Rolldown. I guess this panic hook in Rolldown is included in the build.
https://github.com/rolldown/rolldown/blob/37405e7f8b07ad686c0940f14aa347a0eb2ccefd/crates/rolldown_binding/src/lib.rs#L109-L116

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions