Skip to content
Myr

Add Node.js 20 support

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 bacb11b · Browse files · 2 files+4 added−2 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+4 added−2 removed

  • other:+4 added−2 removed

2 files+4 added−2 removed

modified:README.md+2 added-1 removed
131 unmodified lines
132npm install nanoid133```134135Nano ID 5 works only with ESM projects, in tests or Node.js scripts.136For CommonJS you need to use Node.js 22 with `--experimental-require-module`:136For CommonJS you need to use latest Node.js 20 or 22137with `--experimental-require-module`:138139```bash140node --experimental-require-module app.js141```
313 unmodified lines
modified:README.ru.md+2 added-1 removed
138 unmodified lines
139npm install nanoid140```141142Nano ID 5 работает только с ESM-проектами, в тестах или скриптах для Node.js.143Для CommonJS вам нужна Node.js 22 с флагом `--experimental-require-module`:143Для CommonJS вам нужна последняя версия Node.js 20 или 22144с флагом `--experimental-require-module`:145146```bash147node --experimental-require-module app.js148```
283 unmodified lines