Skip to content
Myr

Fix Install guide

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent f4cf2bc · Browse files · 2 files+8 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−16 removed

  • other:+8 added−16 removed

2 files+8 added−16 removed

modified:README.md+4 added-8 removed
130 unmodified lines
131```bash132npm install nanoid133```134135Nano ID 5 works only with ESM projects, in tests or Node.js scripts.136For CommonJS you need to use latest Node.js 20 or 22137with `--experimental-require-module`:135Nano ID 5 works with ESM projects (with `import`) in tests or Node.js scripts.136For CommonJS `require()` you need to use latest Node.js 22.12137(works out-of-the-box) or Node.js 20 (with `--experimental-require-module`):138139```bash140node --experimental-require-module app.js141```139For Node.js 18 you can use Nano ID 3.x (we still support it):140143Or you can use Nano ID 3.x (we still support it):144141```bash142npm install nanoid@3143```144
306 unmodified lines
modified:README.ru.md+4 added-8 removed
137 unmodified lines
138```bash139npm install nanoid140```141142Nano ID 5 работает только с ESM-проектами, в тестах или скриптах для Node.js.143Для CommonJS вам нужна последняя версия Node.js 20 или 22144с флагом `--experimental-require-module`:142Nano ID 5 работает с ESM-проектами (`import`) в тестах или скриптах для Node.js.143Для CommonJS `require()` вам нужна последняя версия Node.js 22.12144(работает из коробки) или Node.js 20 (с флагом `--experimental-require-module`):145146```bash147node --experimental-require-module app.js148```146Для Node.js 18 возьмите Nano ID 3.x (мы его всё ещё поддерживаем):147150Или возьмите Nano ID 3.x (мы его всё ещё поддерживаем):151148```bash149npm install nanoid@3150```151
276 unmodified lines