greceleb.blogg.se

Install node on debian
Install node on debian






install node on debian

Even though installing the packaged version from the NodeSource repository is easier, the nvm method gives you more flexibility for adding and removing different Node.js versions on a per-user basis. The method you choose depends on your requirements and preferences. We have shown you two different ways to install Node.js and npm on your Debian 9 server. If for some reasons you want to uninstall Node.js and npm packages, you can use the following command: sudo apt remove nodejs npm Conclusion # sudo apt install build-essential Uninstall Node.js # To compile and install native add-ons from the npm registry you need to install the development tools. To set version 8.11.3 as the default Node.js version type: nvm alias default 8.11.3 Install development tools # If you want to change the currently active version use the following command: nvm use 8.11.3Īnd verify it by typing: nvm current v8.11.3 The default version is the version that will be used when you open new shell sessions. In the output above, the entry with an arrow on the right (-> v6.14.3), is the version used in the current shell session and the default version is set to v10.5.0. Once LTS version and 6.14.3 are installed we can list installed Node.js instances by typing: nvm ls -> v6.14.3 # ACTIVE VERSIONĭefault -> node (-> v10.5.0) # DEFAULT VERSION Let’s install two more versions, the latest LTS version and version 6.14.3: nvm install -lts nvm install 6.14.3 Verify the Node.js version, by typing: node -version v10.5.0 Now that you have nvm installed on your Debian machine, to install the latest available version of Node.js, type: nvm install node Downloading and installing node v10.5.0. To ensure that nvm is properly installed type: nvm -version 0.33.11

install node on debian install node on debian

To the nvm script to your current session. "$NVM_DIR/bash_completion" # This loads nvm bash_completionĪs the output above suggests, you can either open a new shell session or run the commands to add the path

install node on debian

=> Close and reopen your terminal to start using nvm or run the following to use it now: To the ~/.nvm directory and adds the nvm path to your Bash or ZSH profile. The installation script clones the nvm repository from Github With NVM you can install and uninstall any specific Node.js version that you want to use or test.ĭownload the nvm install script with the following curl command NVM (Node Version Manager) is a bash script that allows you to manage multiple Node.js versions. To verify if the installation was successful, print the Node.js and npm versions: node -version v8.11.3 Once the NodeSource repository is added install Node.js and npm with the following command: sudo apt install nodejs If you want to install Node.js version 10.x just change setup_8.x with setup_10.x The current LTS version of Node.js is version 8.x, Carbon.








Install node on debian