Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

OSX: Play nice with version managers like nvm #19

Open
ryanmurakami opened this issue Jul 1, 2016 · 12 comments
Open

OSX: Play nice with version managers like nvm #19

ryanmurakami opened this issue Jul 1, 2016 · 12 comments

Comments

@ryanmurakami
Copy link

With nvm installed, it seems that the install of an updated version doesn't quite work. After updating from the installer, the binary is installed in /usr/bin/local/, but $ which node shows that nvm still has the global node. (Example output: /Users/rylewis/.nvm/versions/node/v6.2.0/bin/node).

It would be nice to either detect that a version manager is being used and message something, or perhaps override the location of node (this might be a little destructive and may need to do some specific messaging).

@MylesBorins
Copy link
Member

Did you try, nvm use system?

You can make it the default

nvm alias default system

It may be a good idea for us to consider installing and using the same
folder schema as nvm
/cc @ljharb
On Jul 1, 2016 2:14 PM, "Ryan Lewis" notifications@github.com wrote:

With nvm https://github.com/creationix/nvm installed, it seems that the
install of an updated version doesn't quite work. After updating from the
installer, the binary is installed in /usr/bin/local/, but $ which node
shows that nvm still has the global node. (Example output:
/Users/rylewis/.nvm/versions/node/v6.2.0/bin/node).

It would be nice to either detect that a version manager is being used and
message something, or perhaps override the location of node (this might be
a little destructive and may need to do some specific messaging).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#19, or mute the thread
https://github.com/notifications/unsubscribe/AAecV8YIAxYZBRyrf6FjNRj8JZmCUi5Wks5qRYMpgaJpZM4JDfCp
.

@ryanmurakami
Copy link
Author

@thealphanerd Thanks for the reply! I know there's ways around it. I was just thinking from a user standpoint that may not quite understand how these things work. I think either having some messaging, or options to override nvm, would improve the user experience. Of course, I know this project is in its inception, just wanted to throw in my two cents. :-)

@ryanmurakami
Copy link
Author

The hope is that messaging/auto-resolution will prevent issues like #20 from popping up in the future. :-)

@ljharb
Copy link
Member

ljharb commented Jul 2, 2016

@ryanmurakami after using the installer, does nvm use system use the proper one? I'd not expect the node installer to do anything except install a system node, which nvm works with just fine.

@gr2m
Copy link

gr2m commented Jul 2, 2016

I think at this early stage, I would mention nvm in the README and if you can detect it during runtime, log a warning and maybe reference this issue?

@ryanmurakami
Copy link
Author

@ljharb Yep, nvm use system will set the current resolving node to the /usr/local/bin one.
@gr2m I agree, a README mention for now should be fine, but I think smoothing out this type of thing should stay as a goal for the installer. In that regard, a log to the console should probably be avoided, and a message in the installer window should be the target.

@mikeal
Copy link
Contributor

mikeal commented Jul 5, 2016

We should at least detect nvm and warn them that it won't be compatible.

Long term this package should probably include a version manager. However, that version manager will need to work on Windows and probably be in pure Node.js rather than the bash based ones that seem to dominate the current ecosystem.

@ljharb
Copy link
Member

ljharb commented Jul 5, 2016

@mikeal how could you have a node version manager written in node? A version manager needs to be able to install a version of node on a system that lacks it entirely.

@mikeal
Copy link
Contributor

mikeal commented Jul 5, 2016

It can rely on Node.js if it lives in the Installer :)

@ryanmurakami
Copy link
Author

Are there other node version managers to be aware of? I don't think homebrew or n would cause any overlap with the installer. Can't really think of any other ones though...

@ljharb
Copy link
Member

ljharb commented Jul 5, 2016

also nave, avn, nvm-windows, plus i'm sure a handful of others.

@trstringer
Copy link

Agreed with @mikeal for true portability this would have to be able to run on Windows. Might be a good opportunity to have a node-only solution to version management.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants