NPM(1)
π NPM(1) β npm, the javascript package manager π
okay bestie, welcome to the npm manual page. yes, that npm. the one you've been typing into your terminal since day one. pull up a chair, grab a strawberry π, and let's get into it.
β¨ NAME β¨
npm β javascript package manager
π Synopsis
npm
π«Ά real talk: this command is unaware of workspaces. like, it literally does not know they exist. don't ask it about workspaces.
π·οΈ Version
11.16.0
π DESCRIPTION π
npm is the package manager for the Node JavaScript platform. its whole job is putting modules in place so that node can find them, and managing dependency conflicts intelligently. no cap, that second part is the hard part.
it's extremely configurable β like, absurdly β so it fits basically any use case you've got. but most commonly you're using it to publish, discover, install, and develop node programs. that's the core four, that's the vibe.
run npm help to get a list of available commands. π
β οΈ IMPORTANT β οΈ
npm comes preconfigured to use npm's public registry at https://registry.npmjs.org by default. using the npm public registry means you're agreeing to the terms of use at https://docs.npmjs.com/policies/terms. read them, bestie, they're right there. π
you can also configure npm to use any compatible registry you like β even run your own. iconic. and if you're using someone else's registry, their terms of use govern that, not npm's. π«‘
π INTRODUCTION π
so you probably got npm because you want to install stuff. relatable. that's the whole dream.
the very first thing you'll most likely want to run in any node program is npm install, to install its dependencies. that's the moment. that's the main character energy.
you can also run npm install blerg to install the latest version of "blerg". check out npm help install for more info β it can do a lot of stuff, like genuinely a lot.
- use the
npm searchcommand to show everything that's available in the public registry π - use
npm lsto show everything you've installed π¦
π¦ DEPENDENCIES π¦
if a package lists a dependency using a git URL, npm will install that dependency using the git command, and will generate an error if it's not installed. so like, install git. π
if one of the packages npm tries to install is a native node module and requires compiling of C++ Code, npm will use node-gyp for that task.
- on a Unix system,
node-gypneeds Python, make, and a buildchain like GCC. - on Windows, you need Python and Microsoft Visual Studio C++.
for more information, hit up the node-gyp repository and the node-gyp Wiki. links below, bestie:
- node-gyp repository:
https://github.com/nodejs/node-gyp - node-gyp Wiki:
https://github.com/nodejs/node-gyp/wiki - git install guide:
https://github.com/git-guides/install-git
π DIRECTORIES π
see npm help folders to learn about where npm puts stuff. (it puts stuff places. important places.)
in particular, npm has two modes of operation:
- local mode: npm installs packages into the current project directory, which defaults to the current working directory. packages install to
./node_modules, and bins to./node_modules/.bin. - global mode: npm installs packages into the install prefix at
$NPM_CONFIG_PREFIX/lib/node_modulesand bins to$NPM_CONFIG_PREFIX/bin.
local mode is the default. use -g or --global on any command to run in global mode instead. β¨
π©βπ» DEVELOPER USAGE π©βπ»
if you're using npm to develop and publish your code, check out these help topics:
- json: make a
package.jsonfile. seepackage.json. - link: links your current working code into Node's path, so that you don't have to reinstall every time you make a change. use
npm help linkto do this. - install: it's a good idea to install things if you don't need the symbolic link. especially, installing other people's code from the registry is done via
npm help install. - adduser: create an account or log in. when you do this, npm will store credentials in the user config file.
- publish: use the
npm help publishcommand to upload your code to the registry. π
βοΈ CONFIGURATION βοΈ
npm is extremely configurable. it reads its configuration options from 5 places. five. count 'em.
- Command line switches: set a config with
--key val. all keys take a value, even if they are booleans (the config parser doesn't know what the options are at the time of parsing). if you do not provide a value (--key) then the option is set to booleantrue. - Environment Variables: set any config by prefixing the name in an environment variable with
NPM_CONFIG_. for example,export NPM_CONFIG_KEY=val. - User Configs: the file at
$HOME/.npmrcis an ini-formatted list of configs. if present, it is parsed. if theuserconfigoption is set in the cli or env, that file will be used instead. - Global Configs: the file found at
./etc/npmrc(relative to the global prefix) will be parsed if it is found. seenpm help prefixfor more info on the global prefix. if theglobalconfigoption is set in the cli, env, or user config, then that file is parsed instead. - Defaults: npm's default configuration options are defined in
lib/utils/config/definitions.js. π¨ These must not be changed. π¨
see npm help config for much, much, more information. like, much more. π
π«Ά CONTRIBUTIONS π«Ά
Patches welcome! fr fr.
if you would like to help, but don't know what to work on, read the contributing guidelines (https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) and check the issues list. π
π BUGS π
when you find issues, please report them:
please be sure to follow the template and the bug reporting guidelines. they're not decoration, bestie. π
π FEATURE REQUESTS π
discuss new feature ideas on our discussion forum:
or suggest formal RFC proposals:
π SEE ALSO π
npm help helppackage.jsonnpm help npmrcnpm help confignpm help installnpm help prefixnpm help publish
and that's the whole page, bestie!! π you made it to the end, which is honestly iconic of you.
this was npm version NPM@11.16.0, dated May 2026. slay, go install something. π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: npm24 24.18.1-160000.1.1 Β· MIT
- opensuse-leap 16.0: npm24 24.18.1-160000.1.1 Β· MIT
- opensuse-leap 16.0: npm24 24.18.1-160000.1.1 Β· MIT
- opensuse-leap 16.0: npm24 24.18.1-160000.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms