-
Notifications
You must be signed in to change notification settings - Fork 342
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
using with react-native: SyntaxError: Invalid RegExp: Invalid escape, js engine: hermes #527
Comments
Thanks for reporting this. We had a similar problem with Hermes engine's RegEx in #483. I thought it should have already been fixed in more recent versions. I would need some more time to setup React Native env to debug and fix this. In the meantime, if you do not use those locale, could you try import only English or other locales that you use? See: https://github.com/wanasit/chrono#importing-specific-locales |
Thanks for your reply. I tried this in React Native: |
Do you know which version of Chrono being installed into your project? |
I'm using: "chrono-node": "^2.6.5" |
Is there any fix for this? I am facing this one too. Am I missing something? |
+1 |
If not mistaken, this is due to the use of |
Sorry for my slow response. Please try update to Chrono v2.7.3 (As @elliscwc also mentioned) RegEx patterns in Russian and Ukrainian parsers are not supported by Hermes Engine. I have fixed the issue by switching to lazy-loading/creating RegEx patterns. (Also note that |
Giving the error:
SyntaxError: Invalid RegExp: Invalid escape, js engine: hermes
when parsing simple string:Using latest react-native: 0.72.4
Can be fixed by commenting out "uk", "zh", and "ru" parsers in
./chrono-node/dist/cjs/index.js
The text was updated successfully, but these errors were encountered: