Node command not found #349
Replies: 5 comments
-
The same problem when migrating to v0.8.0. |
Beta Was this translation helpful? Give feedback.
-
Hey @vanyauhalin ! Could you tell about your nodejs installation? Do you update PATH env in .bashrc to point to node? I think this is crucial for understanding the reasons of this bug 🤔 |
Beta Was this translation helpful? Give feedback.
-
At first, I thought that maybe this is the fnm changing fish, fnm, lefthook v0.7.7
zsh, lefthook v0.7.7
fish, fnm, lefthook v0.8.0
zsh, lefthook v0.8.0
By the way, if you explicitly specify in the configuration where to run the command, then everything will work. pre-commit:
commands:
lint:
glob: "*.js"
run: sh node_modules/.bin/eslint {staged_files} |
Beta Was this translation helpful? Give feedback.
-
Hmm, so Can you provide the tweaks for fnm and pnpm? Maybe they add something in ~/.zshrc? Maybe they change the way |
Beta Was this translation helpful? Give feedback.
-
Sorry I see that this discussion has been closed, however I've came across this behaviour where lefthook wouldn't find the binaries unless giving the path from the root of the project directory. I have noticed though that using npm you can do the following: {
"script": {
"format": "prettier --write --no-wrap always",
}
} |
Beta Was this translation helpful? Give feedback.
-
After upgrading from v0.7.7 to v1.0.4, lefthook stopped resolving module paths. Maybe I'm missing something.
Beta Was this translation helpful? Give feedback.
All reactions