Fallback to .nvmrc if Node version not specified


For projects that use NVM, it would be great to fallback to the .nvmrc file if a Node version isn’t specified in circle.yml. This would allow for a DRYer config and guarantee that devs working locally (i.e. nvm use) are using the same version as CircleCI.

Travis CI follows this paradigm: http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Using-.nvmrc.

Different node versions per directory?

Yes, please! Our developer tools follow the same convention – they invoke nvm use – and right now we have to keep .nvmrc and circle.yml in sync. If the inference checked .nvmrc we wouldn’t need to do this – and also plenty of builds would tend to “just work” without any config.


This would be extremely helpful


Completely agree. If a node version is not specified in the circle.yml, but there is a .nvmrc, seems logical to call nvm use and set that version as the default for everything following.

Until then, I’ve been putting this snippet in every circle.yml:

    # Use the node version declared in .nvmrc
    - nvm use && nvm alias default $(nvm current)

Of course, if nvm was enhanced to use the circle.yml file that would work for me too. :slight_smile:


This might be useful at some point. Just leaving this here:



This is a bit old now. is this doable/possible for 2.0?


@levlaz Any chance we could get this feature implemented?