NPM-INSTALL(5)
πΈ NAME πΈ
Install β download and install node and npm
okay so hi bestie, welcome to npm-install(5) π this is literally the "how do I even get node and npm onto my machine" page, and the answer is very slay but also please read the warning part, k? π«Ά
π Description
To publish packages to the public npm registry and install them from it, you must have Node.js and the npm command line interface installed β using either a Node version manager or a Node installer. that's the whole situation.
We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, and here's the tea π«: the Node installation process installs npm in a directory with local permissions, and that can cause permissions errors when you run npm packages globally. so likeβ¦ not the move, ngl. π
β¨ Overview β¨
- (Checking your version of npm and Node.js)
- (Using a Node version manager to install Node.js and npm)
- (Using a Node installer to install Node.js and npm)
π¦ Checking your version of npm and Node.js
wanna know if you already have Node.js and npm installed, and which version you're on? run these, exactly these:
node -v
npm -v
that's it, that's the check π
π§ Using a Node version manager to install Node.js and npm
Node version managers let you install multiple versions of Node.js and npm on your system and switch between them β so you can test your applications on multiple versions of npm and make sure they work for users on different versions. highkey iconic behavior π
you can search for them on GitHub: https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch
π₯ Using a Node installer to install Node.js and npm
if a Node version manager just isn't happening for you, you can use a Node installer to install both Node.js and npm on your system.
- Node.js installer β
https://nodejs.org/en/download/ - NodeSource installer β
https://github.com/nodesource/distributions. if you use Linux, we recommend that you use a NodeSource installer.
π macOS or Windows Node installers
on macOS 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
on Linux or another operating system? use one of these:
- NodeSource installer β
https://github.com/nodesource/distributions(recommended β ) - 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 π§β¨
and that's the whole page bestie π this was npm-install(5), served fresh from npm@12.2.1 β go forth and install responsibly, mwah ππ
π¦ where this page comes from
- arch rolling: npm 12.2.1-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms