-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Turbopack "unreachable code" string causing warnings in Firefox #74185
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
Comments
It sure is and boy is it annoying. |
I do not know, if this is vercel or turbopack or trpc related to be honest, but I can confirm this.
|
@michaelwschultz what is the |
Adding this to your filter list in the browser output hides any message with "unreachable" in it so you can more easily ignore them. |
super annoying 🤕 |
Uh oh!
There was an error while loading. Please reload this page.
Link to the code that reproduces this issue
https://github.com/OleSkaar/with-turbopack-app
I've used the with-turbopack example here, with two dependencies that were giving the same error in my project:
"@tanstack/react-query": "5.62.2", "@tanstack/react-query-devtools": "5.62.2",
To Reproduce
pnpm run dev
localhost:3000
This is happening because of the
"TURBOPACK unreachable";
statement that's inserted after the return statement in the code from react query dev tools:Current vs. Expected behavior
I expect being able to load up this project without warnings in the console.
I believe Firefox is detecting the
"TURBOPACK unreachable";
string as unreachable code and therefore reporting a warning (see this page).The string appears before a function declaration, and this seemed to be the case for the other warnings reported here as well. This function is declared below the return the statement, but because of hoisting it is reachable (and used) higher up in the code. Could the
"TURBOPACK unreachable";
string be inserted after the function declaration instead?Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030 Available memory (MB): 36864 Available CPU cores: 12 Binaries: Node: 20.13.1 npm: 10.5.2 Yarn: 1.22.22 pnpm: 9.14.4 Relevant Packages: next: 15.1.2 // Latest available version is detected (15.1.2). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.7.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Developer Experience, Module Resolution, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: