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

Path resolution library doesn't handle MacOS commands correctly #114

Open
jacksteamdev opened this issue Dec 17, 2024 · 0 comments · May be fixed by #115
Open

Path resolution library doesn't handle MacOS commands correctly #114

jacksteamdev opened this issue Dec 17, 2024 · 0 comments · May be fixed by #115
Labels
bug Something isn't working

Comments

@jacksteamdev
Copy link
Contributor

jacksteamdev commented Dec 17, 2024

This spawn-rx issue is affecting use of @modelcontextprotocol/inspector on MacOS. findActualExecutable returns the wrong value on MacOS if the user's Node version management uses symlinks. In my case, spawn-rx is causing bun to resolve to /Users/jacksteam/.volta/bin/volta-shim when it should resolve to /Users/jacksteam/.volta/bin/bun.

To Reproduce

Steps to reproduce the behavior:

  1. Use Volta or another Node version management shim on MacOS to install Node or Bun.
  2. In the MPC inspector UI, enter a shimmed bin as your command: bun in this case.
  3. Use the MPC inspector to launch your server.
image

Expected behavior

The inspector should spawn the command as entered in the UI.

Logs

I'm getting this error:

Volta error: 'volta-shim' should not be called directly. Please use the existing shims provided by Volta (node, yarn, etc.) to run tools.

Note that the command is resolved incorrectly.

Stdio transport: command=/Users/jacksteam/.volta/bin/volta-shim, args=src/index.ts, env={"HOME":"/Users/jacksteam","LOGNAME":"jacksteam","PATH":"/Users/jacksteam/.npm/_npx/5a9d879542beca3a/node_modules/.bin:/Users/jacksteam/Documents/Cline/MCP/zettelkasten-server/node_modules/.bin:/Users/jacksteam/Documents/Cline/MCP/node_modules/.bin:/Users/jacksteam/Documents/Cline/node_modules/.bin:/Users/jacksteam/Documents/node_modules/.bin:/Users/jacksteam/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/jacksteam/.volta/tools/image/node/20.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/Users/jacksteam/.volta/tools/image/node/20.16.0/bin:/Users/jacksteam/perl5/bin:/Users/jacksteam/Library/pnpm:/Users/jacksteam/.volta/bin:/opt/homebrew/opt/openjdk/bin:/Users/jacksteam/.jenv/shims:/Users/jacksteam/.jenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/Users/jacksteam/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand","SHELL":"/bin/zsh","TERM":"xterm-256color","USER":"jacksteam"}

Additional context

@jacksteamdev jacksteamdev added the bug Something isn't working label Dec 17, 2024
@jacksteamdev jacksteamdev changed the title rx-spawn doesn't handle MacOS commands correctly spawn-rx doesn't handle MacOS commands correctly Dec 17, 2024
@jacksteamdev jacksteamdev changed the title spawn-rx doesn't handle MacOS commands correctly Path resolution library doesn't handle MacOS commands correctly Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant