Created by: Timer
Turns out that the path
module stubbed into a web environment does not support Windows, nor contains the posix
/ win32
variants of path (it's fixed posix
, so path.sep
returns /
in a win32 environment).
Effectively, what happened here is that the fileName
was C:\foo\bar
and upon normalizing, remained C:\foo\bar
(it should've switched to /
, or more specifically, path.sep
).
This aligns the behavior with the other path normalization process as seen here: https://github.com/facebookincubator/create-react-app/blob/b17fa4123e2d098d943f4b33ae9c5c2ac311fab6/packages/react-error-overlay/src/utils/unmapper.js#L67
Fixes #3078 (closed).
Activity
added tag: bug fix label
changed milestone to %1.0.13
added CLA Signed label
mentioned in issue #3078 (closed)
Created by: Timer
Hmm, @gaearon -- isn't the "Check your code at" part a little redundant?
Created by: Timer
Redundant in what way?
Just that we're displaying the code with contextual highlighting, but still telling the user to check the code at that location. Other errors (e.g.
document.body()
) don't add that extra instruction; I'm not sure of a place where it'd be particularly useful.Created by: Timer
Hmm, what's odd is that lerna wants me to update many packages:
Joes-MacBook-Pro:create-react-app joe$ npx lerna updated lerna info version 2.1.2 lerna info versioning independent lerna info Checking for updated packages... lerna info Comparing with react-dev-utils@4.0.1. lerna info result - eslint-config-react-app - react-dev-utils - react-error-overlay - react-scripts
I'd assume it'd only prompt me to do
react-error-overlay
andeslint-config-react-app
(for docs); so I'm not sure whyreact-dev-utils
andreact-scripts
(except that they're dependencies), but they're specified as caret ranges already ... (is this alerna
bug or intended functionality?)Should we do a manual release of a patch version on the overlay or a whole
react-scripts
release cycle?