codex - 💡(How to fix) Fix Linux x64 npm install for 0.134.0 is missing platform artifact and CLI fails on startup

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122 throw new Error( ^

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest at file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122:9 at ModuleJob.run (node:internal/modules/esm/module_job:430:25) at async onImport.tracePromise.proto (node:internal/modules/esm/loader:655:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.5.0

Root Cause

The CLI cannot print its own version because it exits before startup completes.

Fix Action

Workaround

Pinning to the previous release appears to avoid the missing artifact:

npm install -g @openai/[email protected] --include=optional

The standalone installer may also avoid this npm optional dependency path.

Code Example

file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122
  throw new Error(
        ^

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
    at file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122:9
    at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:655:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.5.0

---

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
...
Node.js v22.22.2

---

{
  "@openai/codex-linux-x64": "npm:@openai/[email protected]"
}

---

npm view @openai/codex@0.134.0-linux-x64 version name --json

---

npm error code E404
npm error 404 No match found for version 0.134.0-linux-x64

---

0.134.0-darwin-arm64
0.134.0-darwin-x64
0.134.0-linux-arm64
0.134.0-win32-arm64
0.134.0-win32-x64
0.134.0

---

0.134.0-linux-x64

---

nvm use 22
npm uninstall -g @openai/codex
npm install -g @openai/codex@0.134.0
codex --version
# or: codex

---

npm install -g @openai/codex@0.133.0 --include=optional
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

@openai/[email protected]

The CLI cannot print its own version because it exits before startup completes.

What subscription do you have?

N/A - the failure happens before authentication/model selection.

Which model were you using?

N/A

What platform is your computer?

Linux x86_64. Reproduced on an Arch Linux system using nvm-managed Node.js.

What terminal emulator and version are you using (if applicable)?

zsh shell in a terminal. Terminal emulator does not appear relevant.

What issue are you seeing?

After upgrading/installing @openai/[email protected] via npm on Linux x64, codex exits immediately with:

file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122
  throw new Error(
        ^

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
    at file:///home/<user>/.config/nvm/versions/node/v25.5.0/lib/node_modules/@openai/codex/bin/codex.js:122:9
    at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:655:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.5.0

The same startup failure also reproduces after switching to Node.js v22.22.2 with npm v10.9.7:

Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
...
Node.js v22.22.2

This looks like a missing npm platform artifact for the stable 0.134.0 release rather than a local Node version issue.

Registry metadata observed

@openai/[email protected] declares this optional dependency:

{
  "@openai/codex-linux-x64": "npm:@openai/[email protected]"
}

But the target version does not exist in the npm registry:

npm view @openai/[email protected] version name --json

returns:

npm error code E404
npm error 404 No match found for version 0.134.0-linux-x64

Also, the version list contains these 0.134.0 stable platform variants:

0.134.0-darwin-arm64
0.134.0-darwin-x64
0.134.0-linux-arm64
0.134.0-win32-arm64
0.134.0-win32-x64
0.134.0

but it does not include:

0.134.0-linux-x64

Steps to reproduce

nvm use 22
npm uninstall -g @openai/codex
npm install -g @openai/[email protected]
codex --version
# or: codex

Actual behavior

npm reports the install as successful, but the platform optional dependency is not installed. Running codex fails immediately with Missing optional dependency @openai/codex-linux-x64.

Expected behavior

npm install -g @openai/[email protected] on Linux x64 should install a usable platform native package, and codex should start normally.

Workaround

Pinning to the previous release appears to avoid the missing artifact:

npm install -g @openai/[email protected] --include=optional

The standalone installer may also avoid this npm optional dependency path.

Additional context

This resembles earlier Linux x64 optional artifact issues such as #19419, but this report is specifically for the stable 0.134.0 release metadata pointing to a missing 0.134.0-linux-x64 package version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

npm install -g @openai/[email protected] on Linux x64 should install a usable platform native package, and codex should start normally.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Linux x64 npm install for 0.134.0 is missing platform artifact and CLI fails on startup