Managing multiple versions of Node.js can be cumbersome, especially when working on different projects that require different versions. On Unix-based systems, nvm
(Node Version Manager) allows users to switch between different versions of Node.js seamlessly. However, on Windows, nvm
behaves differently and does not automatically switch versions based on the .nvmrc
file. This script automates the process of switching Node.js versions on Windows using nvm-windows
.
# Load nvm and automatically use the Node version specified in .nvmrc
load-nvmrc() {