You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ugh. Until this is patched, you might want to put a note in the README … I have no idea where my ~/.npmrc came from, but I've been complaining about being unable to update npm for ages. (At least now I know why.)
If the suggested fix is to nvm use --delete-prefix vx.x.x, what if --delete-prefix is configurable?
I added that line to my .bash_profile so I end up with the node version I need to use.
May be I'm misunderstanding and should not nvm use --delete-prefix vx.x.x?
I was just thinking in something that let you delete-prefix at .nvmrc level, some kind of flag or similar. 🤷♂️ (that will make it easier to deal inside scripts)
@elmorenocivitas--delete-prefix should be a command that's only needed once, and manually, after that your machine ideally never has a prefix to delete again :-)
Activity
wilmoore commentedon Jan 12, 2015
I don't believe this is an
nvmspecific issue.ljharb commentedon Jan 12, 2015
I asked @SeeThruHead to file this - the problem as I see it is that
nvm(correctly) doesn't respectnpm'sprefixoption, butnpmitself will.I'm not sure how to handle this, but at the least,
nvmcould print out a warning.ljharb commentedon Mar 13, 2015
Noting from #427 that the env var
$NPM_CONFIG_PREFIXalso causes problems withnvm.kriswill commentedon Mar 13, 2015
Maybe detect the nvm config setting upon installation and issue a stern warning?
ljharb commentedon Mar 13, 2015
I'm considering making
nvmrefuse any operation whatsoever when problematic settings are set.kriswill commentedon Mar 13, 2015
sure, just do a
npm config get prefixand if it doesn't contain/.nvm/then bail out.ljharb commentedon Mar 16, 2015
Also
$PREFIX, apparently, thanks to #692.ELLIOTTCABLE commentedon Apr 13, 2015
Ugh. Until this is patched, you might want to put a note in the README … I have no idea where my
~/.npmrccame from, but I've been complaining about being unable to updatenpmfor ages. (At least now I know why.)ljharb commentedon Apr 13, 2015
Good idea - I'll get to one or the other hopefully in the next few weeks, but a README PR is welcome in the meantime.
Merge pull request #726 from SeeThruHead/master
usmonster commentedon Aug 27, 2015
Can this be closed since 7ea15a7?
ljharb commentedon Aug 27, 2015
I'm leaving it open until
nvmitself refuses to do anything when a prefix is set.ljharb commentedon Sep 23, 2015
Now
nvm usewill refuse to work if$PREFIXornpm config get prefixis set, and will provide instructions about how to fix it.Reopening, however, because I forgot about
$NPM_CONFIG_PREFIX.leomoreno commentedon Feb 27, 2017
Would be nice if this prefix thing could be omitted somehow through
.nvmrc(just thinking).ljharb commentedon Feb 27, 2017
@leomoreno in what way? The whole concept of PREFIX is incompatible with nvm.
elmorenocivitas commentedon Feb 27, 2017
If the suggested fix is to
nvm use --delete-prefix vx.x.x, what if--delete-prefixis configurable?I added that line to my
.bash_profileso I end up with the node version I need to use.May be I'm misunderstanding and should not
nvm use --delete-prefix vx.x.x?I was just thinking in something that let you
delete-prefixat.nvmrclevel, some kind of flag or similar. 🤷♂️ (that will make it easier to deal inside scripts)ljharb commentedon Feb 27, 2017
@elmorenocivitas
--delete-prefixshould be a command that's only needed once, and manually, after that your machine ideally never has a prefix to delete again :-)elmorenocivitas commentedon Feb 27, 2017
@ljharb for some reason it's necessary all the times here.
I'll double check the discussion above to see what's the issue.
Thanks for the fast answer!
[Docs] Use absolute URL for nvm-sh#606 in README.md
daviswhitehead commentedon May 1, 2019
I followed this comment to solve my issue.
#1245 (comment)
[Docs] Use absolute URL for nvm-sh#606 in README.md