Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: Internal error: failed to parse runtime with --supported:object-accessors=false #3794

Closed
hyrious opened this issue Jun 6, 2024 · 1 comment

Comments

@hyrious
Copy link

hyrious commented Jun 6, 2024

Reproduction

> echo '' | esbuild --supported:object-accessors=false
panic: Internal error: failed to parse runtime:
✘ [ERROR] Transforming object accessors to the configured target environment is not supported yet

    <runtime>:179:39:
      179 │ ...wnPropDesc(k < 4 ? target : { get [name]() { return __privateG...
          ╵                                  ~~~

✘ [ERROR] Transforming object accessors to the configured target environment is not supported yet

    <runtime>:179:90:
      179 │ ... __privateGet(this, extra) }, set [name](x) { return __private...
          ╵                                  ~~~


goroutine 19 [running]:
github.com/evanw/esbuild/internal/bundler.(*runtimeCache).parseRuntime(_, _)
        github.com/evanw/esbuild/internal/bundler/bundler.go:3167 +0x66c
github.com/evanw/esbuild/internal/bundler.ScanBundle.func2()
        github.com/evanw/esbuild/internal/bundler/bundler.go:1285 +0x88
created by github.com/evanw/esbuild/internal/bundler.ScanBundle
        github.com/evanw/esbuild/internal/bundler/bundler.go:1284 +0x93b

Playground Link

Note

Openning this link you will see the page stops working and in the devtools console there is a exit code: 2 warning.

@evanw
Copy link
Owner

evanw commented Jun 7, 2024

Thanks for the report. I'll address this in the next release and also add tests to avoid this in the future. In the meantime, a workaround is to also add --supported:object-extensions=false.

@evanw evanw closed this as completed in ae8d1b4 Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants