Description
In these two node version of the same major the icu has been updated from
Icu major 62.1 to 64.2.
[abels@rose node-v10.14.2]$ ./node -e 'console.log(process.versions)'
{ http_parser: '2.8.0',
node: '10.14.2',
v8: '6.8.275.32-node.45',
uv: '1.23.2',
zlib: '1.2.11',
ares: '1.15.0',
modules: '64',
nghttp2: '1.34.0',
napi: '3',
openssl: '1.1.0j',
icu: '62.1',
unicode: '11.0',
cldr: '33.1',
tz: '2018e' }
[abels@rose node-v10.16.2]$ ./node -e 'console.log(process.versions)'
{ http_parser: '2.8.0',
node: '10.16.2',
v8: '6.8.275.32-node.54',
uv: '1.28.0',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.15.0',
modules: '64',
nghttp2: '1.34.0',
napi: '4',
openssl: '1.1.1c',
icu: '64.2',
unicode: '12.1',
cldr: '35.1',
tz: '2019a' }
And this causes no problems in the first place but in a special case the result was very unlikely.
To prevent this I recommend to not update icu major version in the same node release stream. And to check if the icudt64l.dat file is still compatible.
What happened in this very unpleasant special case?
A standard node is compiled and distributed with the small translation set where these dat file is only ~3MB in size. But if you have an application which need the full set you could use this “https://www.npmjs.com/package/full-icu” or compile by your self and extract the “icudt64l.dat”. If you use the right versions to created the “icudt64.dat” everything is working like expected. But if you use the wrong version node not starting at all:
[abels@rose ~]$ nvm use v10.14.2
Now using node v10.14.2 (npm v6.4.1)
[abels@rose ~]$ node --icu-data-dir=/home/abels/.nvm/versions/node/v10.16.2/lib/node_modules/full-icu
node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)
[abels@rose ~]$ node --icu-data-dir=/home/abels/.nvm/versions/node/v10.14.2/lib/node_modules/full-icu
>
[abels@rose ~]$ nvm use v10.16.2
Now using node v10.16.2 (npm v6.9.0)
[abels@rose ~]$ node --icu-data-dir=/home/abels/.nvm/versions/node/v10.14.2/lib/node_modules/full-icu
node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)
[abels@rose ~]$ node --icu-data-dir=/home/abels/.nvm/versions/node/v10.16.2/lib/node_modules/full-icu
>
This not starting behavior is ok if you control the node environment, mean you run your application by a node version chosen from you.
But if you run in an “AWS Lambda” you are not in control of the node version, and than if “AWS” updates the node version which is intendent all your existing lambda with a reference to the fullicu stop working and need a redeployment of a unchanged software. This is not what you expect from any software, during the update a minor version of node.