Skip to content

fix: GitHub Action bundle fix - Remove Probot type definitions#20

Merged
ipanov-ritech merged 2 commits into
mainfrom
feat/llm-agnostic-peer-review
Jan 27, 2026
Merged

fix: GitHub Action bundle fix - Remove Probot type definitions#20
ipanov-ritech merged 2 commits into
mainfrom
feat/llm-agnostic-peer-review

Conversation

@ipanov-ritech
Copy link
Copy Markdown
Collaborator

Summary

Fix GitHub Actions workflow failure by removing the Probot type definition file (dist/index.d.ts) that was causing ERR_MODULE_NOT_FOUND for express.

Problem

The GitHub Action was failing with:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express' imported from /home/runner/work/PeeR-Agent/PeeR-Agent/dist/index.js

Root Cause

The dist/index.d.ts file contained TypeScript type definitions for the Probot app (src/index.ts), which import 'express'. When the GitHub Action runs, Node.js tries to load this file alongside dist/index.js, causing the module resolution error.

Solution

  • Deleted dist/index.d.ts - The GitHub Action bundle should not have type definitions alongside it, as it's a bundled executable, not a library
  • The bundled dist/index.js (4.1MB) already contains all necessary code from src/action.ts

Testing

  • GitHub Actions workflow should now run successfully
  • No type definition files in dist/ for the action bundle

Related Changes

This PR also includes the previously merged work:

  • Comprehensive MCP server unit and integration tests
  • DevOps cost estimation for IaC files
  • MCP server modularization following SOLID principles
  • Jira integration improvements with MCP fallback
  • Consistent output formatting

🤖 Generated with Claude Code

ipanov-ritech and others added 2 commits January 27, 2026 15:36
Fix GitHub Actions workflow failure caused by missing dependencies (express, probot, etc.).

The bundled dist/index.js now includes all dependencies (4.1MB) so the action can run without npm install.

Changes:
- Rebuilt dist/index.js with ncc bundler (4.1MB with all deps)
- Removed dist/index.js.map (not needed for bundled action)
- Updated type definitions

Fixes: ERR_MODULE_NOT_FOUND for express package in GitHub Actions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The dist/index.d.ts file contained type definitions for the Probot app
(src/index.ts) which import 'express'. When the GitHub Action runs, Node.js
tries to load this file alongside dist/index.js, causing ERR_MODULE_NOT_FOUND.

The GitHub Action (dist/index.js) should not have type definitions alongside
it - it's a bundled executable, not a library.

Fix: Delete dist/index.d.ts to prevent Node.js from attempting to load the
Probot app's type definitions when running the GitHub Action.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ipanov-ritech ipanov-ritech merged commit b5cdf69 into main Jan 27, 2026
1 check failed
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.

1 participant