Skip to content

TypeError: Cannot read properties of undefined (reading 'prototype') npm salesforce/cli #3443

@deReeperJosh

Description

@deReeperJosh

Summary

Currently facing issues running a number of sf commands, both via the command line and using the Salesforce Extension pack in VS Code. I have the Salesforce CLI installed using node/npm, and I have tried using both the latest and nightly versions, however with the commands that are failing I am receiving the following error message in the terminal:

TypeError: Cannot read properties of undefined (reading 'prototype')

When inspecting the log in /.sf, the error seems to stem from the buffer-equal-constant-time node module:

{"level":50,"time":1762172138872,"name":"sf:oclif","msg":"TypeError: Cannot read properties of undefined (reading 'prototype')\n at Object. (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/buffer-equal-constant-time/index.js:37:35)\n at TracingChannel.traceSync (node:diagnostics_channel:328:14)\n at Object. (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/jwa/index.js:1:19)"}

Commands that I have tried to use that produce this output for me include:

  • sf doctor
  • sf org open
  • sf org list
  • sf info releasenotes display
  • sf project generate
  • sf org login web

Steps To Reproduce

Currently unable to generate an sf project, as the sf project generate command produces the error for me

Expected result

Using the latest npm salesforce/cli package, should be able to run commands as expected

Actual result

Error messages displayed when running commands

System Information

Using npm salesforce/cli, MacOS, zsh

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.110.22",
  "nodeVersion": "node-v25.1.0",
  "osVersion": "Darwin 24.6.0",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.37 (core)",
    "@oclif/plugin-commands 4.1.35 (core)",
    "@oclif/plugin-help 6.2.33 (core)",
    "@oclif/plugin-not-found 3.2.70 (core)",
    "@oclif/plugin-plugins 5.4.50 (core)",
    "@oclif/plugin-search 1.2.33 (core)",
    "@oclif/plugin-update 4.7.11 (core)",
    "@oclif/plugin-version 2.2.34 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.50 (core)",
    "@oclif/plugin-which 3.2.41 (core)",
    "@salesforce/cli 2.110.22 (core)",
    "agent 1.24.18 (core)",
    "apex 3.8.3 (core)",
    "api 1.3.3 (core)",
    "auth 3.9.17 (core)",
    "code-analyzer 5.6.1 (user) published 4 days ago (Wed Oct 29 2025)",
    "data 4.0.59 (core)",
    "deploy-retrieve 3.23.8 (core)",
    "info 3.4.93 (core)",
    "limits 3.3.67 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.9.38 (core)",
    "packaging 2.22.0 (core)",
    "schema 3.3.82 (core)",
    "settings 2.4.48 (core)",
    "sobject 1.4.76 (core)",
    "telemetry 3.6.61 (core)",
    "templates 56.3.66 (core)",
    "trust 3.7.113 (core)",
    "user 3.6.38 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.2.1 (user) published 394 days ago (Fri Oct 04 2024)",
    "@salesforce/sfdx-scanner 4.9.0 (user) published 278 days ago (Tue Jan 28 2025) (latest is 4.12.0)"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingWe're actively investigating this issuevalidatedVersion information for this issue has been validated

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions