Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{ Error: [React Intl Error MISSING_DATA] Missing locale data for locale: "th" in Intl.NumberFormat

Tags:

react-intl

I've checked this source https://formatjs.io/docs/react-intl#runtime-requirements , and tried to add this code

import { NumberFormat } from '@formatjs/intl-numberformat'

NumberFormat.__addLocaleData(
  require('@formatjs/intl-numberformat/dist/locale-data/en.json') // locale-data for en
)

NumberFormat.__addLocaleData(
  require('@formatjs/intl-numberformat/dist/locale-data/th.json') // locale-data for th
)

But it doesn't help, also I've added defaultLocale param :

<IntlProvider defaultLocale={locale}></IntlProvider>

to intl provider , but it also doesn't help. I have 2 languages , for en language I don't get this error , only for th language , what should I do ?

like image 622
Andrey Radkevich Avatar asked Feb 10 '26 20:02

Andrey Radkevich


1 Answers

Try upgrade your Node Version. I had 10 and moved to 14.x: Issue was gone

like image 68
Jan Avatar answered Feb 15 '26 14:02

Jan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!