-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
GitUp throwing 'npx not found' error on commit #1006
Comments
It's likely that when it executes your hooks, GitUp doesn't have access to your environment variables, such as As a workaround (and a way to confirm this is indeed the cause!), you could try running the app through Terminal, which makes it inherit your shell's env variables: $ nohup /Applications/GitUp.app/Contents/MacOS/GitUp > /dev/null 2>&1 & (adjust the path depending on where you've installed the app) |
@Cykelero when running the command, I get the following output, and my GitUp app doesn't launch: |
Sorry about the confusion: the |
Yeah sorry that's on me, I wasn't really thinking lmao. It works great, now I'm able to commit freely. Is there any way to give GitUp access to my PATH? It would be rgeat if I could avoid having to launch it via Terminal every time... |
I don't know of an easier workaround, sorry. GitUp would have to be updated with the ability to import your environment variables, but that's kind of thorny, as it can have side-effects. (some resources if someone wants to work on that feature: Nova's support page on the subject; a SO answer with an example implementation; and another related SO answer) |
The project I work on has a pre-commit hook which uses an npx command. When I use regular Git on my console, everything works fine. I use NVM, Noda 20, and running 'npx-v' correctly gives me the currently installed npx version, which shows it is indeed installed. However, when committing with GitUp, I get the following error: npx: command not found.
I tried reinstalling a fresh version of Node 20 with NVM, but to no avail. Any clues here?
The text was updated successfully, but these errors were encountered: