When I inspect my code using the react dev tools, I'm noticing some hooks trigger this error and cause the "parse hook names" action to error out. When I inspect the react dev tools, it outputs:
main.js:4878 Error: Could not find runtime location for line:177321 and column:81
at Object.originalPositionFor
Following from this thread on Facebook/React issues, it seems like it might be webpack source map related. Does someone have any ideas as to what could be causing this? It's happening not just with custom hooks, but standard useState and usecallback hooks in my codebase.
EDIT: I played around with webpack's devtool
setting with multiple values, but the issue persisted. The issue is gone for now on my codebase, but it intermittently shows itself up making it hard to reproduce. Leave question open until there's hard evidence explaining what's causing this.
devtool
are you using? Switching tocheap-module-source-map
fixed a similar issue for me – Puckettdevtool
section of the docs: webpack.js.org/configuration/devtool – Puckettreact-script
or just simple modify the contents in thenext.config.js
? – Foxtrot