cli icon indicating copy to clipboard operation
cli copied to clipboard

Plugins cannot be installed in node v25.0.0

Open jfeingold35 opened this issue 2 months ago • 5 comments

Note Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

No plugins can be installed when using node v25.0.0

Steps To Reproduce

  1. Install node v25.0.0
  2. Install Salesforce CLI npm install --global @salesforce/cli
  3. Attempt to install a plugin sf plugins install code-analyzer

IMPORTANT Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue. We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

[!TIP] use sf doctor --create-issue to automatically fill the required information

Expected result

Installation succeeds

Actual result

Installation fails.

TypeError: Class extends value undefined is not a constructor or null

Additional information

It looks like what's happening is that @salesforce/sf-plugins-core's SfCommandError extends SfError, but the index.js file in @salesforce/core somehow silently fails before it can successfully export SfError, leading to the export being undefined. This was determined through aggressive console.log debugging.

System Information

I am using zsh on MacOS 14.8.1.

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.109.6",
  "nodeVersion": "node-v25.0.0",
  "osVersion": "Darwin 23.6.0",
  "rootPath": "/Users/jfeingold/.nvm/versions/node/v25.0.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.35 (core)",
    "@oclif/plugin-commands 4.1.33 (core)",
    "@oclif/plugin-help 6.2.33 (core)",
    "@oclif/plugin-not-found 3.2.68 (core)",
    "@oclif/plugin-plugins 5.4.48 (core)",
    "@oclif/plugin-search 1.2.32 (core)",
    "@oclif/plugin-update 4.7.8 (core)",
    "@oclif/plugin-version 2.2.33 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.48 (core)",
    "@oclif/plugin-which 3.2.40 (core)",
    "@salesforce/cli 2.109.6 (core)",
    "agent 1.24.13 (core)",
    "apex 3.8.3 (core)",
    "api 1.3.3 (core)",
    "auth 3.9.9 (core)",
    "data 4.0.58 (core)",
    "deploy-retrieve 3.23.3 (core)",
    "dev 2.5.1 (user) published 337 days ago (Tue Nov 19 2024)",
    "info 3.4.88 (core)",
    "limits 3.3.67 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.9.32 (core)",
    "packaging 2.20.5 (core)",
    "schema 3.3.82 (core)",
    "settings 2.4.48 (core)",
    "sobject 1.4.73 (core)",
    "telemetry 3.6.58 (core)",
    "templates 56.3.65 (core)",
    "trust 3.7.113 (core)",
    "user 3.6.38 (core)"
  ]
}

jfeingold35 avatar Oct 22 '25 19:10 jfeingold35

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

github-actions[bot] avatar Oct 22 '25 19:10 github-actions[bot]

Hi @jfeingold35, currently we are not support node v25 yet. But we guarantee the CLI works with the current node LTS version (v22 now).

soridalac avatar Oct 22 '25 19:10 soridalac

for future reference:

on latest node v25 (v25.1.0 as of today), we get this error:

➜  ~ sf plugins install code-analyzer
    TypeError: Cannot read properties of undefined (reading 'prototype')

it's an issue in a transient dependnecy: jsonwebtoken > jws > jwa > buffer-equal-constant-time

once jsonwebtoken drops usage of the deprecated core node modules then we should be good: https://github.com/auth0/node-jsonwebtoken/issues/992

cristiand391 avatar Nov 11 '25 20:11 cristiand391

I just encountered this issue myself on a fresh linux install with the latest Node.js v25.1.0

loganm avatar Nov 12 '25 10:11 loganm

@loganm we suggest staying on LTS for stability, see node releases: https://nodejs.org/en/about/previous-releases

cristiand391 avatar Nov 12 '25 17:11 cristiand391

Experimentation indicates that this issue seems to be resolved.

jfeingold35 avatar Dec 19 '25 15:12 jfeingold35