This morning I kept getting "TypeError: Cannot read properties of undefined (reading 'prototype')" when trying to run any command with the Salesforce CLI. The version of node currently used is listed when you run a sf --version like below.
sf --version
@salesforce/cli/2.110.22 darwin-arm64 node-v25.1.0
After a bit back and forth the solution was to downgrade node.js from v. 25.1.0 to v. 24. I’m using homebrew so installing v. 24, and making the Salesforce CLI use it, was pretty straight forward once I knew (the brew link is required as npm will most likely use the newest version).
brew install node@24
brew link node@24 --overwrite
Once installed, run sf --version and it should show v. 24 like so.
sf --version
@salesforce/cli/2.110.22 darwin-arm64 node-v24.11.0
Once this was done the Salesforce CLI commands works just fine.