n: Can't select different node versions with node 6.x on Ubuntu
@qw3rtman To add another data point to the pile, using a Bitnami AMI (basically a batteries-included Linux image for quick deployments) on Amazon Web Services with node 6.2.1 as default exhibits behavior similar to the kind described in Issue #355 The solution proposed by @ElegantSudo did not resolve the issue.
Bare minimum number of steps to reproduce here: https://gist.github.com/valgaze/728a9758d6abd73702ef27f7986f4b59
- Image: http://aws.amazon.com/marketplace/pp/B00NO1HJ56?ref=cns_srchrow [Linux/Unix, Ubuntu 14.04.3 | 64-bit Amazon Machine Image (AMI) | Updated: 7/7/16]
- OS: Ubuntu 14.04.3
- Running
$ uname -or: 3.13.0-87-generic GNU/Linux - Starting node version (preinstalled on image): 6.2.1
Here’s a gif the wacky behavior described:

Will post a gist of replication instructions in a moment: https://gist.github.com/valgaze/728a9758d6abd73702ef27f7986f4b59
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 19
same thing on macos 10.11.6, n version 2.1.7. Using up and down arrows to select version just outputs
grephelp documentation:Fixed the erroneous error message when making menu selection in
nv3.0.0The problem with the menu selection is that the active version of node is not in the list of versions cached by
nand triggers a bug selecting from the menu. This can happen when you have more than one version of node installed, and the version being installed bynis later in PATH.Run
which -a nodeto see the versions of node you have installed.You could delete the other version of node, or reorder the directories in PATH (as described by @apretto above).
Your “hack” is fine @spences10 and is the same as apretto advises, putting
$N_PREFIX/binahead of system folders in PATH. (As long as you are ok with npm globally installed commands being found before system commands. Global installs are less common these days so less of an issue.)The order in PATH only makes a difference when there are multiple installs, which is where
which -a nodecomes in to check what you currently have, and whether it is reasonable to delete the system install.@JohnRGee I figured that out. My path needs some housekeeping desperately. I apparently had both
.nandnpaths in my home directory. I ended up blowing them both away and reinstalling and everything is hunky dory.Seeing similar behavior on node
v7.10.0,Pressing the <kbd>up</kbd> key reveals the grep usage message as shown in the image above:
Edit: I’m using Linux Mint 17.1 Rebecca, also Ubuntu Based