节点:无法初始化 ICU(检查 NODE_ICU_DATA 或 --icu-data-dir 参数) [英] node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)
问题描述
我试图将 CI 环境中的节点版本从节点 6 升级到节点 8.我也更新了完整的 icu 版本.
I was trying to upgrade node version on our CI environment from node 6 to node 8. I updated the full-icu version as well.
$NODE_ICU_DATA
设置为 /usr/lib/node_modules/full-icu
但仍然出现此错误
node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)
知道如何解决这个问题吗?
Any idea, how to fix this?
推荐答案
您需要运行 npm install
包括 full-icu
包.full-icu
的安装后步骤为当前正在执行的节点下载适当的位.请注意,full-icu
目录中可能会出现多个文件,没关系.
You need to run npm install
including the full-icu
package. It's full-icu
's postinstall step which downloads the appropriate bits for the currently executing node. Note that multiple files may show up in the full-icu
directory, that's OK.
如果您已经安装了 full-icu
,但中间升级了 Node.js:
If you already had full-icu
installed, but upgraded Node.js in between:
npm rebuild
解决问题.
这篇关于节点:无法初始化 ICU(检查 NODE_ICU_DATA 或 --icu-data-dir 参数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!