You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Missing optional dependency @openai/codex-win32-x64 on Windows (v0.124) #19243
npm view @openai/[email protected] version
npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm.
0.123.0-win32-x64
npmview @openai/[email protected] version
npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm.
npm error code E404
npm error 404 No match found for version 0.124.0-win32-x64
npm error 404
npm error 404 The requested resource '@openai/[email protected]' could not be found or you do not have permission to access it.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in
I encountered the same problem, also with version 0.124.0. However, the difference is that I used volta install @openai/codex and my Node.js version was 25.6.0. Version 0.123.0 did not have this problem.
It checks whether the Codex npm release and its platform packages are actually available before install. It only catches npm publishing/registry problems, not runtime bugs after install.
file:///C:/Users/XXXX/AppData/Roaming/npm/node_modules/@openai/codex/bin/codex.js:107
throw new Error(
^ Error: Missing optional dependency @openai/codex-win32-x64. Reinstall Codex: npm install -g @openai/codex@latest
at findCodexExecutable (file:///C:/Users/giorg/AppData/Roaming/npm/node_modules/@openai/codex/bin/codex.js:107:9)
at file:///C:/Users/giorg/AppData/Roaming/npm/node_modules/@openai/codex/bin/codex.js:112:20
at ModuleJob.run (node:internal/modules/esm/module_job:439:25)
at async node:internal/modules/esm/loader:633:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Node.js v24.17.0
Node version v24.17.0
NPM version 12.2.0
Windows version
>Get-ComputerInfo|Select-Object OsName, OSDisplayVersion, OsBuildNumber
OsName OSDisplayVersion OsBuildNumber
-----------------------------------
Microsoft Windows 11 Home Single Language 26300
Probably for you, the command npm install -g @openai/[email protected] work perfectly because I had connection issues from my Internet Provider.
Errors
Installation with npm reported 2 errors, missing administrative privileges and error connection
PS C:\Windows\System32> npm install -g @openai/codex@0.160.0-win32-x64 npm warn cleanup Failed to remove some directories [ npmwarncleanup [
npmwarncleanup'\\\\?\\C:\\Users\\XXX\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex',npmwarncleanup [Error: EPERM: operationnotpermitted,rmdir'C:\Users\giorg\AppData\Roaming\npm\node_modules\@openai\codex\vendor\x86_64-pc-windows-msvc\bin'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\\Users\\XXX\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\vendor\\x86_64-pc-windows-msvc\\bin'
npm warn cleanup }
npmwarncleanup ]
npmwarncleanup ]
npm error code ECONNRESET
npm error syscall read
npm error errno -4077
npm error network read ECONNRESET
npm error network This is a problem related to network connectivity. npm error network In most cases you are behind a proxy or have bad network settings. npm error network
npm error network If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help config' npm error A complete log of this run can be found in: C:\Users\XXX\AppData\Local\npm-cache\_logs\2026-10-04T05_01_18_794Z-debug-0.log
After cleaning the directory with npm prune and manually (was already empty), the error is the connection lost
npm error code ECONNRESET
npm error syscall read
npm error errno -4077
npm error network read ECONNRESET
npm error network This is a problem related to network connectivity. npm error network In most cases you are behind a proxy or have bad network settings. npm error network
npm error network If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help config' npm error A complete log of this run can be found in: C:\Users\XXX\AppData\Local\npm-cache\_logs\.....log
Opening the log file was evident my connection errors.
20 http cache @openai/codex@https://registry.npmjs.org/@openai/codex/-/codex-0.160.0-win32-x64.tgz 0ms (cache hit)
21 silly tarball no local data for @openai/codex@https://registry.npmjs.org/@openai/codex/-/codex-0.160.0-win32-x64.tgz. Extracting by manifest.
22 verbose stack Error: read ECONNRESET
22 verbose stack at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)
23 error code ECONNRESET
24 error syscall read
25 error errno -4077
26 error network read ECONNRESET
27 error network This is a problem related to network connectivity.
27 error network In most cases you are behind a proxy or have bad network settings.
27 error network
27 error network If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help config'
Activity
github-actions commentedon Apr 24, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
yujianfeikong commentedon Apr 24, 2026
I also encountered the same issue:
Error: Missing optional dependency @openai/codex-darwin-x64. Reinstall Codex: npm install -g @openai/codex@latestBut version 0.123.0 is normal
imdoge commentedon Apr 24, 2026
KISS-GG commentedon Apr 24, 2026
same error.
use node24.
but node22 is all ok.
davidchen27 commentedon Apr 24, 2026
I encountered the same problem, also with version 0.124.0. However, the difference is that I used
volta install @openai/codexand my Node.js version was 25.6.0. Version 0.123.0 did not have this problem.FelixWardUS commentedon Apr 26, 2026
I hit this kind of Codex npm install/update problem a few times too, so I made a small pre-check tool:
https://github.com/FelixWardUS/codex-npm-check
You can try it before updating:
It checks whether the Codex npm release and its platform packages are actually available before install. It only catches npm publishing/registry problems, not runtime bugs after install.
kallsu commentedon Oct 4, 2026
Command run:
npm install -g @openai/codex@latestError:
Node version
v24.17.0NPM version
12.2.0Windows version
Tentative:
Solution
tgzfromregistry.npmjs.org0.16.0-win32-x64
npm install -g <PATH_OF_MY_PC>\codex-0.160.0-win32-x64.tgzC:\User\XXXX\AppData\Roaming\npmC:\User\XXXX\AppData\Local\Program\CodexC:\Users\giorg\.codex\packages\standalone\current\binI recreated the folder
currentusingEnjoy
Probably for you, the command
npm install -g @openai/[email protected]work perfectly because I had connection issues from my Internet Provider.Errors
npmreported 2 errors, missing administrative privileges and error connectionnpm pruneand manually (was already empty), the error is the connection lost