Commit 6b72db1
chore: enforce Node 24 for local dev (#345)
The vite-plugin build (`tsdown`) fails on Node < 24 with
`Failed to import module "unrun"`. tsdown 0.22.0 selects its config-file
loader at runtime: Node 24 exposes native TS stripping
(`process.features.typescript`), so it uses the "native" loader; on older
Node it falls back to "unrun", which tsdown does not declare as a
dependency. CI runs on Node 24 (engines.node: "24.x") so it passes there;
only local dev on Node 22 broke.
Align local dev with the already-declared/CI Node version rather than
working around it:
- Add .nvmrc (24) so `nvm use`/`nvm install` selects the right version.
- Set engineStrict: true in pnpm-workspace.yaml so `pnpm install` fails
fast with a clear ERR_PNPM_UNSUPPORTED_ENGINE message instead of the
cryptic downstream `unrun` error. (pnpm 11 reads config from
pnpm-workspace.yaml in this repo, matching the existing camelCase keys.)
- Document the Node 24 prerequisite in README.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7ffdd9c commit 6b72db1
3 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
0 commit comments