Go to main content

man pages section 5: File Formats

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

install (5)

Name

install - Download and install node and npm Description To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recom- mend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause per- missions errors when you run npm packages globally. Overview o Checking your version of npm and Node.js #checking-your-ver- sion-of-npm-and-node-js o Using a Node version manager to install Node.js and npm #using-a-node-version-manager-to-install-node-js-and-npm o Using a Node installer to install Node.js and npm #using-a-node-in- staller-to-install-node-js-and-npm Checking your version of npm and Node.js To see if you already have Node.js and npm installed and check the installed version, run the following commands: node -v npm -v Using a Node version manager 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 appli- cations on multiple versions of npm to ensure they work for users on different versions. OSX or Linux Node version managers o nvm https://github.com/creationix/nvm o n https://github.com/tj/n Windows Node version managers o nodist https://github.com/marcelklehr/nodist o nvm-windows https://github.com/coreybutler/nvm-windows Using a Node installer to install Node.js and npm If you are unable to use a Node version manager, you can use a Node in- staller to install both Node.js and npm on your system. o Node.js installer https://nodejs.org/en/download/ o NodeSource installer https://github.com/nodesource/distributions. If you use Linux, we recommend that you use a NodeSource installer. OS X or Windows Node installers If you're using OS X or Windows, use one of the installers from the Node.js download page https://nodejs.org/en/download/. Be sure to install the version labeled LTS. Other versions have not yet been tested with npm. Linux or other operating systems Node installers If you're using Linux or another operating system, use one of the fol- lowing installers: o NodeSource installer https://github.com/nodesource/distributions (recommended) o One of the installers on the Node.js download page https://nodejs.org/en/download/ Or see this page https://nodejs.org/en/download/package-manager/ to install npm for Linux in the way many Linux developers prefer. Less-common operating systems For more information on installing Node.js on a variety of operating systems, see this page https://nodejs.org/en/download/package-manager/.

Synopsis

Please see following description for synopsis

Description

INSTALL(5)                                                          INSTALL(5)



NAME
       install - Download and install node and npm

   Description
       To  publish  and  install packages to and from the public npm registry,
       you must install Node.js and  the  npm  command  line  interface  using
       either  a  Node version manager or a Node installer. We strongly recom-
       mend using a Node version manager to install Node.js and npm. We do not
       recommend  using  a Node installer, since the Node installation process
       installs npm in a directory with local permissions and can  cause  per-
       missions errors when you run npm packages globally.

   Overview
       o Checking   your   version  of  npm  and  Node.js  #checking-your-ver-
         sion-of-npm-and-node-js

       o Using  a  Node  version  manager   to   install   Node.js   and   npm
         #using-a-node-version-manager-to-install-node-js-and-npm

       o Using  a  Node installer to install Node.js and npm #using-a-node-in-
         staller-to-install-node-js-and-npm


   Checking your version of npm and Node.js
       To see if you already have Node.js and  npm  installed  and  check  the
       installed version, run the following commands:

         node -v
         npm -v

   Using a Node version manager 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  appli-
       cations  on  multiple  versions of npm to ensure they work for users on
       different versions.

   OSX or Linux Node version managers
       o nvm https://github.com/creationix/nvm

       o n https://github.com/tj/n


   Windows Node version managers
       o nodist https://github.com/marcelklehr/nodist

       o nvm-windows https://github.com/coreybutler/nvm-windows


   Using a Node installer to install Node.js and npm
       If you are unable to use a Node version manager, you can use a Node in-
       staller to install both Node.js and npm on your system.

       o Node.js installer https://nodejs.org/en/download/

       o NodeSource  installer https://github.com/nodesource/distributions. If
         you use Linux, we recommend that you use a NodeSource installer.


   OS X or Windows Node installers
       If you're using OS X or Windows, use one of  the  installers  from  the
       Node.js  download  page  https://nodejs.org/en/download/.  Be  sure  to
       install the version labeled LTS.  Other  versions  have  not  yet  been
       tested with npm.

   Linux or other operating systems Node installers
       If  you're using Linux or another operating system, use one of the fol-
       lowing installers:

       o NodeSource   installer    https://github.com/nodesource/distributions
         (recommended)

       o One    of    the    installers   on   the   Node.js   download   page
         https://nodejs.org/en/download/


       Or see  this  page  https://nodejs.org/en/download/package-manager/  to
       install npm for Linux in the way many Linux developers prefer.

   Less-common operating systems
       For  more  information  on installing Node.js on a variety of operating
       systems, see this page https://nodejs.org/en/download/package-manager/.



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+--------------------------+
       |ATTRIBUTE TYPE |     ATTRIBUTE VALUE      |
       +---------------+--------------------------+
       |Availability   | runtime/nodejs/nodejs-18 |
       +---------------+--------------------------+
       |Stability      | Pass-thru volatile       |
       +---------------+--------------------------+

NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source   was   downloaded   from     https://github.com/nodejs/node/ar-
       chive/v18.1.0.zip.

       Further information about this software can be found on the open source
       community website at https://github.com/nodejs/node.



                                  April 2022                        INSTALL(5)