Running ./scripts/dev.sh on Node.js 22.9.0 causes the frontend dev server to crash on startup, while the backend starts fine.
Error:
[FRONTEND] You are using Node.js 22.9.0. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
[FRONTEND] failed to load config from .../app/vite.config.ts
[FRONTEND] Error [ERR_REQUIRE_ESM]: require() of ES Module .../node_modules/@vitejs/plugin-react/dist/index.js from .../vite.config.ts not supported.
[FRONTEND] error: "vite" exited with code 1
Cause: Vite requires Node 20.19+ or 22.12+. On unsupported versions (e.g. 22.9.0), Vite's config loader falls back to a CommonJS path that can't require() @vitejs/plugin-react, which ships ESM-only.
Ask:
- Add the Node version requirement to the README/setup docs as a prerequisite
- Consider adding an .nvmrc / engines field in package.json so this is enforced/surfaced early
- Optionally, have dev.sh check the Node version up front and fail fast with a clear message instead of letting the frontend crash silently into an ESM error
Repro: Node 22.9.0, running ./scripts/dev.sh from a clean clone.
Running
./scripts/dev.shon Node.js 22.9.0 causes the frontend dev server to crash on startup, while the backend starts fine.Error:
[FRONTEND] You are using Node.js 22.9.0. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
[FRONTEND] failed to load config from .../app/vite.config.ts
[FRONTEND] Error [ERR_REQUIRE_ESM]: require() of ES Module .../node_modules/@vitejs/plugin-react/dist/index.js from .../vite.config.ts not supported.
[FRONTEND] error: "vite" exited with code 1
Cause: Vite requires Node 20.19+ or 22.12+. On unsupported versions (e.g. 22.9.0), Vite's config loader falls back to a CommonJS path that can't require() @vitejs/plugin-react, which ships ESM-only.
Ask:
Repro: Node 22.9.0, running ./scripts/dev.sh from a clean clone.