install.5 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .TH "INSTALL" "5" "September 2021" "" ""
  2. .SH "NAME"
  3. \fBinstall\fR \- Download and install node and npm
  4. .SS Description
  5. .P
  6. To publish and install packages to and from the public npm registry, you
  7. must install Node\.js and the npm command line interface using either a Node
  8. version manager or a Node installer\. \fBWe strongly recommend using a Node
  9. version manager to install Node\.js and npm\.\fR We do not recommend using a
  10. Node installer, since the Node installation process installs npm in a
  11. directory with local permissions and can cause permissions errors when you
  12. run npm packages globally\.
  13. .SS Overview
  14. .RS 0
  15. .IP \(bu 2
  16. Checking your version of npm and
  17. Node\.js \fI#checking\-your\-version\-of\-npm\-and\-node\-js\fR
  18. .IP \(bu 2
  19. Using a Node version manager to install Node\.js and
  20. npm \fI#using\-a\-node\-version\-manager\-to\-install\-node\-js\-and\-npm\fR
  21. .IP \(bu 2
  22. Using a Node installer to install Node\.js and
  23. npm \fI#using\-a\-node\-installer\-to\-install\-node\-js\-and\-npm\fR
  24. .RE
  25. .SS Checking your version of npm and Node\.js
  26. .P
  27. To see if you already have Node\.js and npm installed and check the
  28. installed version, run the following commands:
  29. .P
  30. .RS 2
  31. .nf
  32. node \-v
  33. npm \-v
  34. .fi
  35. .RE
  36. .SS Using a Node version manager to install Node\.js and npm
  37. .P
  38. Node version managers allow you to install and switch between multiple
  39. versions of Node\.js and npm on your system so you can test your
  40. applications on multiple versions of npm to ensure they work for users on
  41. different versions\.
  42. .SS OSX or Linux Node version managers
  43. .RS 0
  44. .IP \(bu 2
  45. nvm \fIhttps://github\.com/creationix/nvm\fR
  46. .IP \(bu 2
  47. n \fIhttps://github\.com/tj/n\fR
  48. .RE
  49. .SS Windows Node version managers
  50. .RS 0
  51. .IP \(bu 2
  52. nodist \fIhttps://github\.com/marcelklehr/nodist\fR
  53. .IP \(bu 2
  54. nvm\-windows \fIhttps://github\.com/coreybutler/nvm\-windows\fR
  55. .RE
  56. .SS Using a Node installer to install Node\.js and npm
  57. .P
  58. If you are unable to use a Node version manager, you can use a Node
  59. installer to install both Node\.js and npm on your system\.
  60. .RS 0
  61. .IP \(bu 2
  62. Node\.js installer \fIhttps://nodejs\.org/en/download/\fR
  63. .IP \(bu 2
  64. NodeSource installer \fIhttps://github\.com/nodesource/distributions\fR\|\. If
  65. you use Linux, we recommend that you use a NodeSource installer\.
  66. .RE
  67. .SS OS X or Windows Node installers
  68. .P
  69. If you're using OS X or Windows, use one of the installers from the
  70. Node\.js download page \fIhttps://nodejs\.org/en/download/\fR\|\. Be sure to
  71. install the version labeled \fBLTS\fR\|\. Other versions have not yet been
  72. tested with npm\.
  73. .SS Linux or other operating systems Node installers
  74. .P
  75. If you're using Linux or another operating system, use one of the following
  76. installers:
  77. .RS 0
  78. .IP \(bu 2
  79. NodeSource installer \fIhttps://github\.com/nodesource/distributions\fR
  80. (recommended)
  81. .IP \(bu 2
  82. One of the installers on the Node\.js download
  83. page \fIhttps://nodejs\.org/en/download/\fR
  84. .RE
  85. .P
  86. Or see this page \fIhttps://nodejs\.org/en/download/package\-manager/\fR to
  87. install npm for Linux in the way many Linux developers prefer\.
  88. .SS Less\-common operating systems
  89. .P
  90. For more information on installing Node\.js on a variety of operating
  91. systems, see this page \fIhttps://nodejs\.org/en/download/package\-manager/\fR\|\.