Skip to content

How can I enable full ICU support with Vercel?

Full ICU is a library that enables internationalization (i18n) in Node.js projects. Node 14 has been released with full ICU by default, and it is planned to reach LTS (Long-term Support) in October 2020. In this article, we show you how to use full ICU with Vercel builds for Node 12.x and 10.x.

Enabling full-icu on Vercel

First, you need to install the full-icu package. You can do that by running either of the following commands:

1
yarn add full-icu
2
Installing the full-icu package with Yarn.
1
npm install full-icu
Installing the full-icu package with npm.

After the full-icu dependency is installed, you need to adjust the build command in your Project's settings to include the NODE_ICU_DATA variable:

1
NODE_ICU_DATA=node_modules/full-icu <build_command>
Using "NODE_ICU_DATA" to enable full-icu in a project.

As an example, the build command for a Next.js project would be:

1
NODE_ICU_DATA=node_modules/full-icu next build
Using "NODE_ICU_DATA" to enable full-icu in a Next.js project.

Couldn't find the guide you need?