MS Edge 18 error
See original GitHub issueError unsupported regexp flag "n": /[0-9]/undefined
node_modules/parsimmon/build/parsimmon.umd.min.js:1:6716 Anonymous function
node_modules/parsimmon/build/parsimmon.umd.min.js:1:6560 K
node_modules/parsimmon/build/parsimmon.umd.min.js:1:11055 Anonymous function
node_modules/parsimmon/build/parsimmon.umd.min.js:1:348 r
node_modules/parsimmon/build/parsimmon.umd.min.js:1:407 Anonymous function
node_modules/parsimmon/build/parsimmon.umd.min.js:1:199 Anonymous function
node_modules/parsimmon/build/parsimmon.umd.min.js:1 Anonymous function
webpack/bootstrap:25:3 __webpack_require__
https://mywebsite.com/static/js/main.abc.js:1:123 Anonymous function
webpack/bootstrap:25:3 __webpack_require__
Seeing the above a few times in my error tracker for Windows 10 devices running Edge 16 and Edge 18 (very old, non-chromium builds of the Edge browser).
Running the latest parsimmon
at 1.15.0
. We just recently upgraded from 1.12.0
and I hadn’t noticed these errors previously, if that’s helpful.
The error message is a bit odd, but my guess is that RegExp
on these versions of Edge don’t support flags very well. It looks to me after reading the source for parsimmon
that the regexp is literally presenting as the string "/[0-9]/undefined"
when flags
converts it to a string:
I tried to see if I could install that version on my Windows 10 machine, but I guess Microsoft has made that difficult to do side-by-side with the new Edge, so I wasn’t able to finish that try.
I mostly only bring this up because your README claims to support IE7+. I think this case would be not too hard to detect, if you’re willing to test it and support these old Edge versions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Maybe you could even just add some kind of value logging to the internal
flags
function, like call stack and value of there
argument or something.Yeah this is what I was worried about. For now, I would suggest you fork Parsimmon and try out writing a patch yourself, and deploying it to your own app. Then watch those crash reports and tell me what’s up. Additionally, if you could add any kind of logging to Edge about the value of
"" + /[0-9]/
that would be helpful.If we can get to a high level of confidence about exactly what’s happening, I would welcome a patch, but for now I’d like more information.