5

I ran into issues when I turned on hermes in my app. Specifically with Intl support, I'm getting this error in Android ReferenceError: Property 'Intl' doesn't exist, js engine: hermes.

I've read these posts already

But I can't get this to work. Have anyone applied these solutions succesfully or got this to work with another appoach?

React Native 0.63.3

1

1 Answer 1

11

For those who have the same problem. I've posted the same on reddit.

I was finally able to get intl to work updating react native from 0.63.3 to 0.64.1 and installing the polyfills from @formatjs and import them in index.js in the order shown in the graph

3
  • And something about how to handle dynamic imports in react native: github.com/facebook/metro/issues/52
    – Simon
    Commented Aug 15, 2022 at 20:18
  • Thanks, this helped me. While also mentioned by Saul, importing them in the correct order means that you have to look at the requirements of your required polyfill, and including those imports above the import that you need. In my case that looked like this: import "@formatjs/intl-getcanonicallocales/polyfill"; import "@formatjs/intl-locale/polyfill"; import "@formatjs/intl-displaynames/polyfill"; import "@formatjs/intl-displaynames/locale-data/en";
    – visscher
    Commented May 19, 2023 at 11:32
  • Thank you for mentioning the import order from the graph, we had an error "Property 'Intl' doesn't exist" on iOS devices because we were importing numberformat before pluralrules.
    – aquinq
    Commented Oct 26, 2023 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.