Fix workflow failures by adding Node.js setup for prettier pre-commit hook#3
Open
Fix workflow failures by adding Node.js setup for prettier pre-commit hook#3
Conversation
Co-authored-by: will-rice <25072137+will-rice@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues causing workflow failures
Fix workflow failures by adding Node.js setup for prettier pre-commit hook
Oct 15, 2025
Owner
|
@copilot I want to use my prettier pre-commit since the official is archived |
Owner
|
@copilot I want to use my pre-commit |
Co-authored-by: will-rice <25072137+will-rice@users.noreply.github.com>
Contributor
Author
Reverted back to using your prettier pre-commit hook in commit 1d0da84. The Node.js setup remains in the workflow to ensure it works properly.
Done - reverted to your pre-commit hook in commit 1d0da84. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The GitHub Actions workflows were consistently failing with the error:
The root cause was a mismatch between the pre-commit configuration and the CI environment setup. The
.pre-commit-config.yamlincluded a prettier hook that requires Node.js and npm, but the workflow only installed Python and uv.Solution
This PR fixes the workflow failures by ensuring all required dependencies are available in the CI environment:
Added Node.js setup to the workflow
Updated
.github/workflows/python-package.ymlto install Node.js 18 before running pre-commit hooks:This allows the custom
will-rice/prettier-pre-commithook (v1.0.7) to run successfully in the CI environment.Testing
The changes have been tested locally and ensure that:
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.