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

bug: Not working in NextJs 14.2.2 #153

Open
1 of 3 tasks
timscullin opened this issue Apr 22, 2024 · 6 comments
Open
1 of 3 tasks

bug: Not working in NextJs 14.2.2 #153

timscullin opened this issue Apr 22, 2024 · 6 comments

Comments

@timscullin
Copy link

Where the bug happens

  • Browser Extension
  • Library
  • Other

your browser

No response

Describe the bug

I just upgraded to 14.2.2 from 14.1.4 and locatorJs stopped working.
Rolling back to 14.1 still working fine

@infi-pc
Copy link
Owner

infi-pc commented Apr 23, 2024

I can confirm it stopped working since v14.2. it seems to be related to changes in React facebook/react#28265, and the fix could be similar this: facebook/react#28351

I currently have pretty busy days, so I don't know when i will get to it, but I will try as soon as possible.

@infi-pc
Copy link
Owner

infi-pc commented May 27, 2024

status update from my side
I didn't get into a proper investigation, but it seems it won't work well anyway. The official React devtools also don't work in most cases :/ - the source is usually some minified file

I have a hope in React Compiler in Next15 - it seems they include these component sources in the compiled bundle, we could use it, I don't know how yet, but we have some time till it gets released.

CleanShot 2024-05-27 at 09 01 37@2x

@Jack-Works
Copy link

I have worked with new React and React DevTools. In the new version, React DevTools parses the source map and tries to find out the real position from it.

This means, in the old setup you should use _jsxDEV, and the fileName does all the work for you. In the new setup, you should use a precise source map (which might be slow in the dev), and configure the devtoolModuleFilenameTemplate (webpack) correctly.

Here is my webpack configuration:

  • output.devtoolModuleFilenameTemplate: join(import.meta.dirname, './src/[resource-path]')
  • devtool: source-map (the slowest&best one)

You will also need to apply this patch on the DevTools to make the webpack sourcemap work: facebook/react#29199

@liubin595338764
Copy link

Looking forward to resolving it.

@nirtamir2
Copy link

Is there an update on this?
Even a temporary hack to make it work with Next.js 15 will be helpful 🙏

@amirrezaDev1378
Copy link

This will be a huge improvement if we can use it in nextjs 15.

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

6 participants