Skip to content
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

How to use Node.js managed by fnm outside the terminal #1042

Open
PinkChampagne17 opened this issue Sep 15, 2023 · 3 comments
Open

How to use Node.js managed by fnm outside the terminal #1042

PinkChampagne17 opened this issue Sep 15, 2023 · 3 comments

Comments

@PinkChampagne17
Copy link

For example, I use a Git GUI to commit, the Git hooks I used are written by Node.js, and then an error occurs:

env: node: No such file or directory
husky - commit-msg hook exited with code 127 (error)
husky - command not found in PATH=....
@PinkChampagne17 PinkChampagne17 changed the title How to use Node.js Managed by fnm outside the terminal How to use Node.js managed by fnm outside the terminal Sep 15, 2023
@lombervid
Copy link

lombervid commented Sep 16, 2023

I suppose you would have to add the location of the node installation to the PATH. But I think that might break fnm version management.

@nemchik
Copy link

nemchik commented Jul 17, 2024

Potential workaround/solution #668 (comment)

@hellorayza
Copy link

@nemchik Hi, to minimize disturbing more people, I'd like to inquire about my issue here.

I may understood the reasons why some commands in the husky hook don't work and the methods to address them,

https://typicode.github.io/husky/how-to.html#startup-files
https://typicode.github.io/husky/how-to.html#node-version-managers-and-guis

but after trying the solutions you provided, I still receive errors indicating that fnm and npx are not recognized. This has been troubling me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants