gracelaha.blogg.se

Switch node version windows
Switch node version windows








In this tutorial we walked through installing the nvm bash script and making sure it works. Tip: Use nvm alias default to switch the version of Node.js used by default when starting a new shell. Switch to the latest installed version: nvm use node To switch to another version for the active shell use nvm use.įor a specific version provide a version number: nvm use 10.16.3 You can then switch between them depending on which project you're working on. The real benefit of nvm comes when you install different versions of Node.js. Use nvm to install other versions of Node.js You can change this behavior using the nvm alias command.Įxample to set the default version of node to use when starting a new shell to 10.0.0: nvm alias default 10.0.0

switch node version windows

Practically this means that anytime you start a new shell, and the nvm.sh script is sourced, it will default that shell to using the installed lts release. This indicates that nvm has set lts/* as the default alias. Note this line Creating default alias: default -> lts/* (-> v10.16.3). Verify it worked, and that the version is correct: node -version nvm install -ltsĭownloading and installing node v10.16.3. Now that you've got nvm installed let's use it to install, and use, the current LTS version of Node.js. Use nvm to install the latest LTS release of Node.js

switch node version windows

If you're using Windows check out this Windows-specific version of nvm.įinally, run the nvm command to get a list of all the available sub-commands and to further verify that installation worked.

switch node version windows

Windows users: The process for installing nvm on Windows is different than what's shown below. The official documentation for how to install nvm, and some common trouble shooting tips, is in the project's README. If you're installing Node.js on your production environment you should consider using your OS's package manager, or your server tooling of choice, to install and lock the environment to a specific version of Node.js. Note: We do not recommend using nvm to install Node.js for production environments. Learn more about why we recommend using NVM in Overview: Manage Node.js Locally. To use it, you need to first install the bash script, and add it to your shell's $PATH. The nvm command is a POSIX-compliant bash script that makes it easier to manage multiple Node.js versions on a single environment. Install and manage a local installation of node using nvm.










Switch node version windows