Fix TypeError when no package manager lock file exists#265
Merged
ryota-murakami merged 1 commit intomainfrom Nov 6, 2025
Merged
Fix TypeError when no package manager lock file exists#265ryota-murakami merged 1 commit intomainfrom
ryota-murakami merged 1 commit intomainfrom
Conversation
Copilot
AI
changed the title
[WIP] Fix TypeError for invalid 'data' argument
Fix TypeError when no package manager lock file exists
Nov 6, 2025
ryota-murakami
approved these changes
Nov 6, 2025
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.
Users running
npx prettier-husky-lint-staged-installerin projects without package-lock.json, pnpm-lock.yaml, or bun.lockb encounter:Analysis
Published version 1.3.1 lacks
process.exit(0)in the else block when no supported lock file is found. Script continues executing withprecommitFileBodyundefined, causing TypeError when writing to.husky/pre-commit.Fix
Status: Already fixed in repository code (commit 81f9488), not yet published to npm.
Line 42 of
bin/cli.jsincludes the missingprocess.exit(0):Additionally, the code uses promise-based fs operations (
node:fs/promises) instead of callback-based operations for proper async handling.Next Step
Publish version 1.3.2+ to npm to deploy the fix.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.