Skip to content
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

Add support for a .node-version file #138

Open
nikolay opened this issue Oct 6, 2015 · 6 comments
Open

Add support for a .node-version file #138

nikolay opened this issue Oct 6, 2015 · 6 comments

Comments

@nikolay
Copy link

nikolay commented Oct 6, 2015

It would be nice to be able to install the node version specified in .node-version (similar to some Python and Ruby and environment managers). I don't think .nvmrc, which is used by nvm is a good choice, because it's tied to the nvm branding.

@nikolay
Copy link
Author

nikolay commented Feb 23, 2016

@ekalinin Any update?

@ekalinin
Copy link
Owner

Hey @nikolay
Sorry for delay.

Did you try .nodeenvrc?

Default values are:

➥ nodeenv --dump-config-defaults
    [nodeenv]
    debug = False
    jobs = 2
    make = make
    node = latest
    npm = latest
    prebuilt = False
    profile = False
    with_npm = False
    without_ssl = False

@agentreno
Copy link

Hi @ekalinin, this would be very useful for me as well, the main reason not to use .nodeenvrc would be to have the node version specified by the repository. If it lives at ~/.nodeenvrc it has to be the same for all environments. Or perhaps .nodeenvrc from the current folder could be used first if it exists?

@nikolay
Copy link
Author

nikolay commented Oct 7, 2016

@ekalinin I know that, but it is global per user - I need this per project. I have a per project virtualenv where I install nodeenv and thus I want the Node.js version to be specific for that virtualenv/project as well, not be globally configured as different projects may use different versions. There could be a hierarchy of the checks - project's home folder first, then in $HOME, then globally.

@canemacchina
Copy link

@ekalinin right, it would be very useful, specially if you think about a way to start contributing to a project: instead to know what version of node you should install, simply creating the virtual env the right version is automatically installed.

Furthermore, I suggest to use node engines, using the most newer version in range, instead a new and separate config file.

Could we open a pull request?

@shadowspawn
Copy link

I see support for .node-version file was added in #288

For interest, I have been documenting node version managers which read .node-version file:
https://github.com/shadowspawn/node-version-usage

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

No branches or pull requests

5 participants