Do these:
1
# Uninstall n8n globally
npm uninstall -g n8n
# Clear the npm cache to ensure no corrupted packages are reused
npm cache clean --force
2
which n8n
If this still returns a path after uninstalling, manually delete that binary: rm -rf $(which n8n)
3
Install the target version (2.28.4) fresh.
npm install -g n8n@2.28.4
4
Try running n8n without any arguments first, as v2.x is designed to start automatically:
n8n
If that still fails, try the explicit start command:
n8n start