next.js
13670aea - Turbopack panics: create discussions with pre-filled errors (#76850)

Commit
293 days ago
Turbopack panics: create discussions with pre-filled errors (#76850) This: - Prompts users to report turbopack internal errors as new GitHub discussions instead of issues - Encodes the error message and debug information into the discussion title and body respectively - Since these encoded urls can be lengthy, it uses [Terminal Hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) to present things concisely without excessive wrapping. If the terminal does not support this, only the error message is sent. - Removes specific panic handling in favor of the `subscribe` napi error handler. This seems to be the vast majority of panics. Test Plan: In a terminal with hyperlink support `FORCE_HYPERLINK=1 pnpm next dev --turbo examples/basic-css/`: ``` ----- FATAL: An unexpected Turbopack error occurred. A panic log has been written to /var/folders/sk/zy7023wd30j0dxpmdv3nylm80000gn/T/next-panic-bf6bdb325db0f5ed5599cf332d8e364a.log. To help make Turbopack better, report this error by clicking here. ----- ``` Where the link generated is [clicking here.](https://github.com/vercel/next.js/discussions/new?category=error-report&title=Turbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29&body=Error%20message%3A%0A%60%60%60%0APanic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%0ADebug%20info%3A%0A-%20Execution%20of%20get_entrypoints_with_issues_operation%20failed%0A-%20Execution%20of%20EntrypointsOperation%3A%3Anew%20failed%0A-%20Execution%20of%20Project%3A%3Aentrypoints%20failed%0A-%20Execution%20of%20Project%3A%3Aapp_project%20failed%0A-%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%60%60%60&labels=Turbopack,Turbopack%20Panic%20Backtrace) In a terminal without hyperlink support `FORCE_HYPERLINK=0 pnpm next dev --turbo examples/basic-css/`: ``` ----- FATAL: An unexpected Turbopack error occurred. A panic log has been written to /var/folders/sk/zy7023wd30j0dxpmdv3nylm80000gn/T/next-panic-3c5a833c682727cba1d51cc97ee0c16.log. To help make Turbopack better, report this error by clicking here: https://github.com/vercel/next.js/discussions/new?category=error-report&title=Turbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29&body=Error%20message%3A%0A%60%60%60%0ATurbopack%20Error%3A%20Panic%20in%20AppProject%3A%3Anew%3A%20Some%28%22oh%20no%20new%20app%21%22%29%0A%60%60%60&labels=Turbopack,Turbopack%20Panic%20Backtrace ----- ``` --------- Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Author
Parents
Loading