We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 835eb77 commit a86270fCopy full SHA for a86270f
codex-cli/src/cli.tsx
@@ -1,6 +1,19 @@
1
#!/usr/bin/env node
2
import "dotenv/config";
3
4
+// Exit early if on an older version of Node.js (< 22)
5
+const major = process.versions.node.split(".").map(Number)[0]!;
6
+if (major < 22) {
7
+ // eslint-disable-next-line no-console
8
+ console.error(
9
+ "\n" +
10
+ "Codex CLI requires Node.js version 22 or newer.\n" +
11
+ `You are running Node.js v${process.versions.node}.\n` +
12
+ "Please upgrade Node.js: https://nodejs.org/en/download/\n",
13
+ );
14
+ process.exit(1);
15
+}
16
+
17
// Hack to suppress deprecation warnings (punycode)
18
// eslint-disable-next-line @typescript-eslint/no-explicit-any
19
(process as any).noDeprecation = true;
0 commit comments