Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n selector doesn't work #400

Closed
af-fess opened this issue Dec 18, 2016 · 16 comments

Comments

@af-fess
Copy link

commented Dec 18, 2016

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?

@dcsan

This comment has been minimized.

Copy link

commented Dec 19, 2016

I get exactly this too.
using zsh

➜ ~ n --version
2.1.3

the up/down arrows on the selector don't work, and there is no arrow to indicate currently selected version.

I seem to have other issues with the node installation.
what is the best way to completely uninstall n?

@digitalmaster

This comment has been minimized.

Copy link

commented Dec 25, 2016

Same issue here

Update:
This was because i had nvm installed and active.. Just did nvm use system to stop using nvm.. Then n worked just fine :)

@matter3

This comment has been minimized.

Copy link

commented Jan 3, 2017

@digitalmaster thanks, fixed for me as well.

@gogoout

This comment has been minimized.

Copy link

commented Jan 19, 2017

+1
using zsh.
I have no nvm installed

 ~  nvm
zsh: command not found: nvm
@dcsan

This comment has been minimized.

Copy link

commented Jan 21, 2017

could be related to zsh, i also have the issue and am using zsh.

@andresmihkelson

This comment has been minimized.

Copy link

commented Jan 28, 2017

I am using bash and with the latest n, the same happens. No nvm also. Using Fedora 24. Also, after running n fails, I cannot type anything into the prompt any more.

@maciekrb

This comment has been minimized.

Copy link

commented Feb 3, 2017

Make sure you uninstall your previous version of node. For example, if you are using OSX and MacPorts or brew, make sure which node points to /usr/local/bin/node (or the path you chose to install n node).

@troy0820

This comment has been minimized.

Copy link
Collaborator

commented Feb 4, 2017

The problem is that it can't find the $versions_paths directory. This could be because find isn't installed or the $N_PREFIX isn't pointing to where the versions are installed.

@andresmihkelson Are you using a container or is this local? Make sure you have the findutils package. I have a container that you can test this on, if you have docker.

docker run troy0820/node-n-fedora
npm i -g n
n 4.6.0
n lts 
n latest

Install a couple of versions and then switch with n and you should see it work fine.

@andresmihkelson

This comment has been minimized.

Copy link

commented Feb 4, 2017

@troy0820 It was locally installed and findutils was also installed. But probably something unrelated to n was responsible, because today I reinstalled n through npm again and it works fine. Thanks anyways! (:

@troy0820

This comment has been minimized.

Copy link
Collaborator

commented Feb 4, 2017

Are you still having this issue @af-fess?

@troy0820 troy0820 closed this Feb 18, 2017

@caseyWebb

This comment has been minimized.

Copy link

commented May 30, 2017

For 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-dependencies flag b/c of yarn) solved it.

@Brototype

This comment has been minimized.

Copy link

commented Jul 7, 2017

i have this issue too. Here is my output for brew list:

ack			emacs			gradle214		libtiff			protobuf		x264
bash-completion		ffmpeg			gradle@2.14		libyaml			ranger			xvid
boost			freetype		heroku			libzip			readline		zsh
cask			gdbm			icu4c			node@6			sdl2			zsh-completions
cloc			git			jpeg			oniguruma		sdl2_image
delve			git-flow		jq			openssl			tldr
docker			glew			kubernetes-cli		openssl@1.1		vagrant-completion
docker-compose		go			lame			pcre			webp
docker-machine		gource			libpng			pkg-config		wget

for some reason n gives me that output

    node/6.3.1
    node/8.1.3

and when i go up / down with the arrow keys i get this:

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/6.3.1
    node/8.1.3


@KaisNeffati

This comment has been minimized.

Copy link

commented Aug 22, 2017

@Brototype I've been facing this problem and i've resolve it following this steps :
Uninstall n, node and npm

which n // give you path/n/bin/n
sudo rm -rf path/n
sudo rm -rf /usr/local/bin/n
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/bin/npm

Install n from a third-party installer
curl -L https://git.io/n-install | bash

==> Enjoy

@garuda

This comment has been minimized.

Copy link

commented Oct 4, 2017

Worked for me!

@rootical

This comment has been minimized.

Copy link

commented Oct 17, 2018

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.

@taizilongxu

This comment has been minimized.

Copy link

commented Oct 23, 2018

in my case, node was install in /usr/local/bin which not in the env path, so just add export PATH="$PATH:/usr/local/bin"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.