docs(troubleshooting): diagnose npm global prefix hijacked by a node shim#33
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Code Review
This pull request adds a troubleshooting section to troubleshooting.md for Node/nvm issues where global installs land off-PATH due to a manual node symlink hijacking npm's prefix. The review feedback suggests replacing the hardcoded path ~/.local/bin/node with a placeholder <path-to-shim> in the fix commands to make it clear that the user should substitute their actual shim path.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…shim A manual `node` symlink on PATH ahead of nvm (e.g. ~/.local/bin/node) makes every node/npm resolve through it, locking npm's global prefix to that Node's tree so global installs land off-PATH. Add a PATH-Issues troubleshooting entry: symptoms, diagnosis (process.execPath vs npm prefix -g vs nvm default), and the fix. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
fc974a4 to
3bc138d
Compare
|



Adds a troubleshooting entry for a non-obvious failure: a manual
nodesymlink ahead of nvm on PATH (e.g.~/.local/bin/node) hijacks npm's global prefix, so successfulnpm i -ginstalls land in a bin dir that isn't on PATH andcommand -vcan't find them.Covers symptoms, diagnosis (
node -p process.execPathvsnpm prefix -gvsnvm version default), and the fix (remove/re-point the shim + align the nvm default). Sourced from a real debugging session.