Slack init command doesn't use packageManager from package.json

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
go, node.js
领域
cli

调研方向

首先,在具有 package.json packageManager 字段的项目中重现 slack init -v,并检查调用依赖项安装的 init 路径。确认选择了哪个包管理器,以及已安装的 @slack/cli-hooks 依赖项是否会被复用;当 init 使用声明的管理器且不会进行不必要的重新安装时,即表示完成。

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

描述

area:bolt-js discussion
Description

When running the slack init command the CLI doesn't use the packageManager defined by the user in package.json. This causes it to hang and reinstall all dependencies using npm.

Version

v3.5.1

OS Info
ProductName:            macOS
ProductVersion:         15.5
BuildVersion:           24F74
Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
Steps to reproduce:

Share the commands to run, source code, and project settings:

  1. Run slack init -v in your project.
  2. View logs to see npm is used.
  3. Command takes a long time.
Expected result:
  1. Slack CLI detects packageManager
  2. Slack CLI runs commands using this packageManager
  3. If @slack/cli-hooks are already installed the command takes milliseconds.
Actual result:
Image

npm is used and the command takes very long

Requirements
  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
主要语言
Go
星标
305
派生
46
平均合并
1 天 11 小时
30 天内合并 PR
23

贡献指南

打开贡献指南

从这里开始

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

slackapi/slack-cli 的其他 Issue

查看 slackapi/slack-cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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