n: n selector doesn't work
I installed n with npm install -g n
when I run $ n I get output:
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
node/4.4.7
node/6.6.0
node/7.2.1
when I run:
$ n 4.4.7 - nothing happens. No output, node version doesn’t change.
tried to reinstall n - same thing. Is there any --verbose flag?
$ node -v
v7.1.0
Any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 11
- Comments: 16
Same issue here
Update: This was because i had
nvminstalled and active… Just didnvm use systemto stop using nvm… Thennworked just fine 😃@Brototype I’ve been facing this problem and i’ve resolve it following this steps : Uninstall n, node and npm
Install n from a third-party installer
curl -L https://git.io/n-install | bash==> Enjoy
+1 using zsh. I have no
nvminstalledFor posterity, I experienced this because I installed yarn via brew, which in turn installed node via brew. Uninstalling brew’s version of node (have to use
--ignore-dependenciesflag b/c of yarn) solved it.In my case brew’s node was conflicting with the n. So I removed node out from there.
brew uninstall node --ignore-dependencies. It was installed along with yarn however yarn continue working after removing.Make sure you uninstall your previous version of node. For example, if you are using OSX and MacPorts or
brew, make surewhich nodepoints to/usr/local/bin/node(or the path you chose to installnnode).i have this issue too. Here is my output for
brew list:for some reason
ngives me that outputand when i go up / down with the arrow keys i get this:
The problem is that it can’t find the
$versions_pathsdirectory. This could be becausefindisn’t installed or the$N_PREFIXisn’t pointing to where the versions are installed.@andresmihkelson Are you using a container or is this local? Make sure you have the
findutilspackage. I have a container that you can test this on, if you have docker.Install a couple of versions and then switch with
nand you should see it work fine.@digitalmaster thanks, fixed for me as well.