question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error 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:

https://github.com/jneen/parsimmon/blob/cb77d09f900bb292389f0cf4870126bb5aa8b8d9/src/parsimmon.js#L696-L699

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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wavebeemcommented, Aug 15, 2020

Maybe you could even just add some kind of value logging to the internal flags function, like call stack and value of the re argument or something.

1reaction
wavebeemcommented, Aug 15, 2020

It seems literally impossible to find a way to install this ancient version of Edge, I can’t find an installer anywhere… 😬

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to access a particular website
I'm using edge, but have tried it with firefox, waterfox ,chrome and opera. I have formatted and reinstalled windows pro and still get...
Read more >
Common Microsoft Edge Problems, and How to Fix Them
The error message should have an option to either pop open Internet Explorer or continue with Edge and face potential loading issues.
Read more >
Fix Can't connect securely to this page error on Microsoft Edge
336 views 8 months ago. 336 views • Apr 18, 2022. Microsoft Edge is one of the popular web browsers. It offers users...
Read more >
Microsoft Edge fails on timeout/inactivity error ... - Documentation
When performing a test on Microsoft Edge, it fails with the following timeout error: Session aborted after 5 minutes due to user inactivity....
Read more >
Microsoft Edge
Microsoft Edge is a proprietary, cross-platform web browser created by Microsoft. It was first released in 2015 as part of Windows 10 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found