-
-
Notifications
You must be signed in to change notification settings - Fork 738
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 for each user? #277
Comments
I installed n with the recommanded method "npm install -g n". OS is CentOS7. Globally n works like a charme... |
I don't know how CentOS sets up the shell path. I know with Linux Mint and Ubuntu that .profile adds ~/bin to the front of the PATH if it is present. When running Just make sure ~/bin is at the beginning of your PATH so it uses that node and not the version down in /usr. Where does it point when you run |
$ which node I see, points to the "gobal" node. How do i change that so the "currently by n set" node-version is used? /bin is included in the PATH (PATH=$PATH:$HOME/.local/bin:$HOME/bin) already, so thats not the problem. There needs to be a "local n" , but how? With "npm install n"? After that To which "bin" PATH has to point? |
When you run Having N_PREFIX exported to $HOME for each user is correct. When Also, please keep you question to a single issue. |
Thx! Ok then, i'll try a differnt order of PATH, beginning with $HOME/bin ... where /bin does not exist yet ... "Also, please keep you question to a single issue." Im not sure what you mean? My questions (as posts) in other issues (as threads) have nothing to do with each other ... at least I dont see any connection ... well, ok, all about n, right ^^ ... wouldn't be bad practice to mix different topics in one issue though? But maybe I just didn't get what you means ... |
I saw your comments in other issues. They appeared to be asking the same as what you described in this issue. Sorry if I read it wrong. |
No Problem. But you are right in some way ... the problem all my questions based on, was in the end the same or at least related, but I didn't knew that at time of writing... Chicken/Egg-Problem at its best ^^ |
@bigdx Is your problem solved now? |
@maxrimue yes, solved (sorry, had some days off) @tedgaydos Thx, changing the order of PATH worked. So if somebody has a similar problem, the .bash_profile looks somewhat like this now ...
|
@bigdx Good, I'll close this now then |
Hi,
My users (not su/root!) should be able to select their "own" node-version, for the current user (or current directory) only, NOT globally. Maybe I just messed up something, but I cant get that work. I have added "export N_PREFIX=$HOME" to .bash_profile and can install "local" (for current user) node-versions with "n VERSION" (to $HOME/n/version...), using "n" even switch them (without any error), but that has no effect at all: node -v still returns the same version (set by root)...
"n use ... -v" or "N_PREFIX=$HOME n use ... -v" (without export) seems to work so ...
What am I doing wrong?
The text was updated successfully, but these errors were encountered: