Reputation: 41
I keep getting below error in my react app. Not sure what is the issue.
/Users/823222/miniapp/node_modules/headers-polyfill/lib/Headers.js 9:25 Module parse failed: Unexpected token (9:25) File was processed with these loaders:
[NORMALIZED_HEADERS] = {};
| // Keeps the mapping between the raw header name | // and the normalized header name to ease the lookup.
Upvotes: 1
Views: 1420
Reputation: 79
Looks like this is due to a recent change in this package, that changed how the symbols were declared:
https://github.com/mswjs/headers-polyfill/pull/33/files
I've started a GitHub issue here, feel free to add details about your environment: https://github.com/mswjs/headers-polyfill/issues/36
TL;DR: There was a significant change to how the module is prepared in a recent release, I reverted to 3.0.4 and things are working again for me.
Edit: 3.0.10 released that reverts the build target and fixes this issue: https://github.com/mswjs/headers-polyfill/releases/tag/v3.0.10
Upvotes: 1