globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

Can't resolve 'cldr' in React js app #915

Open florinlazau opened 3 years ago

florinlazau commented 3 years ago

Hello,

I am developing a React JS application and I want to use Globalize.

My package.json:

    "cldr-data": "36.0.0",
    "globalize": "1.6.0",
    "iana-tz-data": "2019.1.0",

I have a basic usage:

var Globalize = require('globalize');

Globalize.load(require('cldr-data').entireSupplemental());
Globalize.load(require('cldr-data').entireMainFor('en', 'es'));

The problem is that I get this error:

./node_modules/globalize/dist/globalize.js
Module not found: Can't resolve 'cldr' in '/proj_path/node_modules/globalize/dist'

Am I doing something wrong?

Thanks, Florin

florinlazau commented 3 years ago

Hey guys,

Any updates here? Any input here would be much appreciated.

Thanks, Florin

konstantinbrazhnik commented 2 years ago

@florinlazau I don't have a fix for this, but setting globalizing back to an older version fixed this for me. For example:

    ...
    "globalize": "^0.1.1"
    ...