-
Notifications
You must be signed in to change notification settings - Fork 16
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
Explanation about why it stopped to work suddenly since updating the last version of NextJs #9
Comments
@JesusDR01 thanks for sharing this, is there a workaround known? |
Just use in your package.json: "next": "14.1.0", Until React and React developer tools fix this in a future version |
Got it, yeah I could try downgrading. That said, I wonder if there's a way to patch the source code in this repo to fix it, or if downgrading is the only option. |
Next.js launched 15 an hour ago, I wonder if that fixes it |
Looks like export const findFiberByHostInstance = (
target: HTMLElement
): { _debugSource: DebugSource } | null => {
if (!checkDevtoolsGlobalHook()) return null;
const renderer = getDevtoolsGlobalHookRenderer();
if (!renderer) return null;
const fiber = renderer.findFiberByHostInstance(target) || null;
console.log("[detectorino] fiber", fiber);
if (fiber) {
// nandorojo: I had to add this in to fix this
// https://github.com/hand-dot/react-inspector/issues/9
fiber._debugSource ??= fiber._debugOwner?._debugSource ?? null;
}
return fiber?._debugSource ? fiber : null;
}; |
is this using NextJs 15 or 14.1? |
Hello, for those who are using the latest version of Next and the extension stopped working suddenly, here is the explanation:
The NextJs team have launched recently the 14.2.13 package, so everyone with
"next": "^14.1.0",
in theirpackage.json
will face the extension suddenly stopped working (as it will be updated to a newer version by using^
)Explanation about why this issue is happening:
NextJs team updated React right before
14.1.1-canary.45 version
This update, includes the commit facebook/react#28265
Comments from the author:
![image](https://private-user-images.githubusercontent.com/15522791/370082925-bd595fdb-40d7-4169-be5b-377768805769.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTEzNTYsIm5iZiI6MTczOTU5MTA1NiwicGF0aCI6Ii8xNTUyMjc5MS8zNzAwODI5MjUtYmQ1OTVmZGItNDBkNy00MTY5LWJlNWItMzc3NzY4ODA1NzY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzNDQxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4ZjljYWEzYTI5M2RhYWViM2QwZjQ2MzU5M2U5ZTZjZDE4OGJmMGExMmYwNDkxZmQzODYzNTk3MWUyNTQxOTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0._JuQn5ouCtX2Wech9C-D5oEDxlUUJ4-ZG0D6GsopJTs)
This commit is deleting
_debugSource
, here is the explanation of what is actually happening:facebook/react#29092 (comment)
Using NextJs Version
14.1.1-canary.44
(before the ReactJs release):Using NextJs Version
14.1.1-canary.45
(after the ReactJs release):As the _debugSource is not there in the
14.1.1-canary.45
version, we cannot make use of the_debugSource
to open the file in vscode.NextJs developers who updated to the last version cannot make use of the extension till new updates on react fiber.
The text was updated successfully, but these errors were encountered: