crypto is not defined

Resolved 💬 2 comments Opened Apr 23, 2025 by WASasquatch Closed Apr 23, 2025

What version of Codex is running?

0.1.2504221401

Which model were you using?

Not able to

What platform is your computer?

Windows 11 - WSL2 Ubuntu 24.04

What steps can reproduce the bug?

Try to run Codex after updating

What is the expected behavior?

Can run, and use Codex

What do you see instead?

Initializing agent…

  ERROR  crypto is not defined

 file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:559:1997

 -  (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:559:1997)
 - q1 (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:112:27794)
 - j_e (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:125:13602)
 - K_e (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:125:13345)
 - $_e (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:125:13251)
 - W_e (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:125:13127)
 - qAe (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:129:11814)
 - nd (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:129:11468)
 -  (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:129:10560)
 - ye (file:///home/was/.nvm/versions/node/v18.20.8/lib/node_modules/@openai/codex/dist/cli.js:26:15387)

Additional information

If this is the crypto@1.0.1 package for npm, it's deprecated and built-in node module now -- and if installed, doesn't fix the issue.

Sorry, I am a little new to NPM tbh. I hate modern FE development.

View original on GitHub ↗

2 Comments

gasin · 1 year ago

I experienced the same issue, and updating to the latest version of Node resolved it

See: https://github.com/openai/codex?tab=readme-ov-file#system-requirements

WASasquatch · 1 year ago
I experienced the same issue, and updating to the latest version of Node resolved it See: https://github.com/openai/codex?tab=readme-ov-file#system-requirements

That did the trick! Man swear I just updated to 21 for codex haha

Thanks a lot!