toplenboren / toplenboren/simple-git-hooks

README Lacks Detailed Instructions for Resolution of `npx: command not found` on Windows

Open
#117 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
61
PR merge metrics
No merged PRs in 30d

Description

The explanation on how to fix the error completely omits Windows Users.
Because of this the configuration was quite the headache...

I had a couple of issues:

  1. At first I didn't even understand what was needed to be done in the first place. I had to read the part about the init script multiple times to understand that what it meant was that the setup command needs to be called which in my case was fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression or at least I thought...

  2. The next issue was using the Windows command instead of the one for linux. I just didn't think about it a lot. On second thought it should have been obvious as git is not using PowerShell internally but when you just want to quickly add some new npm package to your repo you expect to be able to simply follow the usage instructions quickly without thinking a lot about it.

  3. My last and biggest issue was setting up the path.
    Windows does not support ~ nor $HOME which is used in the example and works in both bash and PowerShell which is why I assumed it would work too. But no Windows does not like any of that. Its cmd syntax or nothing: %USERPROFILE%.

These problems made setting up the "simple" git hooks not that simple.

I'd be happy to open a PR to make the README clearer for Windows Users.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the README's init script and setup instructions. Add clear Windows PowerShell and cmd guidance for resolving npx: command not found, including the Windows path syntax described in the issue. Done means a Windows user can follow the README without translating the Linux command or path examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.