Salesforce CLI TypeError with node v. 25.1.0

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.

Published by

lekkim

Positive, competent, out-spoken, frank and customer focused architect and developer with a strong foundation in web, cloud and product development. I'm a strong advocate for API first and cloud based solutions and development. I have a knack for being able to communicate and present technically complicated matters in conference, customer and training settings. I've previously acted as team member and leader in a product organisation.

Leave a Reply

Your email address will not be published. Required fields are marked *