You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
MacOS, have zsh as your shell and use lazy node (below)
try to run mcp dev server_module.py
See error:
2025-01-04 10:55:05,882 - cli - ERROR - npx not found or failed to load. Please ensure Node.js and npm are properly installed and your shell initialization files are correctly configured.
2025-01-04 10:55:05,883 - cli - ERROR - npx not found. Please ensure Node.js and npm are properly installed and added to your system PATH.
lazy node shell script:
# Add every binary that requires nvm, npm or node to run to an array of node globals
NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
NODE_GLOBALS+=("node")
NODE_GLOBALS+=("nvm")
NODE_GLOBALS+=("npx")
# Lazy-loading nvm + npm on node globals call
load_nvm () {
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
if [ -f "$NVM_DIR/bash_completion" ]; then
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi
}
# Making node global trigger the lazy loading
for cmd in "${NODE_GLOBALS[@]}"; do
eval "${cmd}(){ unset -f ${cmd} >/dev/null 2>&1; load_nvm; ${cmd} \$@; }"
done
Expected behavior
A clear and concise description of what you expected to happen.
mcp dev server runs, it runs if I manually change the command to subprocess and source my ~/.zshrc
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: MacOS
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
zsh
as your shell and use lazy node (below)mcp dev server_module.py
lazy node shell script:
Expected behavior
A clear and concise description of what you expected to happen.
mcp dev
server runs, it runs if I manually change the command tosubprocess
and source my~/.zshrc
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: