Skip to content

Commit

Permalink
Add Node.js 20 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 21, 2024
1 parent bacb11b commit 423b229
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ npm install nanoid
```

Nano ID 5 works only with ESM projects, in tests or Node.js scripts.
For CommonJS you need to use Node.js 22 with `--experimental-require-module`:
For CommonJS you need to use latest Node.js 20 or 22
with `--experimental-require-module`:

```bash
node --experimental-require-module app.js
Expand Down
3 changes: 2 additions & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ npm install nanoid
```

Nano ID 5 работает только с ESM-проектами, в тестах или скриптах для Node.js.
Для CommonJS вам нужна Node.js 22 с флагом `--experimental-require-module`:
Для CommonJS вам нужна последняя версия Node.js 20 или 22
с флагом `--experimental-require-module`:

```bash
node --experimental-require-module app.js
Expand Down

0 comments on commit 423b229

Please sign in to comment.