Best Fixes
Verify that Node is installed and that npm lives in the same toolchain path you expect.
Check shell startup files if you rely on nvm, fnm, asdf, or another version manager.
Why npm disappears from your shell and how to restore the right Node toolchain path.
If npm is missing, the usual issue is that Node was not installed correctly, the shell path does not include it, or a version manager was not initialized in the current session.
Verify that Node is installed and that npm lives in the same toolchain path you expect.
Check shell startup files if you rely on nvm, fnm, asdf, or another version manager.
Do not install multiple overlapping Node setups unless you understand which one should win in PATH.
Do not assume GUI terminals and CI shells load the same startup scripts.