Nvm: per project configuration with .node-version

Created on 3 May 2013  ·  6Comments  ·  Source: nvm-sh/nvm

It would be cool if I just could put something like this into my project directory and nvm would use the specified node version (google .ruby-version as a simple example how to do this with rvm). Or is this possible right now and I just missed something? ^^

    # ~/projects/awesome_thingy/.node-version
    0.10.5
    # ~/projects/older_thingy/.node-version
    0.8

Most helpful comment

For those who find this on a search, it seems there's a project out there https://github.com/wbyoung/avn (automatic versioning for node) designed to address this.

All 6 comments

I think we already have this: https://github.com/creationix/nvm/pull/192

So I really did miss it, thanks. But somehow that's only half the way because I still have to do nvm use manually every time right?

Yes. I think we've had some discussions about this and that there's no simple way to provide automatic version switching short of overriding cd (which is bad IMO) or providing shims like what rbenv does (which I think is a good idea but probably not trivial to implement.)

True :+1:

Seems like this should be closed. Reopen if not :-)

For those who find this on a search, it seems there's a project out there https://github.com/wbyoung/avn (automatic versioning for node) designed to address this.

Was this page helpful?
0 / 5 - 0 ratings