-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fixes 'yarn start' on Windows - LavaPack is not defined (#13318) #16550
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [6dd73eb]
Page Load Metrics (2351 ± 213 ms)
Bundle size diffs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can not speak for Windows. Does not break anything on Linux.
Not certain if it's the same issue, but I hit a similar error building on Windows previously and resolved it by updating the copy paths before they reached
|
3ac7ae6
to
3ed04f1
Compare
Builds ready [3ed04f1]
Page Load Metrics (2352 ± 83 ms)
Bundle size diffs
|
development/build/utils.js
Outdated
targetPath += pathToFiles; | ||
|
||
if (process.platform === 'win32') { | ||
targetPath = targetPath.replace(/\\/gu, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would path.normalize
be helpful here?
Also path.sep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path.normalize
, or even path.posix.normalize
will not work for this. Here's a discussion about it: nodejs/node#12298
I replaced with the following and pushed a new commit
targetPath.split(path.sep).join(path.posix.sep)
da3ea54
to
3b5ec18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing, LGTM otherwise!
Builds ready [1313746]
Page Load Metrics (2184 ± 116 ms)
Bundle size diffs
|
Also adds a getPathInsideNodeModules helper function to end reliance on writing paths that start with './node_modules/'
1313746
to
cbe45ac
Compare
Builds ready [cbe45ac]
Page Load Metrics (2222 ± 121 ms)
Bundle size diffs
|
Builds ready [f237fb8]
Page Load Metrics (2175 ± 138 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
I tested the PR on mac and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes #13318, Fixes #13793, Fixes #14984, and Fixes #15237
Discussed with @kumavis and @danjm
Please let me know if this breaks another system and a more complicated fix is necessary.
Update 11/18/2022: Also adds a getPathInsideNodeModules helper function to end reliance on writing paths that start with
./node_modules/