Skip to content

Fix npm package contents so Codex install path can resolve installer modules - #2

Merged
yugasun merged 3 commits into
mainfrom
copilot/fix-codex-installation-issue
Jul 3, 2026
Merged

Fix npm package contents so Codex install path can resolve installer modules#2
yugasun merged 3 commits into
mainfrom
copilot/fix-codex-installation-issue

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

npx -y github:yugasun/aiops --ide codex was failing at runtime because bin/install.js imports ../scripts/providers, but scripts/ was excluded from the published package. This PR updates package contents to ship required installer runtime modules and adds a focused guard against regression.

  • Package publish contents

    • Added scripts/ to package.json#files so runtime imports used by bin/install.js are present in distributed tarballs.
  • Regression guard for packaging

    • Added scripts/test/package-files.test.js to assert that package.json#files includes scripts/.
  • Why this unblocks Codex install

    • The failing require path is now included in the package payload:
{
  "files": [
    "bin/",
    "scripts/",
    "agents/",
    "skills/",
    "docs/"
  ]
}

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiops Ready Ready Preview, Comment Jul 3, 2026 6:55am

Copilot AI linked an issue Jul 3, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix codex installation failure issue Fix npm package contents so Codex install path can resolve installer modules Jul 3, 2026
Copilot AI requested a review from yugasun July 3, 2026 06:56
@yugasun
yugasun requested a review from Copilot July 3, 2026 07:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the published npm package contents so the installer (bin/install.js) can resolve its runtime ../scripts/* imports when run via npx (notably for the Codex install path).

Changes:

  • Add scripts/ to package.json#files so required installer runtime modules ship in the published tarball.
  • Add a small packaging regression guard (scripts/test/package-files.test.js) to assert scripts/ remains included.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Publishes scripts/ so installer runtime require("../scripts/...") paths are present in distributed packages.
scripts/test/package-files.test.js Adds a minimal test to guard against accidentally removing scripts/ from published package contents.

const { strict: assert } = require("assert");
const pkg = require("../../package.json");

assert.ok(pkg.files.includes("scripts/"), 'package.json "files" must include "scripts/"');
@yugasun
yugasun marked this pull request as ready for review July 3, 2026 07:37
@yugasun
yugasun merged commit 46d9fd0 into main Jul 3, 2026
3 checks passed
@yugasun
yugasun deleted the copilot/fix-codex-installation-issue branch July 3, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codex 安装失败

3 participants