-
Notifications
You must be signed in to change notification settings - Fork 71
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
while sourcing nvm command works, npm and node command are not working properly #28
Comments
@shangsunset For starters, I think the correct function is: function nvm
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end |
@shangsunset let me know if what @bucaran suggested works for you. |
unfortunately, it didnt work. |
Why the following? set -g -x PATH /usr/local/bin $PATH isn't /usr/local/bin/ supposed to be in PATH by default? And one more thing, neither node or npm are in your $PATH when the sessions starts. So, try printf "%s\n" $PATH |
Hey @bucaran, I deleted
|
ls -la /Users/shangsunset/.nvm/versions/node/v5.10.1/bin |
|
And you are saying that when you run, |
yes |
And what happens if you do
|
Also, do you have a .bash_profile file in your |
does .bash_profile still matter if we are using fish? |
Right, it does not matter in fish, but nvm is a bash script and I wanted to see if you were defining any aliases. If Try this: set -gx PATH /Users/shangsunset/.nvm/versions/node/v5.10.1/bin and run |
mmm that works |
Okay, can you check what's inside:
|
|
Well, that looks alright, I guess. Comment out all of your config.fish, and just leave this set fisher_home ~/.local/share/fisherman
set fisher_config ~/.config/fisherman
source $fisher_home/config.fish
function nvm
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end Then reload the shell and try using nvm as you are used to again. |
still getting |
And if you modify your PATH like this?
|
yea node works with |
So, the problem is solved. What is the issue again? |
so i need to put |
Nope, that's exactly Because I think you were just using |
I need to run |
Well, that's because they either source Related: nvm-sh/nvm#303 (comment) |
Just set fisher_home ~/.local/share/fisherman
set fisher_config ~/.config/fisherman
source $fisher_home/config.fish
### add your other configuration here
function nvm
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end
nvm ### call nvm HERE so you don't have to call it every time
|
Really appreciate your help and patience. However, even though i deleted my existing config.fish and created a new one with what you provided, |
@shangsunset I think you could make your life a ton easier if you switched to tj/n, at least just temporarily until you figure out how nvm works. https://github.com/tj/n If you really want to use nvm, though, I advise you to read their documentation thoroughly and learn how to use it instead of depending on plugins first. Also, please read the "official" fish tutorial. Please take no offence, as I could be wrong, but given your responses, it looks as if you still don't really understand the difference between calling a function, running code on shell startup, etc. |
ok thanks. |
Please do not steal other people's project names. |
@ljharb Dude, you are completely misinterpreting my plugin. The purpose of fisherman/nvm is to serve as a bridge between creationix/nvm and the missing nvm solution in fish. |
I did - I asked you politely to change it. You said "No". call it |
People that use fisherman know that stuff inside the org, are all plugins for fish, kind of like ohmyfish and similar projects. I wouldn't say it's confusing. |
You were politely asked by a project whose name you copied to change it. Whether you agree that it's confusing is irrelevant - it's not cool, under any circumstances. |
First, you were not polite, you were not rude either, but you were definitely very hostile. You even called me an "asshole". Why should I accept that? People on the internet are very confrontational when facing a white message box. You wouldn't call me an asshole to my face. Second, I worked hard on this thing, not that it matters, but I put it there because a lot of people have asked for an nvm in fish for like years and there just wasn't one. Sure, there are wrappers, but it's just not the same. I am calling the project nvm for a simple reason, people migrating from bash to fish that have used creationix/nvm before, are likely to search for "nvm in fish" when they realize creationix/nvm does not work in fish. |
so call it "nvm in fish". I insulted you after you posted a very rude one-word answer "No", and after you called me "bro" (which is also rude; you don't know me) and told me to "chill". I'm glad you worked hard on it, and I hope your project is successful - but it should be successful under its own name, not by stealing the name of something else. If you don't change your name, and your project attains any notoriety, it will forever live under the shadow of that - I won't be the only one you hear it from. Why not just change it? |
Well, that's a touching way to put it. There you go: And, I said "dude". From there to asshole it's quite a big jump.
EDIT 2: Went with https://github.com/fisherman/fin lol |
Thanks, much obliged. |
@ljharb See edit. If that's okay with you I'd like to add it to the list of alternatives in your README. |
@bucaran thank you, that sounds great. Please feel free to send a PR. |
@bucaran fish-nvm was way better than fin, it's very funny naming stuff after fishes and stuff related to them, but that makes googling hard as hell. If I want a nvm for fish I will search for that on google, not fin. If I want to run bash script on my fish shell I will search for fish bash wrapper or fish bash runner, not bass. @shangsunset You can solve your problem sourcing nvm every time you open a new shell, this will add a minor delay, but at least it works, just put this line on your config file at ~/.config/fish/config.fish
|
@FabioAntunes Which is why I named it nvm in the first place, but then ljharb was right, I can't just name my project after creationix/nvm like that, so I changed it to fin. Now, bear in mind that fin is not a drop-in replacement for nvm nor it requires
I couldn't agree more, and just like fisherman, SEO will be hard to do. Now, on the other hand, those who find it will appreciate it like the hidden gem it is. |
Hi,
So ive put the
nvm
function in theconfig.fish
and installednode
with nvm. however, i always getfish: Unknown command 'node'
on shell startup, so isnpm
. they will work after i execute anvm
command though, such asnvm ls
.if
nvm
is already sourced, how comenode
wont work?ps: tested in bash. node and npm work normally.
my config.fish:
The text was updated successfully, but these errors were encountered: