Specify Node Versions with .nvmrc

I’ve heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management. One tip I like to give new developers is adding a .nvmrc file to their repositories. The file contents is […]

The post Specify Node Versions with .nvmrc appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh

I’ve heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management.

One tip I like to give new developers is adding a .nvmrc file to their repositories. The file contents is just a simple string representing the version of Node.js the project requires:

v16

A project with this .nvmrc is specifying that Node.js v16 should be used. Any developer could then run nvm use to download, install, and switch to that version. A nvm install call would then install dependencies in line with that version.

The post Specify Node Versions with .nvmrc appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh


Print Share Comment Cite Upload Translate Updates
APA

David Walsh | Sciencx (2022-08-09T15:47:36+00:00) Specify Node Versions with .nvmrc. Retrieved from https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/

MLA
" » Specify Node Versions with .nvmrc." David Walsh | Sciencx - Tuesday August 9, 2022, https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/
HARVARD
David Walsh | Sciencx Tuesday August 9, 2022 » Specify Node Versions with .nvmrc., viewed ,<https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/>
VANCOUVER
David Walsh | Sciencx - » Specify Node Versions with .nvmrc. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/
CHICAGO
" » Specify Node Versions with .nvmrc." David Walsh | Sciencx - Accessed . https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/
IEEE
" » Specify Node Versions with .nvmrc." David Walsh | Sciencx [Online]. Available: https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/. [Accessed: ]
rf:citation
» Specify Node Versions with .nvmrc | David Walsh | Sciencx | https://www.scien.cx/2022/08/09/specify-node-versions-with-nvmrc/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.