-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npx commands not working #1066
Comments
Hi @9jaboy, What kind of error are you getting with npx? Could you paste the error? |
|
This is happening for me as well: $ git commit -e
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 2s 249ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 1s 469ms
➤ YN0000: Done in 3s 786ms
husky - pre-commit hook exited with code 1 (error) There's no debug information beside the error message above. I didn't upgrade my OS or change to my Husky setup recently, so I suppose this is a backend issue. Environment:
|
Thanks for the details. Working on my side env:
/t/foo main• ❱ g ci -m test
✔ Preparing...
✔ Running tasks...
✔ Applying modifications...
✔ Cleaning up...
[main 7e66935] test
1 file changed, 3 insertions(+)
# ... #!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged |
I am using yarn v3.0.2 - could that be the cause? You should be able to replicate the problem if you copy my solidity-template and attempt to make any commit. One of my users has already opened a discussion about this: PaulRBerg/hardhat-template#74. |
Thanks, I’ll give it a try. If you use yarn instead of npx to run commands like lint-staged does it work better? |
It's just more consistent to use yarn everywhere. |
Agree. Misread, thought you were using npx with yarn install. |
Can't seem to reproduce, tried on PowerShell Windows with npx and yarn.
You can take husky's code from the equation by commenting the following line in #!/bin/sh
# . "$(dirname "$0")/_/husky.sh"
npx lint-staged It may help with debugging. Let me know if you still have the issue without this line. |
I may have found the cause |
The issue is related to lint-staged/lint-staged#1032 |
Indeed! As @aaronadamsCA explained here, this issue was caused by Thanks for taking a look at this, @typicode! @9jaboy can you upgrade your dependencies and see if it works now? |
I can confirm it works. I guess I could've made the connection :) |
The above is my pre-commit and it was working fine, but just started failing.
After hours of debugging, the only time I can get it to work is to remove
npx
and donpm run tsc
OS: Windows
The text was updated successfully, but these errors were encountered: