Skip to content

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Jul 17, 2025

Summary

  • Replace tsdown with @vercel/ncc to properly bundle all dependencies
  • Fixes "Cannot find module '@actions/core'" error when action runs in GitHub workflows
  • Updates lint-staged configuration to work with ncc build process

Problem

The previous bundler (tsdown) wasn't including node_modules dependencies in the output, causing the action to fail with module resolution errors when executed in GitHub Actions environments.

Solution

Switched to @vercel/ncc which is the standard and recommended bundler for GitHub Actions. It creates a self-contained JavaScript file with all dependencies included.

Test plan

  • All existing tests pass (pnpm run validate)
  • Bundle loads successfully when tested with Node.js
  • Bundle contains all required functions from @actions/core and @actions/github
  • Lint-staged hooks work correctly with the new build configuration

dcramer added 2 commits July 16, 2025 19:29
- Replace tsdown with @vercel/ncc which is the standard bundler for GitHub Actions
- This ensures all dependencies (@actions/core, @actions/github, etc.) are properly bundled
- Fixes 'Cannot find module @actions/core' error when action runs in GitHub workflows
- All tests pass and bundle loads successfully
- Disable TypeScript declaration generation in tsconfig.json
- Remove source maps to avoid absolute path issues in CI
- Keep only necessary files (index.js and licenses.txt) in dist/
@dcramer dcramer merged commit eaa0afe into main Jul 17, 2025
13 checks passed
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.

2 participants