-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
chore: adding 'no-experimental-fetch' node option by default #25628
Conversation
@mdeshmu since you added the docs (thank you!!!) let me know if I'm missing something here... I assume this would just fix it, but let us know if you think this PR sets up some other danger/error. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #25628 +/- ##
==========================================
- Coverage 69.07% 69.05% -0.03%
==========================================
Files 1939 1945 +6
Lines 75866 78089 +2223
Branches 8432 8988 +556
==========================================
+ Hits 52406 53922 +1516
- Misses 21285 21847 +562
- Partials 2175 2320 +145
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
If this type of error comes while building assets(i.e using above commands): | ||
|
||
```bash | ||
Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize |
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.
Even though i didn't add these docs but I feel calling SourceMapConsumer.initialize
would still be needed.
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.
Upon messing with it, it seems like you shouldn't have to call the initialize method when using React... and that merely installing the source-map
npm module fixes this.
I did unset NODE_OPTIONS
to set my machine back to "stock" and all of the webpack build modes seem to work fine now.
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
SUMMARY
When running
npm run build
I would get this error:When troubleshooting, I found a helpful note in the docs:
I'm assuming that nobody needs theexperimental-fetch
option enabled, so rather than letting users hit this error and go looking for the fix, let's just add the fix to the webpack build scripts inpackage.json
Updated approach! Upon fiddling with things, it seems that simply installing the
source-map
dependency seems to automagically provide the missingmappings.wasm
file, and we no longer have a problem.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
n/a
TESTING INSTRUCTIONS
run all three build methods and make sure they don't bomb out :)
ADDITIONAL INFORMATION