react-error-overlay line numbers are wrong since 2.1.5 release
See original GitHub issueTo reproduce: throw an error in your react app that results in the error overlay appearing. The line number it shows will be wrong (and thus, also the lines of code that it displays).
This was broken by the switch to eval-source-map in the 2.1.5 release. I confirmed that switching back to cheap-module-source-map
fixes the issue.
cc @Timer @jasonLaster @ianschmitz
Environment
Environment Info:
System: OS: macOS 10.14.3 CPU: x64 Intel® Core™ i7-4980HQ CPU @ 2.80GHz Binaries: Node: 11.6.0 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.5.0 - /usr/local/bin/npm Browsers: Chrome: 72.0.3626.109 Firefox: 65.0 Safari: 12.0.3 npmPackages: react: ^16.8.1 => 16.8.1 react-dom: ^16.8.1 => 16.8.1 react-scripts: ^2.1.4 => 2.1.5 npmGlobalPackages: create-react-app: Not Found
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top GitHub Comments
Note that switching back will reintroduce #6074. So it’s basically a choice between breakpoints being broken and the error overlay being broken. 😦
This one probably affects more people more of the time. But when it breaks, it’s pretty easy to figure out and look at the console for the real stack trace. With the breakpoints issue, it’s really hard to figure out why they aren’t working, and once you do, the solution is more tedious (you have to manually kill and re-run
npm start
).In conclusion: ¯\(ツ)/¯
@Timer can you reopen #6074?