Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG][vscode-extension] Code Analyzer can't find SF CLI

未关闭
#1,893 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript, vscode
领域
cli, devtools

调研方向

首先按照列出的步骤重现问题,并比较正常启动的 VS Code 与从终端启动的 VS Code。调查扩展如何发现已安装的 sf CLI,然后验证在受影响的 macOS 设置中,已安装的 CLI 能够被找到,且不会出现 CLI 缺失的错误提示。

由索引模型根据 Issue 内容生成。

描述

BUG P2
Bug Description

We have had multiple reports of users who have the Salesforce CLI installed receiving an error message informing them they do not have the CLI installed, such as: "To use the Salesforce Code Analyzer extension, first install Salesforce CLI."

This can occur for a few reasons, but the root cause is that sf is not appearing in the PATH of the running VS Code instance. This tends to affect mac users when you have installed outside of the recommended CLI steps. We are currently looking into a fix for this.

Steps To Reproduce
  1. Open the Code Analyzer VS Code Extension
  2. See an error message that the CLI is not installed, preventing use.
Expected Behavior

If I have the SF CLI installed, Code Analyzer should be able to find it

Operating System

All

Visual Studio Code Version

Latest

Extension Version

1.10.1

Salesforce CLI Version

2.104.6

Code Analyzer CLI Plugin Version

5.4.0

Additional Context (Screenshots, Files, etc)
Image
Workaround

Open VS Code using the terminal to ensure the sf is located in the path of your VS Code application. Re-install the CLI using the recommended steps. Do not use homebrew, or install SF with the assistance of sudo.

Urgency

Moderate

主要语言
TypeScript
星标
241
派生
51
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

forcedotcom/code-analyzer 的其他 Issue

查看 forcedotcom/code-analyzer 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。