Skip to content

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

Open
@CaptainException

Description

@CaptainException

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions