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

Best way to have a default installation #42

Open
yoannmoinet opened this issue Feb 16, 2015 · 4 comments
Open

Best way to have a default installation #42

yoannmoinet opened this issue Feb 16, 2015 · 4 comments

Comments

@yoannmoinet
Copy link

I don't know if I have a misconfiguration or missing something, but I had to run nvmw use iojs or node each time my cmd is opened. Or else I couldn't use npm or any other global packages I've installed.

I've checked, and everything's correct, I have nvmw in my path.
But nothing for either iojs's or nodejs's npm.

So I've added nvmw's nodejs installation path into my System Path, to at least have nodejs as a default.

Is this correct? Because I can't set a default one from nvmw itself, for example if I decide to use iojs as a default, I'll have to set it myself into my System Path.

Docs would be great for this default configuration I guess.

@fengmk2
Copy link
Contributor

fengmk2 commented Feb 17, 2015

google found out the solution: http://superuser.com/questions/144347/is-there-windows-equivalent-of-the-bashrc-file-in-linux

In my test win8, I write two bat scripts:

  • cmd.bat
cmd.exe \k cmdrc.bat
  • cmdrc.bat
nvmw use iojs

image

So I run cmd.bat to auto use iojs by default every time.

image

@yoannmoinet
Copy link
Author

I already have a default, which is the one I've added manually to my Path (this is what nvmw does).
I don't need extra files for this, and use the same install of nodejs as nvmw.
But it's not my problem per se.

With both our solutions, if we decide to use the one that is not default, we'll need to make the change everytime we re-open the cmd. Or manually change something (Path or cmdrc.bat).

I think nvmw should change the default via nvmw use [default] and persist the choice accross cmd's sessions.

@simoneb
Copy link

simoneb commented Feb 19, 2015

@yoannmoinet I agree

@yoannmoinet
Copy link
Author

I'm currently working on a PR to add this feature.
I'll be able to post it this evening.

EDIT : My PR #43

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

3 participants