ERR node path_encoding ai_generated true

npm ERR! ENOENT — npm install fails in directory with Korean or CJK characters

ID: node/npm-install-unicode-path-failure

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
4Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
20 active

Root Cause

npm install fails or produces corrupted node_modules when the project directory contains Korean/CJK characters in its path.

generic

Workarounds

  1. 92% success Move project to an ASCII-only path or create a symlink from an ASCII path
    ln -s /home/user/프로젝트 /home/user/project && cd /home/user/project && npm install

    Sources: https://docs.npmjs.com/common-errors

  2. 88% success Set system locale to UTF-8 and use Node.js with --icu-data-dir for full ICU support
    export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; npm install

    Sources: https://nodejs.org/api/intl.html

Dead Ends

Common approaches that don't work:

  1. Downgrade npm version 80% fail

    Path encoding handling is an OS/filesystem issue, not npm-version-specific

  2. Use --legacy-peer-deps flag 90% fail

    Flag is for dependency resolution conflicts, not path encoding issues