Skip to content

setup.sh 在错误目录执行 npm install,scripts/package.json 缺失 #49

@nnn228085-star

Description

@nnn228085-star
# setup.sh 第 130 行
cd "$SKILLS_DIR/scripts"
if [ -f "package.json" ]; then
  npm install

问题描述
setup.sh 约第 130 行在 skills/agentguard/scripts/ 目录下执行 npm install,但该目录没有 package.json(只有一个空的 lock 文件)。实际依赖在父级 skills/agentguard/package.json 中。npm 会静默向上查找 package.json 并报告"up to date",但 scripts/ 目录下不会生成 node_modules,导致运行脚本时出现难以排查的失败。

建议修复方案
scripts/ 目录添加独立的 package.json,或将 setup.sh 改为在父级 skills/agentguard/ 目录执行 npm install

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions