nodejs / full-icu-npm

convenience loader for 'small-icu' node builds
https://nodejs.org/api/intl.html#intl_providing_icu_data_at_runtime
Other
152 stars 31 forks source link

Install for specific node version? #27

Closed pietrovismara closed 5 years ago

pietrovismara commented 5 years ago

I'm trying to deploy on AWS Lambda a node.js package containing full-icu.

On my development machine i have node v10.14.2 but on Lambda node version is v8.10. I believe this brings me to the error could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters), since the icudt*.dat file will be for a different node version.

Is there a way to force full-icu to install the dat file for a specific node version?

pietrovismara commented 5 years ago

Using npx seems to be working for me:

npx -p node@8.10 npm i full-icu

Replace 8.10 with your target version.