Registry / serialization / full-icu

full-icu

JSON →
library1.5.0jsnpmunverified

The `full-icu` package, currently at version 1.5.0, provides a utility for Node.js environments configured with `small-icu` to enable full International Components for Unicode (ICU) data at runtime. This module became significantly less critical with Node.js 13 and later, which default to full ICU data, rendering `full-icu` largely unnecessary for modern applications unless using a custom Node.js build explicitly set to `small-icu`. Its release cadence is irregular, typically tied to maintenance or updates related to Node.js's ICU integration. Unlike other internationalization libraries, `full-icu` does not introduce new APIs; instead, it focuses solely on providing the underlying data necessary for Node.js's built-in `Intl` object to function with all locales, downloading it from GitHub releases or optionally the `icu4c-data` npm package. Its primary differentiator is simplifying the process of obtaining full ICU data without requiring a custom Node.js build, making it a tool primarily for specific legacy or specialized Node.js configurations.

npm install full-icu
INSTALL
IMPORT
SIG · FULL-ICU
F
full-icu
serializationjavascriptv1.5.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

full-icu metadata object
✓ const fullIcuMetadata = require('full-icu');
✗ import fullIcuMetadata from 'full-icu';
This package primarily relies on its postinstall script for side-effects (installing ICU data) rather than imported functions. The `require` call returns an object containing Node.js and ICU version metadata, not a functional API. There are no named exports for direct import.
node-full-icu-path CLI
✓ npx node-full-icu-path
✗ import { nodeFullIcuPath } from 'full-icu';
This is a command-line utility installed by the package, not an importable JavaScript symbol. It prints the file system path to the installed `icudt*.dat` file.

This quickstart first verifies if a Node.js environment is configured with 'small-icu', then demonstrates how to use the `full-icu` package to retrieve its metadata and the path to the installed ICU data file after installation.

import { execSync } from 'node:child_process'; // Step 1: Check if your Node.js build uses 'small-icu' const isSmallIcu = execSync('node -p "process.config.variables.icu_small"', { encoding: 'utf8' }).trim() === 'true'; if (isSmallIcu) { console.log('Your Node.js is built with small-icu. `full-icu` is relevant.'); console.log('To proceed, first install the package: npm install full-icu'); // Step 2: After `npm install full-icu` has completed successfully, // you can require the package to get metadata and find the data path. try { const fullIcu = require('full-icu'); console.log('\n--- full-icu metadata ---\n', fullIcu); const icuDataPath = execSync('node-full-icu-path', { encoding: 'utf8' }).trim(); console.log('\n--- Full ICU data path ---\n', icuDataPath); console.log('\nTo activate the data, ensure your Node.js instance is started with the --icu-data-dir flag pointing to this path, or set NODE_ICU_DATA.'); } catch (error) { console.error('\nError: Failed to retrieve full-icu metadata or path. Ensure `full-icu` is installed and its postinstall script ran successfully.', error.message); } } else { console.log('Your Node.js is built with full ICU. The `full-icu` package is not needed and will not have any useful effect.'); }
Debug
Known issues
gotchaThe `full-icu` package is generally not needed for Node.js versions 13 and later, as these versions ship with full ICU data by default. Using it on such versions will have no functional effect, though it is harmless.
fix
Before installing, check `node -p 'process.config.variables.icu_small'` to see if your Node.js version is built with 'small-icu'. If it returns `false`, `full-icu` is not required.
affects: >=13.0.0
gotchaThe package relies on a `postinstall` script to download and place the ICU data files. This script might fail due to network issues, restrictive environments, or if `npm` is configured to ignore `postinstall` scripts, leading to incomplete installation.
fix
Ensure `npm install` is run in an environment with network access and permissions to write files. Check `npm config get ignore-scripts` to ensure it's not set to `true`. Manual data placement or using the `FULL_ICU_PREFER_NPM=true` environment variable might be necessary if GitHub downloads are blocked.
affects: >=1.0.0
gotchaAs of v1.4.0, `full-icu` changed its default behavior to pull ICU data files directly from ICU's GitHub releases instead of the `icu4c-data` npm module. While providing an environment variable (`FULL_ICU_PREFER_NPM=true`) to revert to the old behavior, this change might affect build pipelines or environments with strict GitHub access policies.
fix
If experiencing download issues or requiring data from the `icu4c-data` npm package, set the environment variable `FULL_ICU_PREFER_NPM=true` before running `npm install full-icu`.
affects: >=1.4.0
Errors
Common errors & fixes
Error: Cannot find module 'full-icu'
The package was not installed, or `npm install` failed to complete successfully, or the Node.js process cannot resolve the module path.
fix
Run `npm install full-icu` to ensure the package is installed. Verify the `node_modules` directory is correctly configured and accessible by your Node.js application.
Command failed: node-full-icu-path
The `node-full-icu-path` binary could not be found or executed, usually because the `postinstall` script failed to set up the ICU data, or the `full-icu` package was not fully installed.
fix
Re-run `npm install full-icu`. Check the install logs for any errors related to the `postinstall` script. Ensure `npm`'s `bin` directory is in your PATH if running directly, or use `npx node-full-icu-path`.
Node.js built with full ICU. `full-icu` is not needed and will not have any useful effect.
This is not an error but a common user misapprehension. The user's Node.js version (typically Node.js 13 or newer) already includes full ICU data, rendering `full-icu` redundant.
fix
No fix required, as the package is not needed. If you are on an older Node.js version and still see this, verify your Node.js build configuration by checking `node -p 'process.config.variables.icu_small'`.
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
full-icu — npm install full-icu · libregistry