Git-backed marketplace install fails: missing picomatch runtime dependency
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
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
- Add this repository to a Codex marketplace as a Git-backed plugin.
- Run
codex plugin add codex-rules@<marketplace>. - Start a conversation or submit a message. The UI shows
Hook failed — hook exited with code 1. - 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.jsoncorrectly declarespicomatchas a production dependency.- Both
src/rules/matcher.tsand the committeddist/rules/matcher.jsimport it. - The installed cache contains
package.json,package-lock.json, anddist, but nonode_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 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
code-yeongyu/codex-rules 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
enhancement
难度 3/5 1-2 天 新手友好度 67/100
code-yeongyu/codex-rules#19 · 1 个 reaction ·
查看 code-yeongyu/codex-rules 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
equinor/prisma-decision-web#919 ·
维护者通常 1 天内回复
-
[DC] OneLogin sync imports a partial user list when an API request fails可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
bitwarden/directory-connector#1276 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
home-assistant/installer#324 ·
维护者通常 1 天内回复
-
Mondriaan
难度 2/5 1-3 小时 新手友好度 65/100
knaw-huc/textannoviz#733 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复