Skip to content

Windows global npm install misses optional @openai/codex-win32-x64; codex fails to start #12931

Closed

Description

@joelkehle

What version of Codex CLI is running?

codex-cli 0.105.0 (installed globally via npm)

What subscription do you have?

ChatGPT Pro

Which model were you using?

N/A (startup/install issue before normal use)

What platform is your computer?

Windows (PowerShell), x64 Node.js v22.11.0 Global npm prefix/path shown as: C:\home\joelr.npm-global

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

Windows PowerShell (desktop console on Windows)

What issue are you seeing?

After npm install -g @openai/codex@latest on Windows, running codex failed with:

Error: Missing optional dependency @openai/codex-win32-x64. Reinstall Codex: npm install -g @openai/codex@latest

Reinstalling did not fix it, even with optional deps enabled.

Also, trying to install @openai/codex-win32-x64@latest directly gave 404, because it appears to be an npm alias
target, not a standalone package.

What steps can reproduce the bug?

  1. On Windows PowerShell, uninstall globally:
    npm uninstall -g @openai/codex @openai/codex-win32-x64
  2. Install latest:
    npm install -g @openai/codex@latest --include=optional
    codex --version
  3. Observe missing optional dependency error.

What is the expected behavior?

After npm global install on Windows, Codex should automatically include the matching platform binary optional
dependency so '' codex --version ''runs without manual alias installation.

Additional information

Working workaround was to install with explicit alias:
$v = npm view @openai/codex version
npm install -g "@openai/codex@$v" "@openai/codex-win32-x64@npm:@openai/codex@$v-win32-x64"

After workaround:

  • codex --version -> codex-cli 0.105.0
  • npm ls -g --depth=0 @openai/codex @openai/codex-win32-x64 shows both installed.

Activity

  1. added
    bug
    on Feb 26, 2026
  2. added
    CLI
    windows-os
    on Feb 26, 2026
  3. github-actions commented on Feb 26, 2026

    @github-actions
    Contributor
  4. joelkehle commented on Feb 26, 2026

    @joelkehle
    Author

    Closing as duplicate of #11744.

    I can confirm the same Windows global npm install/startup error on codex-cli 0.105.0:
    “Missing optional dependency @openai/codex-win32-x64”.

    Workaround that succeeded for me:
    $v = npm view @openai/codex version
    npm install -g "@openai/codex@$v" "@openai/codex-win32-x64@npm:@openai/codex@$v-win32-x64"

  5. CoolCoolTomato commented on Mar 11, 2026

    @CoolCoolTomato

    it works!

  6. DINGYURS commented on Apr 11, 2026

    @DINGYURS

    This method itself is good, but I found that the latest 0.120.0 version shows "No matching version found for @openai/[email protected]" when executing npm install -g "@openai/codex-win32-x64@npm:@openai/[email protected]".

  7. DINGYURS commented on Apr 11, 2026

    @DINGYURS

    现在我不得不安装 0.119.0 这样可以正常使用
    Now I have to install 0.119.0 so it can be used normally

  8. ydrk12 commented on Apr 11, 2026

    @ydrk12

    现在我不得不安装 0.119.0 这样可以正常使用 Now I have to install 0.119.0 so it can be used normally

    我和你遇到了完全一样的问题,最终的解决方案也是降级。显然openai负责codex更新的员工出了些差错,最好还是等到下个更新再尝试安装吧。要不要提一个新的issue?但总感觉会被判定为重复issue。不过说起来,这么简单的问题能被重复提交这么多次,也可见维护者的疏忽大意。

    I encountered exactly the same problem as you, and the final solution was also to downgrade. Apparently, there was some mistake made by the OpenAI employees responsible for Codex updates. It's probably best to wait until the next update before trying to install it again. Should we file a new issue? But I have a feeling it will be marked as a duplicate. However, considering that such a simple problem can be submitted repeatedly so many times, it shows the carelessness of the maintainers.

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

    CLIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions