Skip to content

Linux x64 npm install for 0.134.0 is missing platform artifact and CLI fails on startup #24672

Closed

Description

@vimalinx

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.

Activity

  1. added
    bug
    CLI
    on May 27, 2026
  2. etraut-openai commented on May 27, 2026

    @etraut-openai
    Contributor

    It takes a few minutes for all of the packages to upload to npm. If you install when only some packages have been uploaded, you'll see this error. If you wait a few minutes and try again, the problem should go away. Let us know if you continue to see the problem.

  3. fxjs commented on May 27, 2026

    @fxjs

    +1, reproduced on Arch Linux x86_64 with pnpm 10.26.1 and Node.js v24.14.0.

    Same Missing optional dependency @openai/codex-linux-x64 error from @openai/[email protected]. Confirmed via npm view that only 0.134.0-linux-x64 is missing from the registry — the other 5 platform packages (linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64) all exist for 0.134.0.

    $ for p in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64 win32-arm64; do
        npm view "@openai/[email protected]\$p" version 2>&1 | tail -1
      done
    # linux-x64:   404 (missing)
    # linux-arm64: 0.134.0-linux-arm64  ✓
    # darwin-x64:  0.134.0-darwin-x64   ✓
    # darwin-arm64:0.134.0-darwin-arm64 ✓
    # win32-x64:   0.134.0-win32-x64    ✓
    # win32-arm64: 0.134.0-win32-arm64  ✓

    Workaround pnpm add -g @openai/[email protected] works fine.

    Looks like the Linux x64 publish step in the 0.134.0 release pipeline failed silently.

  4. Liuyh0308 commented on May 28, 2026

    @Liuyh0308

    Same problem on Linux x86_64, Node.js v20.20.0.

    file:///root/.nvm/versions/node/v20.20.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:///root/.nvm/versions/node/v20.20.0/lib/node_modules/@openai/codex/bin/codex.js:122:9
        at ModuleJob.run (node:internal/modules/esm/module_job:325:25)
        at async ModuleLoader.import (node:internal/modules/esm/loader:606:24)
        at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
    
    Node.js v20.20.0
    
  5. hanzlahabib commented on Jun 18, 2026

    @hanzlahabib

    Still reproduces on 0.140.0 after a clean npm install -g @openai/codex@latest.

    Env: codex 0.140.0 · Node v24.7.0 · npm 11.5.1 · Linux x86_64 (WSL2 / Ubuntu) · glibc 2.31 · process.platform=linux, process.arch=x64

    Error: Missing optional dependency @openai/codex-linux-x64. Reinstall Codex: npm install -g @openai/codex@latest
        at findCodexExecutable (.../@openai/codex/bin/codex.js:102:9)
    

    Root cause (the platform package is installed but malformed):
    The optional dep is present at …/@openai/codex/node_modules/@openai/codex-linux-x64/, but:

    1. No package.json at the package root — the dir contains only a vendor/ folder. So findCodexExecutable's package resolution fails and reports it as "missing" even though the folder exists.
    2. It ships the musl binary inside the glibc (-linux-x64) package. The only binary present is:
      @openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex
      
      i.e. the musl artifact is published under the package name that should carry the glibc x64 build.

    find output:

    @openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex
    @openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources/bwrap
    

    (252 MB installed across the 6 platform optional-deps; @openai/codex-linux-x64 resolves via npm:@openai/[email protected].)

    So on glibc Linux x64 the CLI never finds a runnable binary. Looks like a packaging/publish issue for the 0.140.0-linux-x64 artifact (missing root package.json + wrong libc variant), not a user install problem.

  6. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Thanks for reporting this and for checking the registry. The specific 0.134.0-linux-x64 version and its tarball are now available. We are closing this release-specific report and keeping the ongoing publication-order problem in #51745. The 0.140.0 comment about a present but malformed package is a different failure; if that still occurs, please report the current version, exact package contents and install output separately so it can be investigated on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions