Error when importing pluralRuleParser in the latest version (v1.5.0)
I'm trying to upgrade cldrpluralruleparser to v1.5.0 but the project is crashing.
If I import it like this: import pluralRuleParser from 'cldrpluralruleparser'; I have the following error (see the screenshot):
But if I import it from my node_modules everything works fine: import pluralRuleParser from '../node_modules/cldrpluralruleparser/src/CLDRPluralRuleParser';.
I have this issue only with v1.5.0 with node v20.6.0, with v1.4.0 everything works fine.
Please advise! Thanks!
Hi,
I may need more info to reproduce the issue.
Please have a look at https://codepen.io/santhoshtr/pen/RwvRaaX for a working example in browser
And please take a look at https://codesandbox.io/s/crazy-cerf-m4m4fk for a sample project that use this module with parcel.
I am also attaching a zip file containing a package.json with dependency to "cldrpluralruleparser": "^1.5.0", then an index.js file with content
import parser from 'cldrpluralruleparser';
console.log(parser('v = 0 and n != 0..10 and n % 10 = 0', 20));
And I run
santhosh@carbon9 ~/tmp/cldrparsetest nvm use --lts
Now using node v20.9.0 (npm v10.1.0) /0.5s
santhosh@carbon9 ~/tmp/cldrparsetest node index.js
true
It is working.
Please let me know how different is your project. Thanks!