ERROR crypto is not defined
Resolved 💬 3 comments Opened May 10, 2025 by rossbu Closed Aug 7, 2025
What version of Codex is running?
(research preview) v0.1.2504301751
Which model were you using?
_No response_
What platform is your computer?
macos
What steps can reproduce the bug?
codex "explain this codebase to me"
What is the expected behavior?
simply error with npm 18.x
What do you see instead?
ERROR crypto is not defined
file:///Users/xxxx/.nvm/versions/node/v18.20.7/lib/node_modules/@openai/codex/dist/cli.js:581:1999
Additional information
_No response_
3 Comments
Hello, I also had this bug and I used the wrong NPM Version I think. Try it with NPM 21
@rossbu , In Readme , there is system requirement section and it says
<!DOCTYPE html><head></head>
Node.js | 22 or newer (LTS recommended)
-- | --
Please upgrade to node.js 22 or higher stable version
Thanks for the feedback! Please try using the latest version of Codex CLI. We're focusing on the native/Rust implementation, which may resolve this issue. Let us know if the problem persists!