netwerk-digitaal-erfgoed / network-of-terms

Search engine for finding terms in terminology sources (such as thesauri, classification systems and reference lists)
https://termennetwerk-api.netwerkdigitaalerfgoed.nl
European Union Public License 1.2
17 stars 3 forks source link

Git commit fails on Windows #1445

Closed rschalkrce closed 4 weeks ago

rschalkrce commented 1 month ago

Since a couple of weeks git commit fails on my Windows machine for this repository. May be related to accepting only Unix-style paths?

When committing I now get this message: /bin/bash: C:/Program Files/nodejs/npx: No such file or directory husky - commit-msg script failed (code 127) husky - command not found in PATH= [etc.]

The PATH variable does exist in my environment. Commits to other repositories from my machine still work fine. I have been unable to solve it myself.

ddeboer commented 1 month ago

Did you run npm install?

rschalkrce commented 4 weeks ago

Yes, also re-installed npm and husky, but to no avail

ddeboer commented 4 weeks ago

It seems npx cannot be found.

Does C:/Program Files/nodejs/npx exist and is it executable? What happens if you run npx in your terminal?

rschalkrce commented 4 weeks ago

Yes it does exist and is part of PATH. Could it have to do with the preceding /bin/bash part, since I work from Windows?

Running npx --version in Powershell: 10.8.2

Running npx --version in Ubuntu: 10.8.2

ddeboer commented 4 weeks ago

And bash -c 'npx --version'?

rschalkrce commented 4 weeks ago

PS C:\Users\Ruben> bash -c 'npx --version': 6.14.4

ddeboer commented 4 weeks ago

I’m not sure why you’re getting bash, because Husky runs sh. Are you running the git commit in a bash shell?

ddeboer commented 4 weeks ago

Please pull master and try again.

ddeboer commented 4 weeks ago

:tada: This issue has been resolved in version 9.16.3 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket: