Skip to content

[Regression Issue] - MacOS - sourcegit can't find npm global modules #545

@yitzchak-ben-ezra-ecoplant

Description

Hi @love-linger

Since you delivered this: #507 I have an issue

the environment I'm using is this

  1. shell: zsh
  2. upon changing directory - nvm sets the correct npm version to be used
  3. with the correct npm version I installed pnpm globally (npm i -g pnpm)
  4. we have precommit hook that triggers something with pnpm
  5. In order for source git to work with the correct npm version I'm launching it from zsh on the repo folder (to have the correct npm version) with this command: open -a /Applications/SourceGit.app

it used to work
now when I commit I see this message:

nx/.husky/pre-commit: line 4: pnpm: command not found
husky - pre-commit script failed (code 127)
husky - command not found in PATH=node_modules/.bin:/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

my full PATH from zsh is:

/Users/USERNAME/.pyenv/plugins/pyenv-virtualenv/shims:/Users/USERNAME/.pyenv/shims:/Users/USERNAME/.pyenv/bin:/opt/homebrew/opt/libpq/bin:/Users/USERNAME/.nvm/versions/node/v20.15.0/bin:/usr/local/share/dotnet:/opt/homebrew/bin:/Users/USERNAME/.local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/GPAC.app/Contents/MacOS/:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USERNAME/Library/Application Support/JetBrains/Toolbox/scripts

I believe the important part is: /Users/USERNAME/.nvm/versions/node/v20.15.0/bin

do you see it as a bug?
what can we do with this?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestos-macosThis issue only exists on macOS

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions