Skip to content

Fix build failure for @actions/github v9.0.0 ESM-only package - #24

Merged
ahernandez411 merged 3 commits into
dependabot/npm_and_yarn/dot-github/actions/did-custom-action-code-change/multi-75823392fcfrom
copilot/sub-pr-22
Mar 4, 2026
Merged

ahernandez411 merged 3 commits into
dependabot/npm_and_yarn/dot-github/actions/did-custom-action-code-change/multi-75823392fcfrom
copilot/sub-pr-22

Conversation

Copilot AI commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary of PR changes

@actions/github v9.0.0 is ESM-only — its package.json exports only "types" and "import" conditions. esbuild's --platform=node activates "require" by default, causing resolution to fail at bundle time.

Changes

  • package.json: Added --conditions=import to both build and bundle scripts so esbuild resolves the ESM export condition correctly
- "build": "npm ci && esbuild ./src/main.js --bundle --platform=node --outfile=dist/index.js ...",
+ "build": "npm ci && esbuild ./src/main.js --bundle --platform=node --conditions=import --outfile=dist/index.js ...",
  • dist/index.js: Recompiled bundle using the updated build command with npm run build

PR Requirements

  • For major, minor, or breaking changes, at least one of the commit messages contains the appropriate +semver: keywords.
    • See the Incrementing the Version section of the repository's README.md for more details.
  • The action code does not contain sensitive information.

NOTE: If the repo's workflow could not automatically update the README.md, it should be updated manually with the next version. For javascript actions, if the repo's workflow could not automatically recompile the action it should also be updated manually as part of the PR.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…build

Co-authored-by: ahernandez411 <11199284+ahernandez411@users.noreply.github.com>
Copilot AI changed the title [WIP] Update @octokit/plugin-paginate-rest and @actions/github dependencies Fix build failure for @actions/github v9.0.0 ESM-only package Mar 4, 2026
@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

Before this PR can be merged, please recompile the action by running the following command from the
".github/actions/did-custom-action-code-change" directory:
npm run build

@ahernandez411

Copy link
Copy Markdown
Contributor

@copilot ,

We got this comment , can you perform the action it requests

Before this PR can be merged, please recompile the action by running the following command from the
".github/actions/did-custom-action-code-change" directory:
npm run build

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@ahernandez411 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 414cc40f-bd75-4fd2-98ec-370e4b1bec25

@ahernandez411

Copy link
Copy Markdown
Contributor

@copilot

Can you fix this without using the claude version

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@ahernandez411 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 01b84647-80da-472d-b287-12719aae8727

@ahernandez411

Copy link
Copy Markdown
Contributor

@copilot use default to fix

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@ahernandez411 The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: cd09839d-fed9-47dd-a227-23c72f39338f

@ahernandez411

Copy link
Copy Markdown
Contributor

@copilot can you view the comments and build error and fix it

Co-authored-by: ahernandez411 <11199284+ahernandez411@users.noreply.github.com>

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can you view the comments and build error and fix it

Build completed successfully and action recompiled in commit 660286f. The dist/index.js file has been rebuilt with the --conditions=import flag to properly handle the ESM-only @actions/github v9.0.0 package.

@ahernandez411
ahernandez411 marked this pull request as ready for review March 4, 2026 18:07
@ahernandez411
ahernandez411 requested a review from a team as a code owner March 4, 2026 18:07
@ahernandez411
ahernandez411 merged commit aedf2db into dependabot/npm_and_yarn/dot-github/actions/did-custom-action-code-change/multi-75823392fc Mar 4, 2026
4 checks passed
@ahernandez411
ahernandez411 deleted the copilot/sub-pr-22 branch March 4, 2026 18:07
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