11cb0ef41Sopenharmony_ci---
21cb0ef41Sopenharmony_cititle: install
31cb0ef41Sopenharmony_cisection: 5
41cb0ef41Sopenharmony_cidescription: Download and install node and npm
51cb0ef41Sopenharmony_ci---
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci### Description
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ciTo publish and install packages to and from the public npm registry, you
101cb0ef41Sopenharmony_cimust install Node.js and the npm command line interface using either a Node
111cb0ef41Sopenharmony_civersion manager or a Node installer. **We strongly recommend using a Node
121cb0ef41Sopenharmony_civersion manager to install Node.js and npm.** We do not recommend using a
131cb0ef41Sopenharmony_ciNode installer, since the Node installation process installs npm in a
141cb0ef41Sopenharmony_cidirectory with local permissions and can cause permissions errors when you
151cb0ef41Sopenharmony_cirun npm packages globally.
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_ci### Overview
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_ci- [Checking your version of npm and
201cb0ef41Sopenharmony_ci  Node.js](#checking-your-version-of-npm-and-nodejs)
211cb0ef41Sopenharmony_ci- [Using a Node version manager to install Node.js and
221cb0ef41Sopenharmony_ci  npm](#using-a-node-version-manager-to-install-nodejs-and-npm)
231cb0ef41Sopenharmony_ci- [Using a Node installer to install Node.js and
241cb0ef41Sopenharmony_ci  npm](#using-a-node-installer-to-install-nodejs-and-npm)
251cb0ef41Sopenharmony_ci
261cb0ef41Sopenharmony_ci### Checking your version of npm and Node.js
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ciTo see if you already have Node.js and npm installed and check the
291cb0ef41Sopenharmony_ciinstalled version, run the following commands:
301cb0ef41Sopenharmony_ci
311cb0ef41Sopenharmony_ci```
321cb0ef41Sopenharmony_cinode -v
331cb0ef41Sopenharmony_cinpm -v
341cb0ef41Sopenharmony_ci```
351cb0ef41Sopenharmony_ci
361cb0ef41Sopenharmony_ci### Using a Node version manager to install Node.js and npm
371cb0ef41Sopenharmony_ci
381cb0ef41Sopenharmony_ciNode version managers allow you to install and switch between multiple
391cb0ef41Sopenharmony_civersions of Node.js and npm on your system so you can test your
401cb0ef41Sopenharmony_ciapplications on multiple versions of npm to ensure they work for users on
411cb0ef41Sopenharmony_cidifferent versions.  You can
421cb0ef41Sopenharmony_ci[search for them on GitHub](https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch).
431cb0ef41Sopenharmony_ci
441cb0ef41Sopenharmony_ci### Using a Node installer to install Node.js and npm
451cb0ef41Sopenharmony_ci
461cb0ef41Sopenharmony_ciIf you are unable to use a Node version manager, you can use a Node
471cb0ef41Sopenharmony_ciinstaller to install both Node.js and npm on your system.
481cb0ef41Sopenharmony_ci
491cb0ef41Sopenharmony_ci* [Node.js installer](https://nodejs.org/en/download/)
501cb0ef41Sopenharmony_ci* [NodeSource installer](https://github.com/nodesource/distributions). If
511cb0ef41Sopenharmony_ci  you use Linux, we recommend that you use a NodeSource installer.
521cb0ef41Sopenharmony_ci
531cb0ef41Sopenharmony_ci#### OS X or Windows Node installers
541cb0ef41Sopenharmony_ci
551cb0ef41Sopenharmony_ciIf you're using OS X or Windows, use one of the installers from the
561cb0ef41Sopenharmony_ci[Node.js download page](https://nodejs.org/en/download/). Be sure to
571cb0ef41Sopenharmony_ciinstall the version labeled **LTS**. Other versions have not yet been
581cb0ef41Sopenharmony_citested with npm.
591cb0ef41Sopenharmony_ci
601cb0ef41Sopenharmony_ci#### Linux or other operating systems Node installers
611cb0ef41Sopenharmony_ci
621cb0ef41Sopenharmony_ciIf you're using Linux or another operating system, use one of the following
631cb0ef41Sopenharmony_ciinstallers:
641cb0ef41Sopenharmony_ci
651cb0ef41Sopenharmony_ci- [NodeSource installer](https://github.com/nodesource/distributions)
661cb0ef41Sopenharmony_ci  (recommended)
671cb0ef41Sopenharmony_ci- One of the installers on the [Node.js download
681cb0ef41Sopenharmony_ci  page](https://nodejs.org/en/download/)
691cb0ef41Sopenharmony_ci
701cb0ef41Sopenharmony_ciOr see [this page](https://nodejs.org/en/download/package-manager/) to
711cb0ef41Sopenharmony_ciinstall npm for Linux in the way many Linux developers prefer.
721cb0ef41Sopenharmony_ci
731cb0ef41Sopenharmony_ci#### Less-common operating systems
741cb0ef41Sopenharmony_ci
751cb0ef41Sopenharmony_ciFor more information on installing Node.js on a variety of operating
761cb0ef41Sopenharmony_cisystems, see [this page][pkg-mgr].
771cb0ef41Sopenharmony_ci
781cb0ef41Sopenharmony_ci[pkg-mgr]: https://nodejs.org/en/download/package-manager/
79