
This was my lot in life, until a co-worker clued me in to an awesome tool called Node Version Manager (NVM). It’s not easy, it’s something I forget to do frequently (until I have an unexplained issue during development), and frankly, it’s just not the easiest thing to do on a Mac. I’m sure I’m also not alone when I tell you that the AngularJS application will ONLY run on Node.js version 9 (it crashes and causes weird bugs if it’s not), and our React application needs Node version 10 or above to take advantage of all the ES6 and beyond features.Īnd you know what? Switching between Node environments for local development is kind of a pain. The end goal is that the React application will one day host the entire application on its own. The two work together to serve up a single user experience, while we slowly migrate over the existing screens and functionality from the old, AngularJS application into the new, React application. I’m sure I’m not alone when I tell you that my current development team owns two different UI applications: one built in AngularJS (the old one) and one built in React (the new one). Less-common operating systemsįor more information on installing Node.js on a variety of operating systems, see this page.NVM - a simple bash script to manage multiple active Node.js versions Multiple Node Environments are a Pain to Develop In Locally Or see this page to install npm for Linux in the way many Linux developers prefer.

Other versions have not yet been tested with npm. Be sure to install the version labeled LTS.

If you're using OS X or Windows, use one of the installers from the Node.js download page. If you use Linux, we recommend that you use a NodeSource installer. If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.

Using a Node installer to install Node.js and npm Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.

Npm -v Using a Node version manager to install Node.js and npm
