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

Git-backed marketplace install fails: missing picomatch runtime dependency

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

@rooterkyberian 已经在做这个了。

开始于 2026年9月28日。

  • #21 来自 @rooterkyberian —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
cli, devtools

调研方向

Reproduce the failure with the direct dist/cli.js command, then inspect package.json, src/rules/matcher.ts, dist/rules/matcher.js, and the README alongside the installed cache contents. Determine which supported installation path makes the hook run without the temporary workaround, and verify a clean Git-backed marketplace install succeeds.

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

描述

Installing codex-rules from a Git-backed Codex marketplace succeeds, but its hooks immediately exit with code 1 because picomatch is not installed.

Environment
  • Codex CLI 0.154.0
  • macOS, Node.js 25.8.1
  • codex-rules 0.1.0, commit 7afdc9cdc4492f4fcf50843d2ca31ee7e4244470
  • Marketplace entry uses source: "url" pointing to this repository, pinned to that commit
Reproduction
  1. Add this repository to a Codex marketplace as a Git-backed plugin.
  2. Run codex plugin add codex-rules@<marketplace>.
  3. Start a conversation or submit a message. The UI shows Hook failed — hook exited with code 1.
  4. Running the installed hook directly reproduces the failure even with empty stdin:
node "$CODEX_HOME/plugins/cache/<marketplace>/codex-rules/0.1.0/dist/cli.js" hook user-prompt-submit </dev/null
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'picomatch' imported from
.../codex-rules/0.1.0/dist/rules/matcher.js
Findings
  • package.json correctly declares picomatch as a production dependency.
  • Both src/rules/matcher.ts and the committed dist/rules/matcher.js import it.
  • The installed cache contains package.json, package-lock.json, and dist, but no node_modules. This Git-backed installation did not install the npm dependencies.
  • The README states that the runtime has no npm production dependencies and needs no follow-up npm install, which contradicts the current artifact.
Expected behavior

A clean marketplace install should run its hooks successfully. Bundling the runtime dependency into the distributed JavaScript would make Git-backed installs self-contained; otherwise the installation instructions need an explicit supported dependency-installation step.

We are adding a temporary setup workaround to run npm ci --omit=dev --ignore-scripts --no-audit --no-fund in the installed plugin directory. Related installation documentation PR: #18.

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

环境准备

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

从这里开始

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

code-yeongyu/codex-rules 的其他 Issue

查看 code-yeongyu/codex-rules 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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