{"data":{"allMdx":{"nodes":[{"id":"b1d3cb34-c318-586b-9266-222d028078c6","frontmatter":{"title":"npm Documentation"},"rawBody":"---\ntitle: npm Documentation\ngithub_path: src/nav-base.yml\n---\n\nimport {HeroLayout, Index} from 'gatsby-theme-doctornpm'\nexport default HeroLayout\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index depth='1' />\n"},{"id":"ca8a760e-3a4c-5184-a59d-d2242e27efcb","frontmatter":{"title":"About npm"},"rawBody":"---\ntitle: About npm\nredirect_from: [ /getting-started/what-is-npm ]\n---\n\nnpm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.\n\nnpm consists of three distinct components:\n\n*  the website\n*  the Command Line Interface (CLI)\n*  the registry\n\nUse the [*website*](https://npmjs.com) to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up [organizations](https://www.npmjs.com/features) to manage access to public or private packages.\n\nThe [*CLI*](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.\n\nThe [*registry*](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.\n\n\n## Use npm to . . .\n\n* Adapt packages of code for your apps, or incorporate packages as they are.\n* Download standalone tools you can use right away.\n* Run packages without downloading using [npx](https://www.npmjs.com/package/npx).\n* Share code with any npm user, anywhere.\n* Restrict code to specific developers.\n* Create organizations to coordinate package maintenance, coding, and developers.\n* Form virtual teams by using organizations.\n* Manage multiple versions of code and code dependencies.\n* Update applications easily when underlying code is updated.\n* Discover multiple ways to solve the same puzzle.\n* Find other developers who are working on similar problems and projects.  \n\n## Getting started\n\nTo get started with npm, you can [create an account](https://www.npmjs.com/signup), which will be available at http://www.npmjs.com/~*yourusername*.\n\nAfter you set up an npm account, the next step is to use the command line interface (CLI) to [install npm][install-npm]. We look forward to seeing what you create!\n\n## Sharing packages and collaborating with others\n\nIf you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called **[npm organizations][orgs-docs]**,  and invite others to work with you, privately (for a fee) or publicly (for free).\n\nYou can also use a private npm package registry like [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org) project.  This lets you develop packages internally that are not shared publicly.\n\n## Learn more\n\nTo learn more about npm as a product, upcoming new features, and interesting uses of npm be sure to follow [@npmjs](https://twitter.com/npmjs) on Twitter.\n\nFor mentoring, tutorials, and learning, visit [node school](https://nodeschool.io). Consider attending or hosting a nodeschool event (usually free!) at a site near you, or use the self-help tools you can find on the site.\n\n### CLI reference documentation\n\nWhile relevant CLI commands are covered throughout this user documentation, the CLI includes command line help, its own [documentation section, and instant help (man pages)][cli-docs].\n\n\n[orgs-docs]: /organizations\n[install-npm]: /downloading-and-installing-node-js-and-npm\n[cli-docs]: /cli-documentation\n"},{"id":"028ebb4b-3500-54d5-bf3f-b8a1f287451c","frontmatter":{"title":"Sunsetting npm Enterprise"},"rawBody":"---\ntitle: Sunsetting npm Enterprise\nredirect_from:\n  - /configuring-your-registry-settings-as-an-npm-enterprise-user\n  - /logging-in-to-an-npm-enterprise-registry-from-the-command-line\n  - /enterprise/setup-and-configuration\n  - /getting-started-with-npm-enterprise\n  - /configuring-an-authentication-provider\n  - /defining-security-policy\n  - /enterprise/billing-and-seat-management\n  - /purchasing-or-removing-seats\n  - /updating-billing-information\n  - /enterprise/user-management\n  - /about-the-enterprise-admin-user\n  - /promoting-a-non-admin-user-to-admin\n  - /demoting-an-admin-to-a-non-admin-user\n  - /management/managing-user-security\n  - /viewing-deactivating-and-reactivating-users\n  - /creating-and-managing-organizations-and-teams\n  - /permanently-deleting-a-user\n  - /npm-enterprise-roles-and-permissions\n  - /enterprise/migration\n  - /migrating-from-an-existing-enterprise-instance\n  - /migrating-from-an-organization-on-the-public-registry\n  - /enterprise/end-of-life\n  - /enterprise/sunset\n  - /sunsetting-npm-enterprise\n---\n\nIn March 2020, npm was acquired by GitHub. On June 30, 2020, we notified npm Enterprise (npmE) customers of our intent to sunset npm Enterprise. **npm Enterprise will be supported until June 30, 2021**, and we will renew contracts for npmE until that date. We encourage all npmE customers to evaluate and migrate to GitHub Packages.\n\nCustomers who already have one of GitHub’s Free, Teams, or Enterprise Cloud plans already receive monthly storage and bandwidth resources for GitHub Packages as part of their plan. To begin evaluating GitHub Packages, visit our documentation on [publishing with GitHub Packages](https://help.github.com/en/packages/publishing-and-managing-packages/publishing-a-package) directly from your repository.\n\n"},{"id":"04274fc7-1338-5e10-b60b-7be57c867f00","frontmatter":{"title":"Getting started"},"rawBody":"---\ntitle: Getting started\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"d7674a58-c742-5bc8-bafe-b9e142e0d57d","frontmatter":{"title":"Integrations"},"rawBody":"---\ntitle: Integrations\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"e0c85eb9-b9f8-5c9a-819b-1a7880d33b12","frontmatter":{"title":"Organizations"},"rawBody":"---\ntitle: Organizations\nredirect_from:\n  - /getting-started/working-with-orgs\n  - /orgs\n---\n\nimport {Link} from '@primer/components'\nimport shared from '../../src/shared.js'\n\n<>Organizations allow teams of contributors to read and write public and private packages.  Organizations are free when they publish public packages.  When organizations publish private packages, an npm Teams subscription is required. For more information on npm Teams pricing, see our <Link href=\"https://www.npmjs.com/pricing\">products page</Link>.</>\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"eccb2d02-faa7-565b-8b28-d64a7a57d101","frontmatter":{"title":"Packages and modules"},"rawBody":"---\ntitle: Packages and modules\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"58db92e8-dce3-5a1e-b913-f79c2a48b295","frontmatter":{"title":"npm Code of Conduct"},"rawBody":"---\ntitle: npm Code of Conduct\nedit_on_github: false\n---\nnpm exists to facilitate sharing code, by making it easy for\nJavaScript module developers to publish and distribute packages.\n\nnpm is a piece of technology, but more importantly, it is a community.\n\nWe believe that our mission is best served in an environment that is\nfriendly, safe, and accepting; free from intimidation or harassment.\n\nTowards this end, certain behaviors and practices will not be\ntolerated.\n\n## tl;dr\n\n* Be respectful.\n* We're here to help\n* Abusive behavior is never tolerated.\n* Data published to npm is hosted at the discretion of the service\n  administrators, and may be removed.\n* Violations of this code may result in swift and permanent expulsion\n  from the npm community.\n\n## Scope\n\nWe expect all members of the npm community, including paid and unpaid\nagents, administrators, users, and customers of npm, Inc., to abide by\nthis Code of Conduct at all times in all npm community venues, online\nand in person, and in one-on-one communications pertaining to npm\naffairs.\n\nThis policy covers the usage of the npm registry, as well as the npm\nwebsite, npm related events, and any other services offered by or on\nbehalf of npm, Inc. (collectively, the \"Service\").  It also applies to\nbehavior in the context of the npm Open Source project communities,\nincluding but not limited to public GitHub repositories, IRC channels,\nsocial media, mailing lists, and public events.\n\nThis Code of Conduct is in addition to, and does not in any way\nnullify or invalidate, any other terms or conditions related to use of\nthe Service.\n\nThe definitions of various subjective terms such as \"discriminatory\",\n\"hateful\", or \"confusing\" will be decided at the sole discretion of\nthe npm abuse team.\n\n## Friendly Harassment-Free Space\n\nWe are committed to providing a friendly, safe and welcoming\nenvironment for all, regardless of gender identity, sexual\norientation, ability, ethnicity, religion, age, physical\nappearance, body size, race, or similar personal characteristics.\n\nWe ask that you please respect that people have differences of opinion\nregarding technical choices, and that every design or implementation\nchoice carries a trade-off and numerous costs.  There is seldom a\nsingle right answer.  A difference of technology preferences is not a\nlicense to be rude.\n\nDisputes over package rights must be handled respectfully, according\nto the terms described in the [Disputes Policy][disputes].\nThere is never a good reason to be rude over package name disputes.\n\nAny spamming, trolling, flaming, baiting, or other attention-stealing\nbehavior is not welcome, and will not be tolerated.\n\nHarassing other users of the Service is never tolerated, whether via\npublic or private media.\n\nAvoid using offensive or harassing package names, nicknames, or other\nidentifiers that might detract from a friendly, safe, and welcoming\nenvironment for all.\n\nHarassment includes, but is not limited to: harmful or prejudicial\nverbal or written comments related to gender identity, sexual\norientation, ability, ethnicity, religion, age, physical\nappearance, body size, race, or similar personal characteristics;\ninappropriate use of nudity, sexual images, and/or sexually explicit\nlanguage in public spaces; threats of physical or non-physical harm;\ndeliberate intimidation, stalking or following; harassing photography\nor recording; sustained disruption of talks or other events;\ninappropriate physical contact; and unwelcome sexual attention.\n\n## Acceptable Use\n\nThe Service administrators reserve the right to make judgment calls\nabout what is and isn't appropriate in published packages, package names,\nuser and organization names, and other public content. Package that\nviolates the npm Service's\n[Acceptable Use][acceptable-use]\nrules including its\n[Acceptable Content][acceptable-content]\nrules will be deleted, at the discretion of npm.\n\n## Reporting Violations of this Code of Conduct\n\nPlease select the method of contact you think is most appropriate for\nthe form of violation:\n\n* For urgent security issues, please open a ticket at <https://npmjs.com/support>.\n  Requests to un-publish packages are not usually considered urgent security\n  issues, as it is possible to [un-publish a package][unpublish]\n  within 24 hours of its first publish. Any publicly published package\n  is [immediately replicated to thousands of third-party mirrors](http://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to),\n  so any confidential information contained in a package should be considered \n  immediately compromised.\n\n* If you believe someone is harassing you or is demonstrating\n  some other form of malicious or inappropriate behavior, open a support\n  ticket at https://npmjs.com/support. If this is the initial report of a problem,\n  please include as much detail as possible. It is easiest for us\n  to address issues when we have more context.\n\n* If you have concerns about a potential copyright violation,\n  please refer to our [Copyright Policy][dmca]\n  and take action as recommended by that policy.\n\n* If you think a package or other content is \"squatting\" on a name,\n  follow the process described in the\n  [Disputes Policy][disputes].\n\nFor any other issues, or if in doubt, [contact support](https://npmjs.com/support).\n\n\n## Consequences\n\nAll content published to the Service, including user account\ncredentials, is hosted at the sole discretion of the npm\nadministrators.\n\nUnacceptable behavior from any community member, including sponsors,\nemployees, customers, or others with decision-making authority, will\nnot be tolerated.\n\nAnyone asked to stop unacceptable behavior is expected to comply\nimmediately.\n\nIf a community member engages in unacceptable behavior, the npm\nadministrators may take any action they deem appropriate, up to and\nincluding a temporary ban or permanent expulsion from the community\nwithout warning (and without refund in the case of a paid event or\nservice).\n\n## Appeal and Reinstatement\n\nIf your content or account has been disabled or restricted and you seek reinstatement or wish to appeal, please review GitHub's [Appeal and Reinstatement](https://docs.github.com/en/site-policy/acceptable-use-policies/github-appeal-and-reinstatement) page for information about the process and use the [Appeal and Reinstatement form](https://support.github.com/contact/reinstatement) to submit a request.\n\n## Contact Info\n\nPlease open a support ticket at <https://npmjs.com/support> if you need to\nreport a problem or address a grievance related to an abuse report.\n\nYou are also encouraged to contact us if you are curious about\nsomething that might be \"on the line\" between appropriate and\ninappropriate content.  We are happy to provide guidance to help you\nbe a successful part of our community.\n\n## Changes\n\nThis is a living document and may be updated from time to time.\nPlease refer to the [git history for this\ndocument](https://github.com/npm/documentation/blob/main/content/policies/conduct.mdx)\nto view the changes.\n\n## Credit and License\n\nThis Code of Conduct borrows heavily from the Stumptown Syndicate\n[Citizen's Code of Conduct](http://citizencodeofconduct.org/), and the\n[Rust Project Code of\nConduct](https://www.rust-lang.org/conduct.html).\n\nThis document may be reused under a [Creative Commons\nAttribution-ShareAlike\nLicense](https://creativecommons.org/licenses/by-sa/4.0/).\n\n[disputes]: /policies/disputes\n[acceptable-use]: /policies/open-source-terms#acceptable-use\n[acceptable-content]: /policies/open-source-terms#acceptable-content\n[unpublish]: /policies/unpublish\n[dmca]: /policies/dmca\n"},{"id":"c7497fb8-e6f6-5aaa-91d5-8936ab928206","frontmatter":{"title":"Crawler policy"},"rawBody":"---\ntitle: Crawler policy\nedit_on_github: false\n---\n\nnpm's full public dataset is available via the [public registry](https://docs.npmjs.com/misc/registry). Using CouchDB replication, you can get a full copy of all metadata, and it is acceptable within our terms of use to download copies of tarballs for inspection or experimentation.\n\nnpm's [website](https://www.npmjs.com) also has package metadata available. We allow this content to be indexed by commercial crawlers such as GoogleBot. At our discretion, we also allow experimental crawlers to access the site, as long as they keep their request velocity to 1 request per second or less. At that velocity, indexing all packages would take 3 days, so if you want a full copy of our metadata it is always going to be faster to access the data via replication, which takes only an hour or two to provide full data and will thereafter automatically stay in sync.\n\nIf you do not wish to install CouchDB to manage replication, we provide [open source software](https://github.com/npm/concurrent-couch-follower) that makes it easy to sync to the registry's public feed.\n\nIf you attempt to access package metadata by high-velocity crawling of the npm website, we reserve the right to rate-limit or ban your IP, user-agent or both.\n"},{"id":"b54fef29-b102-56ad-ba37-1d4df97760a7","frontmatter":{"title":"Dispute Resolution"},"rawBody":"---\ntitle: Dispute Resolution\nedit_on_github: false\n---\n\nThis document describes the steps that you should take to resolve \nnaming disputes with other npm publishers.  It also describes the steps\nyou should take if you think a name [infringes your trademark](#trademarks).\n\nThis document is additive to the guidelines in the\n[npm Code of Conduct][conduct] and\n[npm Open-Source terms][open-source-terms].\nNothing in this document should be interpreted to contradict any aspect\nof the npm Code of Conduct or Open-Source Terms.\n\n## tl;dr\n\n1. Open a support ticket at <https://support.github.com/contact/npm-name-disputes>.\n1. Fill out the form with as much detail as possible.\n1. Support will address your request. Please note submitting a report does not \n   guarantee the transfer of a package, org, or username.\n\n## When to use this process\n\nThis process is an excellent way to:\n\n* Request a name that you believe is currently misleading or could be confused with a name used by your company or open source project\n* Request a name related to your company or open source project that cannot be claimed via account recovery\n\nThis process does not apply if the package violates our\n[Terms of Use][open-source-terms],\nin particular our\n[Acceptable Use][acceptable-use]\nand [Acceptable Content][acceptable-content]\nrules, or our [Code of Conduct][conduct].\nThose documents refer to this one to resolve cases of \"squatting\"; see\nbelow.\n\nIf you see bad behavior or content you believe is unacceptable, refer to\nthe Code of Conduct for guidelines on\n[reporting violations][violations].\n**You are never expected to resolve abusive behavior on your own.**\n**We are here to help.**\n\n## When not to use this process\n\nThis process is not available for dispute requests due to lack of activity\nrelated to a specific name.\n\nPlease also note there are cases where a party may have claim to a specific name,\nbut giving that name to the requesting party would pose a supply-chain risk\nto the npm ecosystem. In such cases, requests may be denied independent of\nthe validity of the claim.\n\n## Trademarks\n\nnpm processes Trademark claims under GitHub's [Trademark Policy](https://docs.github.com/site-policy/content-removal-policies/github-trademark-policy).\n\nIf you think another npm publisher is infringing your trademark, such\nas by using a confusingly similar package, org, or user account name, please submit a Trademark Policy Violation Report via our [form](https://support.github.com/contact/trademark-policy).\n\nUse of npm's own trademarks is covered by our [Logo and Usage Policy][logos-and-usage].\n\n## Changes\n\nThis is a living document and may be updated from time to time.\nPlease refer to the [git history for this\ndocument](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx)\nto view the changes.\n\n## Definitions\n\n### Squatting\n\nIt is against npm's\n[Terms of Use][acceptable-content]\nto publish a package, register a user name or an organization name\nsimply for the purposes of reserving it for future use.\n\nWe do not pro-actively scan the registry for squatted packages, so\nthe fact that a name is in use does not mean we consider it valid.\nThe standards for what we consider squatting depend on what is being\nsquatted:\n\n#### Packages\n\nPackage names are considered squatted if the package has no genuine\nfunction.\n\n#### Organizations\n\nOrganization names are considered squatted if there are no packages\npublished within a reasonable time. If an organization is a paid\norganization, it may have private packages that are invisible to\nthird parties. For privacy reasons, we cannot reveal whether or not\nan organization has private packages, so a paid organization will\nnever be considered squatted.\n\n#### User names\n\nWe are extremely unlikely to transfer control of a user name, as it\nis totally valid to be an npm user and never publish any packages:\nfor instance, you might be part of an organization or need read-only\naccess to private packages.\n\n## License\n\nCopyright (C) npm, Inc., All rights reserved\n\nThis document may be reused under a [Creative Commons\nAttribution-ShareAlike\nLicense](https://creativecommons.org/licenses/by-sa/4.0/).\n\n[conduct]: /policies/conduct\n[open-source-terms]: /policies/open-source-terms\n[acceptable-use]: /policies/open-source-terms#acceptable-use\n[acceptable-content]: /policies/open-source-terms#acceptable-content\n[violations]: /policies/conduct#reporting-violations-of-this-code-of-conduct\n[logos-and-usage]: /policies/logos-and-usage\n"},{"id":"b2a2a71f-2085-595e-9f97-d88d708d0809","frontmatter":{"title":"Copyright - DMCA Takedown Policy"},"rawBody":"---\ntitle: Copyright - DMCA Takedown Policy\nedit_on_github: false\n---\n\nThis policy describes how we at npm, Inc., the company behind npmjs.com\nand the npm public registry, respond to claims that materials users\nhave submitted to our service infringe copyright.  \n\nnpm follows GitHub's [Copyright - DMCA Takedown Policy](https://docs.github.com/site-policy/content-removal-policies/dmca-takedown-policy). Please carefully review that policy along with GitHub's [Guide to Submitting a DMCA Takedown Notice](https://docs.github.com/en/site-policy/content-removal-policies/guide-to-submitting-a-dmca-takedown-notice) to determine if you should submit a DMCA takedown. \n\nIf you are ready to submit a DMCA takedown notice, the fastest way to get a response is to enter your information and answer all the questions on GitHub's [Copyright claims form](https://github.com/contact/dmca). Be sure to select the option indicating that your claim involves content on npm.js.\n\nYou can also send an email notification to copyright@github.com. You may include an attachment if you like, but please also include a plain-text version of your letter in the body of your message.\n\nIf you must send your notice by physical mail, you can do that too, but it will take substantially longer for us to receive and respond to it. Notices we receive via plain-text email have a much faster turnaround than PDF attachments or physical mail. If you still wish to mail us your notice, GitHub's physical address is:\n\nGitHub, Inc  \nAttn: DMCA Agent  \n88 Colin P Kelly Jr St  \nSan Francisco, CA. 94107  \n"},{"id":"8f42541a-3144-5a1f-9b52-1d0be7494041","frontmatter":{"title":"Policies"},"rawBody":"---\ntitle: Policies\nedit_on_github: false\n---\n\nThese are the legal policies of npm, Inc.\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n\nThese are updated from time to time.  Their sources are stored in a git repository at [https://github.com/npm/documentation/tree/main/content/policies](https://github.com/npm/documentation/tree/main/content/policies).\n"},{"id":"2f01ca10-4508-533c-9f05-ee048975762e","frontmatter":{"title":"npm Logos and Usage"},"rawBody":"---\ntitle: npm Logos and Usage\nedit_on_github: false\n--- \n\nThis policy describes npm logos and trademarks and how you may use them.\nFor information on what to do if someone infringes a trademark of\n_yours_ with a confusing package name, see the [Disputes policy][disputes].\n\n## What is npm?\n\nThe npm project contains two main parts:\n\n1. The npm client. It is a command line tool to install and publish packages.\n2. The npm registry service. npm, Inc. runs the registry as a free (as in beer) public service for anyone\nwanting to publish an open source package and for anyone to install an open source package.\n\n## Why npm, Inc. has a logo policy\n\n\"npm\" and the npm logos are trademarks owned by npm, Inc. We have developed this policy to make it clear how other businesses and projects can (and cannot) use the npm name and logos.\n\n## General rules\n\n* When referring to the npm software in body text, the first usage should be followed by a generic term such as \"package manager,\" \"services\" or \"client\" to provide context.\n* \"npm\" should never be used or explained as an acronym.\n* When referring to the npm public registry, please follow npm with the word \"registry\" or the phrase \"public registry\".\n* When referring to a private registry for npm packages, please describe it as \"private registry for npm packages\" or a \"proxy of the npm registry\".\n* References to the owner of the npm client software and the operator of the npm public registry should be to \"npm, Inc.\"\n* Any materials referring to npm should include the following notice in the footer or wherever you may have your own trademark notice: \"npm is a registered trademark of npm, Inc.\"\n\n## Nominative use - No need to type ™ on Twitter&reg;\n\n\"Nominative\" or \"referential\" use means to refer to something or someone else by their trademark. So it's perfectly OK to use \"npm\" to refer to npm, Inc., the npm client, npm code, and the npm public registry. A referential use is generally going to be in a sentence or sentence fragment, like \"first install the npm client,\" or in a book or article title. The use should not be attention-getting or potentially misperceived as suggesting \"npm\" is your own name, project, product or services.\n\nIt is not a referential use to incorporate the letters \"npm\" or any of the npm logos in the name or logo for your own company or its projects, products, services or social media handles.\n\nIf you need to use \"npm\" to indicate compatibility, you should use \"npm\" after your own product or service name and an accurate preposition:\n\n* Pink Unicorn Consulting Ltd. services <strong>for</strong> npm\n* Purple Unicorn Inc. private registry server <strong>compatible with</strong> the npm client\n* Kappa, a hirearchical proxy <strong>of</strong> the npm registry\n\nYou need to ask for permission for any uses not described. When in doubt about your use of the npm name or logo, please contact [npm, Inc.](https://www.npmjs.com/contact) for clarification.\n\n## Requesting permission\n\nWe like to make it easy for anyone to use the npm name or logo for community-oriented efforts that help spread and improve npm. We are therefore likely to grant permission to use the npm name and logo in the following ways:\n\n* For projects where:\n  * The primary purpose of your project is to promote the spread and\n  improvement of the npm client software or the npm registry service.\n  * Your project is non-commercial in nature (it can make money to cover\n  its costs or contribute to non-profit entities, but it cannot be run\n  as a for-profit project or business).\n  * Your project neither promotes nor is associated with entities that\n  currently fail to comply with the Artistic License 2.0 under which\n  npm is distributed, or which are in violation of this policy.\n  \n* For a user group name where:\n  * The main focus of the group is the software.\n  * Any software or services the group provides are without cost.\n  * The group does not make a profit.\n  * Any charge to attend meetings are to cover the cost of the venue, food and drink only.\n\nAny other requests are not likely to be granted licenses, but feel free to [ask](https://www.npmjs.com/contact).\n\n## The npm Logos\n\nOur npm Logos are very recognizable and deserve special treatment. In short, the npm logos represent only npm and should not be used to represent your products. The\nnpm Logos signify us, or a special relationship with us, and you\nmay use them only with our permission. Since the goal is to avoid\nconfusion about you being us, or your relationship with us, context\ncounts. We will [consider requests](https://www.npmjs.com/contact) on a case-by-case basis. \n\n## The npm Wombat Mascot\n\nLike the npm Logo, the npm Wombat graphic is a very recognizable\npart of the npm brand, and signifies a special relationship with\nthe npm project, service, or company.  It should never be used except\nwith explicit written permission.  We will [consider requests](https://www.npmjs.com/contact) on a\ncase-by-case basis.\n\nPlease be advised that the Wombat and the logos generally may\n**not** be used to refer to the project, service, or company in a\nnominative sense, as any usage will almost always imply a special\nrelationship with npm.\n\n## Changes\n\nThis is a living document and may be updated from time to time.\nPlease refer to the [git history for this\ndocument](https://github.com/npm/documentation/blob/main/content/policies/logos-and-usage.mdx)\nto view the changes.\n\n## License\n\nCopyright &copy; npm, Inc.\n\nThis document may be reused under a [Creative Commons\nAttribution-ShareAlike\nLicense](https://creativecommons.org/licenses/by-sa/4.0/).\n\n[disputes]: /policies/disputes\n"},{"id":"f713097b-f232-5843-a30c-6ffb889bc494","frontmatter":{"title":"npm License"},"rawBody":"---\ntitle: npm License\nedit_on_github: false\n---\n\nCopyright (c) npm, Inc. and Contributors\nAll rights reserved.\n\nnpm is released under the Artistic License 2.0, subject to additional terms\nthat are listed below.\n\nThe text of the npm License follows and the text of the additional terms\nfollows the Artistic License 2.0 terms:\n\n\n--------\n\n\nThe Artistic License 2.0\n\nCopyright (c) 2000-2006, The Perl Foundation.\n\nEveryone is permitted to copy and distribute verbatim copies\nof this license document, but changing it is not allowed.\n\nPreamble\n\nThis license establishes the terms under which a given free software\nPackage may be copied, modified, distributed, and/or redistributed.\nThe intent is that the Copyright Holder maintains some artistic\ncontrol over the development of that Package while still keeping the\nPackage available as open source and free software.\n\nYou are always permitted to make arrangements wholly outside of this\nlicense directly with the Copyright Holder of a given Package.  If the\nterms of this license do not permit the full use that you propose to\nmake of the Package, you should contact the Copyright Holder and seek\na different licensing arrangement.\n\nDefinitions\n\n    \"Copyright Holder\" means the individual(s) or organization(s)\n    named in the copyright notice for the entire Package.\n\n    \"Contributor\" means any party that has contributed code or other\n    material to the Package, in accordance with the Copyright Holder's\n    procedures.\n\n    \"You\" and \"your\" means any person who would like to copy,\n    distribute, or modify the Package.\n\n    \"Package\" means the collection of files distributed by the\n    Copyright Holder, and derivatives of that collection and/or of\n    those files. A given Package may consist of either the Standard\n    Version, or a Modified Version.\n\n    \"Distribute\" means providing a copy of the Package or making it\n    accessible to anyone else, or in the case of a company or\n    organization, to others outside of your company or organization.\n\n    \"Distributor Fee\" means any fee that you charge for Distributing\n    this Package or providing support for this Package to another\n    party.  It does not mean licensing fees.\n\n    \"Standard Version\" refers to the Package if it has not been\n    modified, or has been modified only in ways explicitly requested\n    by the Copyright Holder.\n\n    \"Modified Version\" means the Package, if it has been changed, and\n    such changes were not explicitly requested by the Copyright\n    Holder.\n\n    \"Original License\" means this Artistic License as Distributed with\n    the Standard Version of the Package, in its current version or as\n    it may be modified by The Perl Foundation in the future.\n\n    \"Source\" form means the source code, documentation source, and\n    configuration files for the Package.\n\n    \"Compiled\" form means the compiled bytecode, object code, binary,\n    or any other form resulting from mechanical transformation or\n    translation of the Source form.\n\n\nPermission for Use and Modification Without Distribution\n\n(1)  You are permitted to use the Standard Version and create and use\nModified Versions for any purpose without restriction, provided that\nyou do not Distribute the Modified Version.\n\n\nPermissions for Redistribution of the Standard Version\n\n(2)  You may Distribute verbatim copies of the Source form of the\nStandard Version of this Package in any medium without restriction,\neither gratis or for a Distributor Fee, provided that you duplicate\nall of the original copyright notices and associated disclaimers.  At\nyour discretion, such verbatim copies may or may not include a\nCompiled form of the Package.\n\n(3)  You may apply any bug fixes, portability changes, and other\nmodifications made available from the Copyright Holder.  The resulting\nPackage will still be considered the Standard Version, and as such\nwill be subject to the Original License.\n\n\nDistribution of Modified Versions of the Package as Source\n\n(4)  You may Distribute your Modified Version as Source (either gratis\nor for a Distributor Fee, and with or without a Compiled form of the\nModified Version) provided that you clearly document how it differs\nfrom the Standard Version, including, but not limited to, documenting\nany non-standard features, executables, or modules, and provided that\nyou do at least ONE of the following:\n\n    (a)  make the Modified Version available to the Copyright Holder\n    of the Standard Version, under the Original License, so that the\n    Copyright Holder may include your modifications in the Standard\n    Version.\n\n    (b)  ensure that installation of your Modified Version does not\n    prevent the user installing or running the Standard Version. In\n    addition, the Modified Version must bear a name that is different\n    from the name of the Standard Version.\n\n    (c)  allow anyone who receives a copy of the Modified Version to\n    make the Source form of the Modified Version available to others\n    under\n\n        (i)  the Original License or\n\n        (ii)  a license that permits the licensee to freely copy,\n        modify and redistribute the Modified Version using the same\n        licensing terms that apply to the copy that the licensee\n        received, and requires that the Source form of the Modified\n        Version, and of any works derived from it, be made freely\n        available in that license fees are prohibited but Distributor\n        Fees are allowed.\n\n\nDistribution of Compiled Forms of the Standard Version\nor Modified Versions without the Source\n\n(5)  You may Distribute Compiled forms of the Standard Version without\nthe Source, provided that you include complete instructions on how to\nget the Source of the Standard Version.  Such instructions must be\nvalid at the time of your distribution.  If these instructions, at any\ntime while you are carrying out such distribution, become invalid, you\nmust provide new instructions on demand or cease further distribution.\nIf you provide valid instructions or cease distribution within thirty\ndays after you become aware that the instructions are invalid, then\nyou do not forfeit any of your rights under this license.\n\n(6)  You may Distribute a Modified Version in Compiled form without\nthe Source, provided that you comply with Section 4 with respect to\nthe Source of the Modified Version.\n\n\nAggregating or Linking the Package\n\n(7)  You may aggregate the Package (either the Standard Version or\nModified Version) with other packages and Distribute the resulting\naggregation provided that you do not charge a licensing fee for the\nPackage.  Distributor Fees are permitted, and licensing fees for other\ncomponents in the aggregation are permitted. The terms of this license\napply to the use and Distribution of the Standard or Modified Versions\nas included in the aggregation.\n\n(8) You are permitted to link Modified and Standard Versions with\nother works, to embed the Package in a larger work of your own, or to\nbuild stand-alone binary or bytecode versions of applications that\ninclude the Package, and Distribute the result without restriction,\nprovided the result does not expose a direct interface to the Package.\n\n\nItems That are Not Considered Part of a Modified Version\n\n(9) Works (including, but not limited to, modules and scripts) that\nmerely extend or make use of the Package, do not, by themselves, cause\nthe Package to be a Modified Version.  In addition, such works are not\nconsidered parts of the Package itself, and are not subject to the\nterms of this license.\n\n\nGeneral Provisions\n\n(10)  Any use, modification, and distribution of the Standard or\nModified Versions is governed by this Artistic License. By using,\nmodifying or distributing the Package, you accept this license. Do not\nuse, modify, or distribute the Package, if you do not accept this\nlicense.\n\n(11)  If your Modified Version has been derived from a Modified\nVersion made by someone other than you, you are nevertheless required\nto ensure that your Modified Version complies with the requirements of\nthis license.\n\n(12)  This license does not grant you the right to use any trademark,\nservice mark, tradename, or logo of the Copyright Holder.\n\n(13)  This license includes the non-exclusive, worldwide,\nfree-of-charge patent license to make, have made, use, offer to sell,\nsell, import and otherwise transfer the Package with respect to any\npatent claims licensable by the Copyright Holder that are necessarily\ninfringed by the Package. If you institute patent litigation\n(including a cross-claim or counterclaim) against any party alleging\nthat the Package constitutes direct or contributory patent\ninfringement, then this Artistic License to you shall terminate on the\ndate that such litigation is filed.\n\n(14)  Disclaimer of Warranty:\nTHE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS \"AS\nIS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR\nNON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL\nLAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\nDAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n--------\n\n\nThe following additional terms shall apply to use of the npm software, the npm\nwebsite, the npm repository and any other services or products offered by npm,\nInc.:\n\n\"Node.js\" trademark Joyent, Inc.  npm is not officially part of the Node.js\nproject, and is neither owned by nor affiliated with Joyent, Inc.\n\n\"npm\" and \"The npm Registry\" are owned by npm, Inc. All rights reserved.\n\nModules published on the npm registry are not officially endorsed by npm, Inc.\nor the Node.js project.\n\nData published to the npm registry is not part of npm itself, and is the sole\nproperty of the publisher. While every effort is made to ensure accountability,\nthere is absolutely no guarantee, warrantee, or assertion expressed or implied\nas to the quality, fitness for a specific purpose, or lack of malice in any\ngiven npm package.  Packages downloaded through the npm registry are\nindependently licensed and are not covered by this license.\n\nAdditional policies relating to, and restrictions on use of, npm products and\nservices are available on the npm website.  All such policies and restrictions,\nas updated from time to time, are hereby incorporated into this license\nagreement.  By using npm, you acknowledge your agreement to all such policies\nand restrictions.\n\nIf you have a complaint about a package in the public npm registry, and cannot\nresolve it with the package owner, please\n[contact support](https://npmjs.com/support) and explain the situation.\nSee the [npm Dispute Resolution policy](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx) for more details.\n\nAny data published to The npm Registry (including user account information) may\nbe removed or modified at the sole discretion of the npm server administrators.\n\n\"npm Logo\" contributed by Mathias Pettersson and Brian Hammond,\nuse is subject to https://docs.npmjs.com/trademark\n\n\"Gubblebum Blocky\" font\nCopyright (c) by Tjarda Koster, https://jelloween.deviantart.com\nincluded for use in the npm website and documentation,\nused with permission.\n\nThis program uses several Node modules contained in the node_modules/\nsubdirectory, according to the terms of their respective licenses.\n"},{"id":"fcd9f248-42e7-592d-b214-56213e4333b1","frontmatter":{"title":"npm Open-Source Terms"},"rawBody":"---\ntitle: npm Open-Source Terms\nedit_on_github: false\n---\n<!-- TODO: Replace last-updated date for every published change -->\nThese npm Open Source terms of use (these _Terms_) govern access to\nand use of <https://www.npmjs.com> (the _Website_) as well as the\n\"npm Public Registry\" at <https://registry.npmjs.org> (the _Public\nRegistry_). npm, Inc. (_npm_) operates each of those\nservices. These terms refer to all of them together as _npm Open\nSource_.\n\nnpm last updated these npm Open Source Terms on\nMarch 10, 2022.\nYou can review prior versions at\n<https://github.com/npm/documentation/blob/main/content/policies/open-source-terms.mdx>.\n\n## Important Terms\n\n***These Terms include a number of important provisions that affect your\nrights and responsibilities, such as the disclaimers in \"Disclaimers\",\nlimits on npm's liability to you in \"Limits on Liability\", and an\nagreement to arbitrate disputes individually in \"Arbitration\".***\n\n## Other Terms\n\nnpm offers additional, paid services (_Paid Services_) that are subject\nto additional terms:\n\n-  Additional terms for npm Paid Services are available at\n   [https://docs.npmjs.com/policies/private-terms][private-terms].\n\nnpm Open Source and any Paid Services you may agree to use are together\ncalled _npm Services_ throughout these Terms.\n\n## Legal Agreement\n\nYou may only access or use npm Services by agreeing to these Terms.\nIf npm adds any additional functionality to npm Services, you must\nagree to these Terms to use that new functionality, too. You show your agreement\nwith npm on these Terms by creating a user account (your _Account_)\nor by accessing or using npm Services without creating an account.\nThe agreement between you and npm is a legally binding contract (this\n_Agreement_).\n\n## Changes\n\nnpm may change these Terms and the additional terms for Paid Services\nin the future. npm will post changes on the Website with a new \"last\nupdated\" date. If you have an Account, npm will notify you of changes\nby email to the address provided for your Account, by a message on the\nWebsite, or both. If you do not have an account, npm may notify you of\nchanges by a general announcement via the Website, but it is up to you\nto check for changes to these Terms. After receiving notice of changes\nto these Terms, you must accept those changes to continue using npm\nServices. You accept changes to these Terms by continuing to use npm\nServices. npm may change, suspend, or discontinue npm Services at any\ntime without notice or liability to you.\n\n## npm Policies\n\nnpm respects your privacy and limits use and sharing of information\nabout you collected by npm Services. The privacy policy at\n[https://docs.npmjs.com/policies/privacy][privacy](the _Privacy Policy_)\ndescribes these policies. npm will abide by the Privacy Policy and honor\nthe privacy settings that you choose via npm Services.\n\nnpm respects the exclusive rights of copyright holders and responds\nto notifications about alleged infringement via npm Services per\nthe copyright policy at [https://docs.npmjs.com/dmca][dmca] (the\n_Copyright Policy_).\n\nnpm resolves disputes about package names, user names, and organization\nnames in the Public Registry per the policy at\n[https://docs.npmjs.com/disputes][disputes] (_Dispute Policy_). This\nincludes \"package squatting\".\n\nUse of all npm Services is governed by the code of conduct at\n[https://docs.npmjs.com/conduct][conduct] (_Code of Conduct_).\n\nnpm permits use of npm trademarks per the policy at\n[https://docs.npmjs.com/trademark][trademark].\n\n## Use of npm Open Source\n\nSubject to these Terms, npm grants you permission to use npm Open\nSource. That permission is not exclusive to you, and you cannot transfer\nit to anyone else.\n\nYour permission to use npm Open Source entitles you to do the following:\n\n1.  You may search for, download, publish, and manage packages of\n    computer code (_Packages_) in the Public Registry, and otherwise\n    interact with the Public Registry, via the command-line tool\n    published by npm at <https://www.github.com/npm/cli> (the _CLI_).\n\n2.  You may search for, download, publish, and manage Packages using\n    software other than CLI via application programming interfaces that\n    npm publicly documents or makes available for public use (_Public\n    APIs_).\n\n3.  You may search for and manage Packages in the Public Registry, and\n    otherwise interact with the Public Registry, via the Website.\n\n4.  You may update and manage your Account via the Website.\n\n5.  You may visit, create an account for, and participate in,\n    discussions on npm.community.\n\n## Conditions\n\nYour permission to use npm Open Source, as well as any permission you\nmay have to use Paid Services, are subject to the following conditions:\n\n1.  You must be at least 13 years of age to use npm Services.\n\n2.  You may not use npm Services after npm says you may not, such as by\n    disabling your Account.\n\n3.  You must use npm Services only in accordance with \"Acceptable Use\".\n\n4.  You may access and use data about the security of Packages, such\n    as vulnerability reports, audit status reports, and supplementary\n    security documentation, only for your own personal or internal\n    business purposes. You may _not_ provide others access to, copies\n    of, or use of npm data about the security of Packages, directly\n    or as part of other products or services.\n\n## Acceptable Use\n\n1.  You will abide by the\n    [Code of Conduct][conduct] and the\n    [Dispute Policy][disputes].\n\n2.  You will not submit material to npm as a package or in any other\n    form that violates npm's _Acceptable Content_, described below.\n\n3.  You will not disclose information that you do not have the right to\n    disclose, such as confidential information of others.\n\n4.  You will not copy or share any personally identifiable information of\n    any other person without their specific permission.\n\n5.  You will not violate any applicable law.\n\n6.  You will not use or attempt to use another person's Account without\n    their specific permission.\n\n7.  You will not buy, sell, or otherwise trade in user names,\n    organization names, names for _Packages_, or any other names\n    reserved on _npm Services_, for money or other compensation.\n\n8.  You will not use _npm Services_' ability to send e-mail to send\n    advertisements, chain letters, or other solicitations.\n\n9.  You will not automate access to, use, or monitor the Website, such\n    as with a web crawler, browser plug-in or add-on, or other computer\n    program that is not a web browser. You may replicate data from the\n    Public Registry using the Public APIs per this Agreement.\n\n10. You will not use npm Services to send email to distribution lists,\n    newsgroups, or group mail aliases.\n\n11. You will not falsely imply that you are affiliated with or endorsed\n    by npm.\n\n12. You will not operate illegal schemes, such as pyramid schemes, via\n    npm Services.\n\n13. You will not deep-hyperlink to images or other non-hypertext content\n    served by npm Services.\n\n14. You will not remove any marking indicating proprietary ownership\n    from any material got via npm Services.\n\n15. You will not display any portion of the Website via an HTML IFRAME.\n\n16. You will not disable, avoid, or circumvent any security or access\n    restrictions of npm Services, or access parts of npm Services not\n    intended for access by you.\n\n17. You will not strain infrastructure of npm Services with an\n    unreasonable volume of requests, or requests designed to impose an\n    unreasonable load on IT systems underlying npm Services. This rule\n    is intentionally loose, to give npm the flexibility it needs to keep\n    npm Services working for the user community as a whole. But to draw\n    one clear line, under no circumstances are five million requests to\n    npm Services in a single month-long period by any single individual,\n    organization, or group of affiliated companies remotely reasonable. If\n    you have a special need to make lots and lots of requests, [our\n    sales team](mailto:sales@npmjs.com) can help.\n\n18. You will not encourage or assist any other person in violation of\n    \"Acceptable Use\".\n\n## Acceptable Content\n\nAdministrators at npm reserve the right to delete content hosted on\nthe npm Services that they deem unacceptable. Unacceptable content\ncan take the form of a package, a README file, a user or organization\nname, or any other content submitted to npm Services. A few examples\nof unacceptable content:\n\n1. Content that is illegal, offensive, or otherwise harmful. This includes\n   content that is harassing, inappropriate, or abusive.\n\n2. Content in violation of law, infringing the intellectual property\n   rights of others, violating the privacy or other rights of others,\n   or in violation of any agreement with a third party. This includes\n   code that violates a public license for others' work.\n\n3. Content containing malicious computer code, such as computer viruses,\n   computer worms, rootkits, back doors, or spyware. This includes content\n   submitted for research purposes. Tools designed and documented explicitly to\n   assist in security research are acceptable, but exploits and malware that\n   use the npm registry as a deployment or delivery vector are not.\n\n4. Packages that are not functionally compatible with the npm\n   command-line client. For example, a \"package\" cannot simply be\n   a PNG or JPEG image, a movie file, or a text document uploaded\n   directly to the registry. Using the Public Registry as a general purpose database is not allowed.\n\n5. Content that exists only to \"reserve\" a name, whether a package name,\n   user name, or organization name. The\n   [Dispute Policy][disputes] governs\n   how npm handles such cases of \"squatting\".\n\nTo find out how to report violations of Acceptable Content, refer to the\n[Code of Conduct][conduct].\n\n## Commercial Content\n\nThe npm Public Registry is about Packages.  All manner of\nuseful Packages are welcome, from hobby projects to\ncompetitive products, enterprise infrastructure and tooling\nto the latest fun hack or work of software art.\n\nAt the same time, the npm Public Registry, the Website, and\nimportant conventions like `README` go beyond just code.\nDevelopers use all of those channels to communicate more\nbroadly about code, who is developing it, why, and how.\n\nThat communication is important, and welcome, so long as it\nrespects that the npm Public Registry, the website, and npm\nOpen Source more generally remain neutral.  You are free to\nuse npm Open Source for commercial projects, to advance your\ncareer, and for other business purposes.  But you may not\nleverage content or system conventions to make the npm\nPublic Registry, Website, or CLI put business before code.\n\nThese kinds of commercial content are generally acceptable\nin `README` files and other documentation:\n\n1.  Credits, acknowledgments, attributions, and other\n    recognitions of contributions to Packages.\n\n2.  Information on how to pay, donate to, and otherwise\n    support Package development, Package developers, and\n    Package steward organizations.\n\n3.  Logos from, and links to, organizations developing,\n    stewarding, or sponsoring Package development.\n\n4.  Information on paid products and services related to\n    Packages, such as enhanced versions, add-ons, commercial\n    license terms, training, integration, or support.\n\nThese kinds of commercial content generally _aren't_\nacceptable:\n\n1.  `README`, `package.json`, or other content displaying\n    advertisements.\n\n2.  Packages that display ads at runtime, on installation,\n    or at other stages of the software development\n    lifecycle, such as via [npm\n    scripts](https://docs.npmjs.com/misc/scripts).  Packages\n    with code that can be used to display ads are fine.\n    Packages that themselves display ads are not.\n\n3.  Packages that function primarily as ads, with only\n    placeholder or negligible code, data, and other\n    technical content.\n\nThese examples are just examples.  npm will continue to\napply its judgment when deciding what content is acceptable.\nnpm will continue to expect you to apply your own judgment\nwhen choosing what you share and how. \n\n## Enforcement of Acceptable Use\n\nnpm may investigate and prosecute violations of this Agreement to the\nfullest legal extent. npm may notify and cooperate with law enforcement\nauthorities in prosecuting violations of this Agreement.\n\n## Your Account\n\nYou must create and log into an Account to access features of some npm\nServices, including npm Open Source.\n\nTo create an Account, you must provide certain information about\nyourself, as required by the account creation form on the Website or the\nCLI. If you create an Account, you will provide, at a minimum, a valid\nemail address. You will keep that email address up-to-date. You will\nnot impersonate any other individual. You may delete your Account at any\ntime by [contacting support](https://npmjs.com/support).\n\nYou will be responsible for all action taken using your account, whether\nauthorized by you or not, until you either close your account or give\nnpm notice that the security of your Account has been compromised.\nYou will notify npm immediately if you suspect the security of your\nAccount has been compromised. You will select a secure password for your\nAccount. You will keep your password secret.\n\nnpm may restrict, suspend, or terminate your Account according to the\nCopyright Policy, if npm reasonably believes that you are in breach of\nthese Terms, or if npm reasonably believes that you have misused npm\nServices.\n\n## Your Content\n\nNothing in this Agreement gives npm any ownership rights in intellectual\nproperty that you share with npm Services, such as your Account\ninformation or any Packages you share with npm Services (_Your\nContent_). Nothing in this Agreement gives you any ownership rights in\nnpm intellectual property provided via npm Services, like software,\ndocumentation, trademarks, service marks, logotypes, or other\ndistinguishing graphics.\n\nBetween you and npm, you remain solely responsible for Your Content. You\nwill not wrongly imply that Your Content is sponsored or approved by\nnpm. npm will not be obligated to store, maintain, or provide copies of\nyour content, except per the Privacy Policy.\n\nnpm may remove Your Content from npm Services without notice if npm\nsuspects Your Content was submitted or used in violation of \"Acceptable\nUse\", as well as per the Copyright Policy.\n\nYour Content belongs to you. You decide whether and how to license it.\nBut at a minimum, you license npm to provide Your Content to users\nof npm Services when you share Your Content. That special license\nallows npm to copy, publish, and analyze Your Content, and to share\nits analyses with others. npm may run computer code in Your Content to\nanalyze it, but npm's special license alone does not give npm the right\nto run code for its functionality in npm products or services.\n\nWhen Your Content is removed from npm Services,\nwhether by you or npm, npm's special license ends when the last copy\ndisappears from npm's backups, caches, and other systems. Other\nlicenses, such as open source licenses, may continue after Your Content\nis removed. Those licenses may give others, or npm itself, the right to\nshare Your Content with npm Services again.\n\nOthers who receive Your Content via npm Services may violate the terms\non which you license Your Content. You agree that npm will not be liable\nto you for those violations or their consequences.\n\n## Feedback\n\nnpm welcomes your feedback and suggestions for npm Services. You agree\nthat npm will be free to act on feedback and suggestions you provide\nwithout further notice, consent, or payment. You will not submit\nfeedback or suggestions that you consider confidential or proprietary.\n\n## Indemnity\n\nYou will indemnify npm, its officers, directors, employees,\nrepresentatives, and agents, and hold them harmless for, all liability,\nexpenses, damages, and costs from any third-party claims, demands,\nlawsuits, or other proceedings alleging that Your Content, your use\nof npm Services, or both, violate the intellectual property right of\na third party, this Agreement, or applicable law. You will not settle\nany such proceeding without the prior written consent of npm. npm will\nnotify you of any such proceeding it becomes aware of.\n\n## Disclaimers\n\n***Use of npm Services is at your sole risk. npm Services are provided\non an \"as is\" and \"as available\" basis. npm expressly disclaims all\nwarranties of any kind, whether express, implied, or statutory,\nincluding implied warranties of title, noninfringement, merchantability,\nand fitness for a particular purpose.***\n\n***npm makes no warranty that npm Services will meet your requirements,\noperate in an uninterrupted, timely, secure, or error-free manner, or\nthat errors in npm Services will be corrected.***\n\n***You receive material via npm Services at your sole risk. You will be\nsolely responsible for any damage to your computer system and network,\nas well as any data loss that may result from use of npm Services or\nmaterial received via npm Services.***\n\nnpm Services may provide information and software that is inaccurate,\nincomplete, misleading, illegal, offensive, or otherwise harmful. npm\nmay, but does not promise to, review content provided by npm Services.\n\nnpm Services provide information about ownership and licensing of\nPackages, as provided by those Packages' publishers. That information\nmay be wrong. npm cannot and does not provide legal advice.\n\n### Third-Party Services\n\nnpm Services may hyperlink to and integrate with third-party\napplications, websites, and other services. You decide whether and how\nto use and interact with such services. npm does not make any warranty\nregarding such services or content they may provide, and will not be\nliable to you for any damages related to such services. Use of such\nthird-party services may be governed by other terms and privacy notices\nthat are not part of this Agreement and are not controlled by npm.\n\n## Limits on Liability\n\n***Neither npm nor any third-party service provider used by npm to\nprovide npm Services will, under any circumstances, be liable to you\nfor any indirect, incidental, consequential, special, or exemplary\ndamages related to your use of npm Services or this Agreement, whether\nbased on breach of contract, breach of warranty, tort (including\nnegligence, product liability, or otherwise), or any other pecuniary\nloss, and whether or not npm has been advised of the possibility of such\ndamages.***\n\n***To the maximum extent permitted by law, npm's liability to you for\nany damages related to this Agreement, for any one or more causes and\nregardless of the form of action, will not exceed $50.***\n\nSome jurisdictions do not allow exclusion of certain warranties or\nlimits on liability for incidental or consequential damages. Some of\n\"Disclaimers\" and \"Limits on Liability\" may not apply to you.\n\n## Termination\n\nEither you or npm may terminate this Agreement at any time with notice\nto the other.\n\nOn termination of this Agreement, your permission to use npm Open\nSource, as well any permission you may have to access Paid Services\nunder additional terms, also terminate.\n\nThe following provisions survive termination of this Agreement: \"Your\nContent\", \"Feedback\", \"Indemnity\", \"Disclaimers\", \"Limits on Liability\",\nand \"General Terms\". Users of npm Services may continue to copy and\nshare Your Content after termination of this Agreement.\n\n## Payment Terms\n\nThere is no charge for use of npm Open Source. If you use Paid Services\nfrom npm, our Paid Services Terms at [https://docs.npmjs.com/policies/private-terms][private-terms]\napply.\n\n## General Terms\n\nIf a provision of this Agreement is unenforceable as written, but could\nbe changed to make it enforceable, that provision should be modified to\nthe minimum extent necessary to make it enforceable. Otherwise, that\nprovision should be removed.\n\nYou may not assign this Agreement. npm may assign this Agreement to any\naffiliate of npm, any third party that obtains control of npm, or any\nthird party that purchases assets of npm relating to npm Services. Any\npurported assignment of rights in breach of this provision is void.\n\nNeither the exercise of any right under this Agreement, nor waiver of\nany breach of this Agreement, waives any other breach of this Agreement.\n\nThis Agreement, together with the additional terms for Paid Services\nand npm software that you and npm agree to, embody all the terms of\nagreement between you and npm about npm Services. This Agreement\nsupersedes any other agreements about npm Services, written or not.\n\n## Disputes\n\nThe law of the State of California will govern any dispute, including\nany legal proceedings, relating to this Agreement or your use of npm\nServices (a _Dispute_).\n\nYou and npm will seek injunctions related to this agreement only in\nstate or federal court in San Francisco, California. Neither you nor npm\nwill object to jurisdiction, forum, or venue in those courts.\n\n***Other than to seek an injunction, you and npm will resolve any\nDispute by binding American Arbitration Association arbitration.\nArbitration will follow the AAA's Commercial Arbitration Rules and\nSupplementary Procedures for Consumer Related Disputes. Arbitration will\nhappen in San Francisco, California. You will settle any Dispute as an\nindividual, and not as part of a class action or other representative\nproceeding, whether as the plaintiff or a class member. No arbitrator\nwill consolidate any Dispute with any another arbitration without npm's\npermission.***\n\nAny arbitration award will include costs of the arbitration, reasonable\nattorneys' fees, and reasonable costs for witnesses. You or npm can\nenter arbitration awards in any court with jurisdiction.\n\n## Notices and Questions\n\nYou may send notice to npm and questions about the terms governing npm\nproducts and services to [legal@npmjs.com](mailto:legal@npmjs.com) or\nby mail to:\n\nGitHub, Inc  \nAttn: npm Legal Department  \n88 Colin P Kelly Jr St  \nSan Francisco, CA. 94107\n\nnpm may send you notice using the email address you provide for your\nAccount or by posting a message to the homepage or your Account page\non the Website.\n\n[private-terms]: /policies/private-terms\n[conduct]: /policies/conduct\n[trademark]: /policies/trademark\n[disputes]: /policies/disputes\n[dmca]: /policies/dmca\n[privacy]: /policies/privacy"},{"id":"9418f0cc-6859-5eeb-b551-d0ef4ec3962b","frontmatter":{"title":"npm Orgs Payment Plan"},"rawBody":"---\ntitle: npm Orgs Payment Plan\nedit_on_github: false\n---\n\nThis npm Orgs Payment Plan (this _Payment Plan_) supplements\nthe terms for npm Open Source offered by npm, Inc. (_npm_) at\n[https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source\nTerms_), as well as the terms for npm Paid Services (_npm Paid Services_)\nat [https://docs.npmjs.com/policies/private-terms][private-terms] (_npm\nPaid Services Terms_). This Payment Plan governs payment for\n_Orgs_ and use of npm Paid Services by user\naccounts added as members of those Orgs.\n\nThis Payment Plan was last updated on\nAugust 6, 2018.\nYou can review prior versions at\n<https://github.com/npm/documentation/blob/main/content/policies/orgs-plan.mdx>.\n\nUnder this Payment Plan, you may create one or more Orgs.\n\nYou will pay a minimum of $7.00 via your Payment Card when you create\nan Org, and thereafter on the same day every month (your\n_Billing Day_), until you delete the Org. This minimum payment\nentitles you to a single member of the Org (a _New Paid Services\nUser_). You will pay $7.00 via your Payment Card per each additional\nNew Paid Services User that you add to an Org, counted and\nbilled on your Billing Day.\n\nNote that the npm Paid Services Terms require everyone using npm Paid\nServices to have an Account of their own, added under a Payment Plan.\nYou must add a New Paid Services User to an Org for each\nperson who will use npm Paid Services under this Payment Plan.\n\n[open-source-terms]: /policies/open-source-terms\n[private-terms]: /policies/private-terms"},{"id":"f02b0527-03c2-5509-95fa-9a009d9f3601","frontmatter":{"title":"npm Paid Services Terms"},"rawBody":"---\ntitle: npm Paid Services Terms\nedit_on_github: false\n---\n\nThese npm Paid Services Terms of Use (these _npm Paid Services Terms_)\nsupplement the terms for npm Open Source offered by npm, Inc.\n(_npm_) at <https://docs.npmjs.com/policies/open-source-terms> (_npm Open\nSource Terms_). They govern access to and use of _npm Paid Services_,\nincluding but not limited to the products known as  _npm Solo_ and\n_npm Orgs_, the private package storage, delivery,\norganization management, and access control features of\n<https://www.npmjs.com> (the _Website_) and the npm public registry\nat <https://registry.npmjs.org> (the _Public Registry_). These are\ncollectively called the _Paid Services_.\n\nThese npm Paid Services Terms were last updated on\nMarch 10, 2022.\nYou can review prior versions at\n<https://github.com/npm/documentation/blob/main/content/policies/private-terms.mdx>.\n\nYou may only access or use npm Paid Services by agreeing to the npm\nOpen Source Terms as supplemented by these npm Paid Services Terms. If\nnpm adds any additional functionality to npm Paid Services, you must\nagree to these npm Paid Services Terms to use those new features, too.\nYou add these npm Paid Services Terms to your agreement with npm by\nusing npm Paid Services with your account (your _Account_). These\nnpm Paid Services Terms then become a part of the contract between you\nand npm, until you or npm disable npm Paid Services for your Account.\n\n## Payment Terms\n\nThere is no charge for use of npm Open Source. If you use Paid Services,\nthese payment terms apply. When enabling Paid Services, you must provide\nall the payment card details requested by the Website (your _Payment\nDetails_). Those details must be for a valid payment card that you have\nthe right to use (your _Payment Card_). You must keep your Payment\nDetails up-to-date via the Website.\n\nYou can disable Paid Services at any time via the Website. npm will not\nrefund any payment you have already made for Paid Services when you\ndisable Paid Services.\n\nDollar amounts throughout this Agreement are amounts of United States\nDollars. You must pay for Paid Services in United States Dollars.\n\nDollar amounts throughout this Agreement do not include tax. You will\npay any tax.\n\n## Use of npm Paid Services\n\nnpm will provide the private package storage and delivery features and\nservices described in the public documentation for npm Paid Services\nat <https://docs.npmjs.com/> (the _npm Paid Services\nDocumentation_). npm grants you permission to use those features and\nservices.\n\nnpm will also provide the organization management and access control\nfeatures described in the npm Paid Services Documentation, and grants\nyou permission to use those features and services, for npm\n\"organizations\" to which your Account belongs.\n\nPermission to use npm Paid Services is not exclusive to you, and you\nmay not transfer it to others. These npm Paid Services Terms do not\ngive you permission to give others rights to use npm Paid Services.\nIf you agree to a Payment Plan that gives you that right, you may do so\nonly according to that Payment Plan.\n\n## Payment for npm Paid Services\n\nBoth your permission to use npm Paid Services and npm's commitment to\nprovide npm Paid Services are subject to these npm Paid Services\nTerms, the npm Open Source Terms, and payment for use of npm Paid\nServices by your Account under a _Payment Plan_. Payment plans include:\n\n1. the npm Solo Payment Plan at\n   <https://docs.npmjs.com/policies/solo-plan>\n\n2. or the npm Orgs Payment Plan at\n   <https://docs.npmjs.com/policies/orgs-plan>\n\nYou may not use npm Paid Services unless you or someone else has\nagreed to a Payment Plan, enabled npm Paid Services for your Account\nunder that Payment Plan, and made payment.\n"},{"id":"8401bedc-50a7-5606-8734-1c4968310a3c","frontmatter":{"title":"npm Security Policy"},"rawBody":"---\ntitle: npm Security Policy\nedit_on_github: false\n---\n\nOutlined in this document are the practices and policies that npm\napplies to help ensure that we release stable/secure software, and\nreact appropriately to security threats when they arise.\n\n## Table of Contents\n\n1. [Reporting Security Problems to npm](#reporting-security-problems-to-npm)\n1. [Security Point of Contact](#security-point-of-contact)\n1. [Critical Updates And Security Notices](#critical-updates-and-security-notices)\n\n## Reporting Security Problems to npm\n\nIf you need to report a security vulnerability.  Please visit [https://npmjs.com/support](https://npmjs.com/support).\nIf your issue is specific to your account, such as lost credentials or problems with two-factor authentication, contacting [our support team](https://npmjs.com/support) is more appropriate.\n\nWe review all security reports on the next business day.  Note that\nthe npm staff is generally offline for most US holidays, but please do\nnot delay your report!  Our off-hours support staff can fix many\nissues, and will alert our security point of contact if needed.\n\n## Security Point of Contact\n\nAny security tickets opened using [https://npmjs.com/support](https://npmjs.com/support)\nwill be escalated to the security point of contact, who will delegate incident response\nactivities as appropriate. This is the best and fastest way to contact npm about any security-related matter.\n\n## Critical Updates And Security Notices\n\nWe learn about critical software updates and security threats from a\nvariety of sources:\n\n* Ubuntu's security notices page: <https://usn.ubuntu.com/>\n* The Node.js mailing list.\n* [Security tickets](https://npmjs.com/support) sent to us.\n* and other media sources.\n\n## Changes\n\nThis is a living document and may be updated from time to time.\nPlease refer to the [git history for this\ndocument](https://github.com/npm/documentation/blob/main/content/policies/security.mdx)\nto view the changes.\n\n## License\n\nThis document may be reused under a [Creative Commons\nAttribution-ShareAlike\nLicense](https://creativecommons.org/licenses/by-sa/4.0/).\n"},{"id":"ddb65ff3-33a9-531a-8d6f-f01f9efd9b24","frontmatter":{"title":"Privacy Questions and Answers"},"rawBody":"---\ntitle: Privacy Questions and Answers\nedit_on_github: false\n---\n\nThis notice describes how [npm, Inc.](https://www.npmjs.com/about), or _npm_ for short, collects and uses data about you.\n\n## [What's most important?](#important)\n\nThat depends on your personal situation, which is why you should read on\nand decide for yourself. But at a minimum, absolutely every npm user\nshould understand:\n\n*The npm public registry is for making software available to everyone\nonline.*\n\nBut: *Software comes from people, and says something about us.*\n\nSo: *Think carefully about what packages to publish, what data you put\nin those packages, and what others might do with that data.*\n\nWhen you create an account, certain contact information is displayed\npublicly in the npm platform. And when you upload a package, your name\nand contact information may become associated with that package.\n\nIf you find yourself in a jam,\n[open a support ticket](https://npmjs.com/support).\n\n\n## [How does npm collect data about me?](#collection)\n\nnpm collects data about you:\n\n-   when you use the [npm command](https://www.npmjs.com/package/npm), \n    the [npx command](https://www.npmjs.com/package/npx) or another \n    program to access the [npm public registry](https://registry.npmjs.org/), \n    [Enterprise registries that npm hosts](https://www.npmjs.com/enterprise), \n    [private packages](https://www.npmjs.com/features), \n    such as when you're publishing a software package, and APIs for \n    functionality like account and permissions management\n\n-   when you browse the npm website, [npmjs.com](https://www.npmjs.com/)\n\n-   when you use either the npm command or the website to create an npm account, \n    update your account, and sign up for npm services\n\n-   when you send support, privacy, legal, and other requests to npm\n\n-   when working with and researching current and potential customers\n\nWhen researching potential customers, npm staff sometimes search the\npublic World Wide Web or paid business databases. Otherwise, npm\ndoesn't buy or receive data about you from data brokers or other\nprivate services.\n\nnpm may inadvertently collect data about you if it is included in\nsoftware packages that you or others upload.\n\n## [What data does npm collect about me, and why?](#data)\n\n### [npm collects data about how you use npm software and registries](#usage-data)\n\nWhen you use the `npm` command, the `npx` command, or other software to work\nwith the npm public registry, an Enterprise registry that npm hosts, or\nprivate packages, npm logs data that might be identified to you:\n\n-   a random, unique identifier, called `npm-session`, for each time you\n    run commands like `npm install`\n\n-   the names and versions of your project's dependencies, their\n    dependencies, and so on, that come from the npm public registry,\n    [but not of other dependencies, like Git\n    dependencies](https://docs.npmjs.com/cli/audit)\n\n-   the versions of Node.js, the npm command, and the operating system\n    you are using\n\n-   an `npm-in-ci` header, showing whether the command was run on a\n    continuous integration server\n\n-   the scope of the package for which you ran `npm install`, as an\n    `npm-scope` header\n\n-   a `referrer` header that shows the command you ran, with any file or\n    directory paths redacted\n\n-   data about the software you're using to access the registry, such\n    as the `User-Agent` string\n\n-   network request data, such as the date and time, your IP address,\n    and the URL\n\nnpm uses this data to:\n\n-   fulfill your requests, such as by sending the packages you ask for\n\n-   send you alerts about security vulnerabilities that may affect the\n    software you're building, when you run `npm install` or `npm audit`\n\n-   keep registries working quickly and reliably\n\n-   debug and develop the `npm` command and other software\n\n-   defend registries from abuse and technical attacks\n\n-   compile statistics on package usage and popularity\n\n-   prepare reports on trends in the developer community\n\n-   improve search results on the website\n\n-   recommend packages that may be relevant to your work\n\n### [npm collects data about how you use the website.](#website-data)\n\nWhen you visit [www.npmjs.com](https://www.npmjs.com/),\n[docs.npmjs.com](https://docs.npmjs.com/), and other npm\nwebsites, npm uses cookies, server logs, and other methods to collect\ndata about what pages you visit, and when. npm also collects technical\ninformation about the software and computer you use, such as:\n\n-   your IP address\n\n-   your preferred language\n\n-   the web browser software you use\n\n-   the kind of computer you use\n\n-   the website that referred you\n\nnpm uses data about how you use the website to:\n\n-   optimize the website, so that it's quick and easy to use\n\n-   diagnose and debug technical errors\n\n-   defend the website from abuse and technical attacks\n\n-   compile statistics on package popularity\n\n-   compile statistics on the kinds of software and computers visitors\n    use\n\n-   compile statistics on visitor searches and needs, to guide\n    development of new website pages and functionality\n\n-   decide who to contact about about product announcements, service\n    changes, and new features\n\n### [npm collects account data](#account-data)\n\nMany features of npm services require an npm account. For example, you\nmust have an npm account to publish packages to the npm public registry.\n\nTo create an npm account, npm requires a working email address and an\navailable user name. npm uses this data to provide you access to\nfeatures and identify you across npm services, publicly and within npm.\n\nYou do not have to give your personal or legal name to create an npm\naccount. You can use a pseudonym instead. You can also open more than\none account.\n\nIf you sign up for an account, then npm will publish account data for\nthe whole world to see on user pages [like this one](https://www.npmjs.com/~kemitchell). \nnpm also publishes account data through the npm public registry, \nwhich is available for everyone to see, and Enterprise registries that npm hosts for others to\nfind with commands like npm owner ls tap.\n\nIf you give npm a personal name or names on social media like\n[GitHub](https://github.com/) and\n[Twitter](https://twitter.com/) through the website, like\nwhen you include this on your profile or user page, npm publishes that\ndata along with the email address and user name for the account. You\ndon't have to give npm a personal name or any social media names, and\nyou can remove this data at any time by updating your user page.\n\nnpm uses your email to:\n\n-   notify you about packages published using your account\n\n-   reset your password and help keep your account secure\n\n-   add metadata to packages that you publish\n\n-   contact you in special circumstances related to your account or packages\n\n-   contact you about support requests\n\n-   contact you about legal requests, like DMCA takedown requests and privacy complaints\n\n-   announce new npm product offerings, service changes, and features\n\n-   send you tips about how to better use free and paid services\n\n-   send you messages about paid services you might want\n\n### [npm collects package data](#package-data)\n\nWhen you use npm publish or other software to publish packages to the\nnpm public registry, an Enterprise registry that npm hosts, or as a\nprivate package, npm collects the contents of the package, plus\n[metadata](https://en.wikipedia.org/wiki/Metadata),\nincluding your account data. Other npm users may also publish packages\nthat include data about you, such as the fact that you contributed code\nto a package.\n\nnpm uses data in packages to provide those packages to you and others\nwho request them:\n\n-   When you publish a package to the npm public registry, or change a\n    package from private to public, npm makes the package and metadata\n    available to everyone, online.\n\n-   When you publish a package to an Enterprise registry that npm hosts,\n    or as a private package, npm makes all of that data available to\n    other users according to how the registry or the private packages\n    account is configured. You may be able to configure who can access\n    the package, or that may be up to others, such as the\n    administrator of your company's Enterprise registry.\n\nMaking package data available to others allows them to download, build\non, and depend on your work.\n\n### [npm collects payment card data](#payment-data)\n\nTo sign up for paid services, npm requires your payment card data. npm\nitself does not collect or store enough information to charge your card\nitself. Rather, [Stripe](https://stripe.com/) collects\nthat data on npm's behalf, and gives npm security tokens that allow npm\nto create charges and subscriptions.\n\nnpm uses your payment card data only to charge for npm services.\n\nnpm instructs [Stripe](https://stripe.com/) to store your\npayment card data only as long as you use paid npm services.\n\n\n### [npm collects data about correspondence](#contact-data)\n\nnpm collects data about you when you send npm support requests, legal\ncomplaints, privacy inquiries, and business inquiries. Those data\nusually include your name and email address, and may include your\ncompany or other affiliation.\n\nnpm uses contact data to:\n\n-   respond to you\n\n-   compile aggregate statistics about correspondence\n\n-   train support staff and other npm personnel\n\n-   review the performance of npm personnel who respond\n\n-   defend npm from legal claims\n\n### [npm collects data about use of npm.community](#forum-data)\n\nnpm collects data about visits, user accounts, and forum data on\n[npm.community](https://npm.community/), the discussion\nforum for users of npm products and services. npm uses data from\nnpm.community to collaborate with the development community, and to\ninform development decisions about the command-line interface and other\nsoftware.\n\n## [Does npm share data about me with others?](#sharing)\n\nnpm shares account data with others as [mentioned in the section about\naccount data](#account-data).\n\nnpm shares package data with others as [mentioned in the section about\npackage data](privacy#package-data).\n\nnpm publishes posts and other content you submit to [npm.community](https://npm.community/).\n\nnpm does not sell information about you to others. However, npm uses\nservices provided by other companies to provide npm services. The types\nof service providers that npm uses include:\n\n-   Companies that enable us to offer features on our website, such as to display your avatar\n\n-   Companies that facilitate the efficient distribution of content\n\n-   Cloud computing platforms and services that host our discussion forums\n\n-   Services that assist with the detection of spam, scams, abuse\n    others, or other violations of our [terms of service][privacy]\n\n-   Payment processors\n\n-   Platforms to help us receive, manage, and respond to support requests\n\n-   Platforms for internal communication\n\n### [npm uses cookies](#cookies)\n\nnpm's website only uses cookies strictly necessary to provide, optimize\nand secure the website. For example, we use them to keep you logged in,\nremember your preferences, authenticate your device for security\npurposes, analyze your use of the service, compile statistical reports,\nand provide information for future development of npm. The website uses\ninternal cookies for analytics purposes, not any third-party analytics\nor service providers.\n\nBy using the website, you agree that we can place these types of\ncookies on your computer or device. If you disable your browser or\ndevice’s ability to accept these cookies, you will not be able to log\nin or use the website.\n\n## [How can I make choices about data collection?](#choice)\n\nYou choose what data the npm publish command includes in package data.\nYou can use an [.npmignore](https://docs.npmjs.com/files/package.json#files)\nfile in your package to keep specific files out of the package. You can\nalso use a [files list in package.json\nfiles](https://docs.npmjs.com/files/package.json#files) to\ninstruct npm to include only specific files that you name, in addition\nto standard files like `README` files, `LICENSE` files, and package.json.\n\nTo double check the data that you will share in a package that you plan\nto publish, run the `npm publish --dry-run` command. If you are running\nan older version of the npm command, run the npm pack command to create a\n[tarball](https://en.wikipedia.org/wiki/Tar_(computing)),\nthen check its contents, such as with `tar tvzf $tarball`.\n\nTo publish a package to the npm public registry, npm's terms of service\nrequire you to [license npm to share it][your-content].\nIf a package is made public, it is available for everyone online to see.\nHowever, your [choice of public license for your package](https://docs.npmjs.com/files/package.json#license)\nmay affect what others can do with data about you in your package.\n\nnpm does not respond to the [Do Not Track HTTP header](https://en.wikipedia.org/wiki/Do_Not_Track).\n\n## [Where does npm keep data about me?](#locality)\n\nnpm stores account data, data about website use, data about registry\nuse, and private packages on servers in the United States of America.\nmetadata about those packages worldwide, via content delivery\nnetworks.\n\nnpm stores package data published to Enterprise registries that npm\nhosts, plus metadata about them, in cloud computing zones of customers' choosing.\n\nBy using the npm platform, you consent to the collection and storage of\nyour data as outlined in this section.\n\n## [How does npm handle data under the EU General Data Protection Regulation?](#gdpr)\n\n\nnpm respects privacy rights under [Regulation (EU) 2016/679](http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2016.119.01.0001.01.ENG),\nthe European Union's General Data Protection Regulation (GDPR). npm\nprocesses \"Personal Data\" on the following legal bases: (1) with your\nconsent; (2) as necessary to perform our agreement to provide our\nservices; and (3) as necessary for our legitimate interests in providing\nour services where those interests do not override your fundamental\nrights and freedom related to data privacy. Information we collect may\nbe transferred to, and stored and processed in, the United States or any\nother country in which we or our affiliates or subcontractors maintain\nfacilities, as described above.\n\nIf you reside in the EEA, Switzerland, or United Kingdom, you are\nentitled to certain rights, like the right to:\n\n-   complain about our data collection or processing actions with the\n    supervisor authority concerned. You can find a list of data\n    protection authorities [here](http://ec.europa.eu/justice/data-protection/bodies/authorities/index_en.htm).\n\n-   access to information held about you.\n\n-   ask us to correct or amend inaccurate or incomplete information we have about you.\n\n-   ask us to erase data that under certain circumstances, like (1) when\n    it is no longer necessary for the purpose for which it was\n    collected, (2) you withdraw consent and no other legal basis for\n    processing exists, or (3) you believe your fundamental rights to\n    data privacy and protection outweigh our legitimate interest in\n    continuing the processing.\n\n-   request that we restrict our processing if we are processing your\n    data based on legitimate interests or the performance of a task in\n    the public interest as an exercise of official authority\n    (including profiling); using your data for direct marketing\n    (including profiling); or processing your data for purposes of\n    scientific or historical research and statistics.\n\nWhen you exercise your rights, npm may need to verify your identity and\nprovide us with information before we access records containing your\ninformation. If you want to exercise your rights, please contact npm by\n[opening a support ticket](https://npmjs.com/support).  We\nmay have a reason under the law why we do not have to comply with your\nrequest or may comply with it in a more limited way than you\nanticipated. If we do, we will explain that to you in our response.\n\n## [How does npm handle data under the California Consumer Privacy Act?](#ccpa)\n\nnpm respects the rights of California residents under the [California\nConsumer Privacy Act](https://www.oag.ca.gov/privacy/ccpa)\n(CCPA). Where we collect information that is subject to the\nCCPA, that information we collect and your rights are described below.\n\nCategories of personal information we collect:\n\n-   _Personal Identifiers_:\n\n    -   Name and email address when you create an account. You will also\n        be asked to create a username and we will assign one or more\n        unique identifiers to your profile. We use this information to\n        provide our services, respond to your requests, and send\n        information to you.\n\n    -   We also collect your social media handle and basic account\n        information if you provide it to us or interact with our\n        services, such as our help desk, through social media.\n\n    -   We collect your payment information through our service\n        provider, Stripe, as described above.\n\n-   _Internet or Other Electronic Network Activity Information_: device\n    identifiers such as IP address and user agent; the assigned unique\n    IDs in cookies (as described below); information about how you\n    arrived at and navigated through our Services.\n\n-   _Geolocation Data:_ We do not collect your specific longitude and\n    latitude. However, we do collect imprecise location (e.g., your IP address).\n\n-   _Professional or employment-related information:_ If you apply for\n    employment with us, information about your employment history.\n\n-   _Education information:_ If you apply for employment with us,\n    information about your educational history.\n\nWe may collect any other information about you contained in software\npackages uploaded to our site, as described above under the \"npm\ncollects package data\" section. We also collect the contents of your\ncommunications with us, e.g., when you submit a question to us through\na web form or comments to us on social media.\n\nWe may disclose any of the categories of personal information listed\nabove and use them for the above-listed purposes or for other business\nor operational purposes compatible with the context in which the\npersonal information was collected. Our disclosures of personal\ninformation include disclosures to our \"service providers,\" which are\ncompanies that we engage for business purposes to conduct activities\non our behalf. The categories of service providers with whom we share\ninformation and the services they provide are described below.\n\nRights under CCPA:\n\n-   _Access/Right to Know_: You have the right to request access to\n    personal information we collected about you and information\n    regarding the source of that personal information, the purposes\n    for which we collect it, and the third parties and service\n    providers with whom we share it.\n\n-   _Deletion_: You have the right to request that we erase data we have\n    collected from you. Please note that we may have a reason to deny\n    your deletion request or delete data in a more limited way than\n    you anticipated, e.g., because of a legal obligation to retain it.\n\nTo exercise your rights above, you can\n[open a support ticket](https://npmjs.com/support).  When we\nprocess your request, we must verify your identity by asking you to\n(1) provide personal identifiers that we can match against information\nwe may have collected from you previously; and (2) confirm your\nrequest using the email stated in the request.\n\nOpt-out of sale:\n\nCalifornia residents have the right to request that we stop \"selling\"\ntheir personal information. A \"sale\" of personal information is\ndefined broadly: \"selling, renting, releasing, disclosing,\ndisseminating, making available, transferring, or otherwise\ncommunicating orally, in writing, or by electronic or other means, a\nconsumer's personal information by the business to another business or\na third party for monetary or other valuable consideration.\" We do not\nsell your information as defined by the CCPA.\n\nPlease note that your right to opt out does not apply to our sharing\nof personal information with service providers, who are parties we\nengage to perform a function on our behalf and are contractually\nobligated to use the Personal Information only for that function.\n\nWe may also disclose information to other entities who are not listed\nhere when required by law or to protect our Company or other persons,\nas described in our Privacy Policy.\n\n\n## [How can I see what data is publicly available about me?](#access)\n\nYou can access your account data at any time by visiting your account\npage on [www.npmjs.com](https://www.npmjs.com/). Your\naccount page also lists all the packages published under your account or\nother accounts.\n\nYou can access package data by downloading the packages, as long as\nthey're public or you have permission to access them.\n\nYou can see metadata about packages by running npm info $package, or by\naccessing the appropriate [registry's\nAPI](https://github.com/npm/registry/tree/master/docs).\nRegistry APIs provide metadata in standard [JSON](https://www.json.org/)\nformat, and packages as\n[tarballs](https://en.wikipedia.org/wiki/Tar_(computing)).\n\n## [How can I change data about me?](#change)\n\nYou can change your personal account data and payment card data at any\ntime by visiting your account settings page on\n[www.npmjs.com](https://www.npmjs.com/). You can change\naccount and payment data for Enterprise by [contacting support](https://npmjs.com/support).\n\nYou can close your npm account at any time by e-mailing\n[contacting support](https://npmjs.com/support).  Closing\nyour account removes the profile from the public registry but does not\nautomatically erase packages published under your account. We may retain\nsome data about you internally even where you close your account.\n\nnpm's [unpublish policy][unpublish]\ndetermines when you can erase packages from the npm public registry. The\nunpublish policy strikes a difficult balance between the purpose of\npublishing and hosting packages, others' reliance on what has been made\npublic, and individual rights and freedoms.\n\nIf another user improperly publishes personal data about you, in a\npackage or otherwise,\n[open a support ticket](https://npmjs.com/support).\n\nPlease note that while [npm publishes notices about published data\nthat's been erased](#erasure-notice),\nnpm can't make everyone who has downloaded published package data or\naccount data erase that data on your behalf. Choosing a public\nlicense, such as an open source software license,\nmay encourage and allow storage, distribution, and use of package data\nindefinitely. Nearly all popular open source software licenses actually\nrequire preserving personal data that attributes the software to you,\nsuch as copyright notices, as a condition of permission for the\nsoftware.\n\n\n## [What is npm's policy on unpublishing packages?](#forgotten)\n\nPlease see [our policy on \"unpublishing\" packages][unpublish] or\n[our terms of service][open-source-terms] for more\ninformation on erasing packages].\n\nIf you accidentally publish a package that threatens your privacy, or\ndiscover someone else has published a package that does,\n[open a support ticket](https://npmjs.com/support).\nnpm can and will take down packages in specific, exceptional situations\nto protect you, especially if others violate your privacy. Using npm to\nviolate others' privacy is against our [terms of service][open-source-terms].\n\n\n## [How does npm notify others about published data that's erased?](#erasure-notice)\n\nnpm takes a few steps to notify others who may be copying data from the\nnpm public registry that published data has been erased:\n\n-   npm publishes new placeholder versions of some erased packages, with\n    `README` files that mention the package has been erased, and why.\n\n-   npm's [registry APIs](https://github.com/npm/registry/tree/master/docs),\n    special software services that others use to copy data from the\n    npm public registry, send update messages about packages that have\n    been erased.\n\n\n## [What happens if npm merges with or is bought by another company?](#merge)\n\nWe may transfer to another entity or its affiliates or service providers\nsome or all information about you in connection with, or during\nnegotiations of, any merger, acquisition, sale of assets or any line of\nbusiness, change in ownership control, or financing transaction. We\ncannot promise that an acquiring party or the merged entity will have\nthe same privacy practices or treat your information the same as\ndescribed in this Policy.\n\n\n## [What are npm's information practices regarding information belonging to children?](#children)\n\nnpm's site and services are intended for users age sixteen and older.\nnpm does not knowingly collect information from children. If we discover\nthat we have inadvertently collected information from anyone younger\nthan the age of 16, we will delete that information.\n\n## [Who can I contact about npm and my privacy?](#contact)\n\nPlease [open a support ticket](https://npmjs.com/support).  You may also\ncontact our Data Protection Officer directly.\n\nOur United States HQ:\n\nGitHub Data Protection Officer  \nAttention: npm Data Protection  \n88 Colin P. Kelly Jr. St.  \nSan Francisco, CA 94107  \nUnited States\n\nor our EU Office:\n\nGitHub BV  \nVijzelstraat 68-72  \n1017 HL Amsterdam  \nThe Netherlands\n\n## [How can I find out about changes?](#changes)\n\nThis version of npm's privacy questions and answers took effect June 3, 2020.\n\nnpm will announce the next version on the [npm blog](https://blog.npmjs.org/). \nIn the meantime, npm may update [its contact information](#contact)\nby updating the page at\n[https://docs.npmjs.com/privacy][privacy],\nwithout an announcement. npm may change how it announces changes in\nfuture privacy versions.\n\nYou can review the history of changes in [the Git repository for npm's\npublic policies](https://github.com/npm/documentation/blob/main/content/policies/privacy.mdx).\n\n[terms]: /policies/terms\n[privacy]: /policies/privacy\n[open-source-terms]: /policies/open-source-terms\n[unpublish]: /policies/unpublish\n[your-content]: /policies/open-source-terms#your-content)\n"},{"id":"8c8fa387-8290-544a-841e-9a1c64fd566b","frontmatter":{"title":"Solo Payment Plan"},"rawBody":"---\ntitle: Solo Payment Plan\nedit_on_github: false\n---\n\nThis npm Solo Payment Plan (this _Payment Plan_) supplements\nthe terms for npm Open Source offered by npm, Inc. (_npm_) at\n[https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source\nTerms_), as well as the terms for npm Paid Services (_npm Paid Services_)\nat [https://docs.npmjs.com/policies/private-terms][private-terms](_npm Paid\nServices Terms_). This Payment Plan governs payment for use of\nnpm Solo by a single user account.\n\nThis Payment Plan was last updated on\nAugust 6, 2018.\nYou can review prior versions at\n<https://github.com/npm/documentation/blob/main/content/policies/solo-plan.mdx>.\n\nYou will pay $7.00 via your Payment Card when you enable npm Solo\nfor your Account by selecting this Payment Plan, and thereafter\non the same day every month while this Payment Plan remains\nselected for your Account.\n\nNote that the npm Paid Services Terms require everyone using npm Paid\nServices to have an Account of their own, added under a Payment Plan.\nYou may not allow anyone else to use npm Paid Services under this\nPayment Plan.\n\n[open-source-terms]: /policies/open-source-terms\n[private-terms]: /policies/private-terms"},{"id":"e040aba0-1c41-5c2f-95cb-58b485828bee","frontmatter":{"title":"Terms and Licenses"},"rawBody":"---\ntitle: Terms and Licenses\nedit_on_github: false\n---\nnpm, Inc. offers software and services under a few different licenses\nand terms of use.\n\n## Software from npm\n\nLicense terms and notices for the `npm` command-line program can\nbe found in the LICENSE file of the project's source code at\n<https://www.github.com/npm/cli>.\n\n## Free to use npm services\n\nFree usage of <https://www.npmjs.com>, and the npm public registry\nare covered by the npm Open Source Terms at <https://docs.npmjs.com/policies/open-source-terms>.\nThese terms include several important policies, including:\n\n* What npm considers [acceptable package content][acceptable-use].\n\n* npm's [Code of Conduct][conduct], which includes our policy on harassment.\n\n* npm's [Privacy Policy][privacy], which limits use and sharing of information\nabout you collected by npm Services.\n\n* npm's policy on [copyright][dmca] including how to report violations thereof.\n\n* npm's [Dispute Policy][disputes] which addresses how to resolve disputes\nover the control of a package name, user name, or organization name in the Public Registry. This includes\nour policy on users \"squatting\" on these names.\n\n* Use of npm's trademarks is governed by our [Trademark Policy][trademark]. If you\nhave concerns about your own trademark's use on npm please see our [Disputes Policy][disputes-trademark].\n\n## Paid npm services\n\nnpm's paid products, including the npm Solo and Orgs plans, are\ncovered by the npm Paid Services Terms at <https://docs.npmjs.com/policies/private-terms>.\n\nThe [npm Solo Payment Plan][solo-plan]\nand the [npm Orgs Payment Plan][orgs-plan]\ngovern payment for these services.\n\n[acceptable-use]: /policies/open-source-terms#acceptable-use\n[privacy]: /policies/privacy\n[dmca]: /policies/dmca\n[disputes]: /policies/disputes\n[trademark]: /policies/trademark\n[disputes-trademark]: /policies/disputes#trademarks\n[conduct]: /policies/conduct\n[orgs-plan]: /policies/orgs-plan\n[solo-plan]: /policies/solo-plan"},{"id":"efd79941-530d-5dba-a325-6ac81da74edd","frontmatter":{"title":"npm Unpublish Policy"},"rawBody":"---\ntitle: npm Unpublish Policy\nedit_on_github: false\n---\n\nThis document describes your options when looking to unpublish a package published to the public registry.\n\nRegistry data is immutable, meaning once published, a package cannot change. We do this for reasons of security and stability of the users who depend on those packages. So if you've ever published a package called \"bob\" at version 1.1.0, no other package can ever be published with that name at that version. This is true even if that package is unpublished.\n\nHowever, because accidents happen, we allow you to unpublish packages in the situations described below. Otherwise, you can always deprecate a package.\n\n## Packages published less than 72 hours ago\n\nFor newly created packages, as long as no other packages in the npm Public Registry depend on your package, you can unpublish anytime within the first 72 hours after publishing.\n\n## Packages published more than 72 hours ago\n\nRegardless of how long ago a package was published, you can unpublish a package that:\n\n- no other packages in the npm Public Registry depend on\n- had less than 300 downloads over the last week\n- has a single owner/maintainer\n\n## How to unpublish\n\nTo unpublish a single package version, run `npm unpublish <package_name>@<version>`.\n\nIf all the versions of a package can be unpublished, you can unpublish all versions at once by running `npm unpublish <package_name> --force`.\n\n## Considerations:\n\n- Once `package@version` has been used, you can never use it again. You must publish a new version even if you unpublished the old one.\n- Once you have unpublished a package, you will not be able to undo the unpublish.\n- If you entirely unpublish all versions of a package, you may not publish any new versions of that package until 24 hours have passed.\n\n## What to do if your package does not meet the unpublish criteria?\n\nIf your package does not meet the unpublish policy criteria, we recommend [deprecating](https://docs.npmjs.com/cli/deprecate) the package. This allows the package to be downloaded but publishes a clear warning message (that you get to write) every time the package is downloaded, and on the package's npmjs.com page. Users will know that you do not recommend they use the package, but if they are depending on it their builds will not break. We consider this a good compromise between reliability and author control.\n\nThis can be achieved by using one of the following from your command line:\n\n- `npm deprecate <package> \"<message>\"` to deprecate the entire package\n- `npm deprecate <package>@<version> \"<message>\"` to deprecate a specific version\n\nIf the entire package is deprecated, the package name will be dropped from our search results.\n\nOnce deprecated, if you would also like for the package to be removed from your user profile, it can be [transferred](https://docs.npmjs.com/cli/owner) to our [@npm](https://www.npmjs.com/~npm) account. This can be achieved by using the following from your command line:\n\n- `npm owner add npm <package>`\n- `npm owner rm <your_username> <package>`\n\n\n## More on our unpublish policy\n\nThis document is additive to the [unpublish procedures](https://docs.npmjs.com/unpublishing-packages-from-the-registry), the CLI commands [unpublish documentation](https://docs.npmjs.com/cli/unpublish) and the [\"Changes to npm Unpublish Policy - January 2020\"](https://blog.npmjs.org/post/190553543620/changes-to-npmunpublish-policy-january-2020) blog post.\n\n## Issues?\n\nIf for some reason your package meets the unpublish policy criteria but the unpublish command fails, or if you need assistance with the deprecate process, please [reach out to our support team](https://npmjs.com/support) where we'll be happy to assist.\n\nIf you believe a package violates npm's terms or policies, such as our terms of use, [reach out to our support team](https://www.npmjs.com/support).  If a package infringes your copyright, [refer to npm's DMCA takedown policy][dmca].  If you believe a package violates your privacy rights, [contact our privacy team][contact] as soon as possible.\n\n## Changes\n\nThis is a living document and may be updated from time to time.\nPlease refer to the [git history for this\ndocument](https://github.com/npm/documentation/blob/main/content/policies/unpublish.mdx)\nto view the changes.\n\n## License\n\nCopyright (C) npm, Inc., All rights reserved\n\nThis document may be reused under a [Creative Commons\nAttribution-ShareAlike\nLicense](https://creativecommons.org/licenses/by-sa/4.0/).\n\n[dmca]: /policies/dmca\n[contact]: /policies/privacy#contact"},{"id":"27d0e45a-c6f3-5803-a221-80214291ea48","frontmatter":{"title":"The npm threat model"},"rawBody":"---\ntitle: The npm threat model\nredirect_from: [ /the-npm-threat-model ]\n---\n\nWe put together this page to give an overview of the most common attacks npm faces, a high-level description of how we mitigate those attacks, and links to more information.\n\n## Account Takeovers\n\n### By compromising passwords\n\nThis is the most common attack, not just on npm but on any web service. The best way to protect your account is to [enable two-factor authentication][configuring-2fa] (2FA). The strongest option is to use a security-key, either built-in to your device or an external hardware key; it binds the authentication to the site you are accessing, making phishing exceedingly difficult. Not everyone has access to a security-key though, so we also support authentication apps that generate one-time passcodes for 2FA.\n\nBecause of how common this attack is, and how critical npm packages are to the broader software ecosystem, we have undertaken a phased approach in mandating 2FA for npm package maintainers. This has already rolled out to the [top-100 package maintainers](https://github.blog/2022-02-01-top-100-npm-package-maintainers-require-2fa-additional-security/) and [top-500 package maintainers](https://github.blog/changelog/2022-05-31-top-500-npm-package-maintainers-now-require-2fa/), and in the near future, maintainers of all high-impact packages (those with 1 million+ weekly downloads or 500+ dependents) will be enrolled in mandatory 2FA.\n\nWe also recognize that passwords aren’t going away any time soon. For users that don’t opt-in to 2FA, we do an enhanced login verification with a [one-time password sent to their email][email-otp] to lower the risk of an account takeover.\n\n### By registering an expired email domain\n\nAnother method used to take over an account is by identifying accounts using an expired domain for their email address. An attacker could register the expired domain and recreate the email address used to register the account. With access to an account's registered email address an attacker could take over an account not protected by 2FA via a password reset.\n\nWhen a package is published the email address associated with the account, **at the time the package was published**, is included in the public metadata. Attackers are able to utilize this public data to identify accounts that might be susceptible to account takeover. It is important to note that the** email addresses stored in public metadata of packages are not updated when a maintainer updates their email address**. As such crawling public metadata to identify accounts susceptible to expired domain takeover will result in false positives, accounts that appear to be vulnerable but are not.\n\nnpm does periodically check if accounts email addresses have expired domains or invalid MX records. When the domain has expired, we disable the account from doing a password reset and require the user to undergo account recovery or go through a successful authentication flow before they can reset their password.\n\n## Uploading Malicious Packages\n\n### By \"typosquatting\" / dependency confusion\n\nAttackers may attempt to trick others into installing a malicious package by registering a package with a similar name to a popular package, in hopes that people will mistype or otherwise confuse the two. npm is able to detect typosquat attacks and block the publishing of these packages.\n\nA variant of this attack is when a public package is registered with the same name of a private package that an organization is using. We strongly encourage using [scoped packages](https://github.blog/2021-02-12-avoiding-npm-substitution-attacks/) to ensure that a private package isn’t being substituted with one from the public registry. While npm is not able to detect dependency confusion attacks we have a zero tolerance for malicious packages on the registry. If you believe you have identified a dependency confusion packages, [please let us know][report-malware]!\n\n### By changing an existing package to have malicious behavior\n\nRather than tricking people into using a similarly-named package, attackers also try to add malicious behavior to existing popular packages. In partnership with Microsoft, npm both scans packages for known malicious content, and runs the packages to look for new patterns of behavior that could be malicious. This has led to a substantial reduction in malicious content in npm packages. Furthermore, our Trust and Safety team checks and removes malicious content reported by our users. Similar to dependency confusion attacks, we are constantly updating our detection services with new examples, so if you think a package contains malicious behavior, [please let us know][report-malware]!\n\n[configuring-2fa]: /configuring-two-factor-authentication\n[email-otp]: /receiving-a-one-time-password-over-email\n[report-malware]: /reporting-malware-in-an-npm-package\n"},{"id":"7158c724-9c2a-565d-92ff-6578d7109572","frontmatter":{"title":"npm: Threats and Mitigations"},"rawBody":"---\ntitle: \"npm: Threats and Mitigations\"\nredirect_from: [ /threats-and-mitigations ]\n---\n\nWe put together this page to give an overview of the most common attacks npm faces, a high-level description of how we mitigate those attacks, and links to more information.\n\n## Account Takeovers\n\n### By compromising passwords\n\nThis is the most common attack, not just on npm but on any web service. The best way to protect your account is to [enable two-factor authentication][configuring-2fa] (2FA). The strongest option is to use a security-key, either built-in to your device or an external hardware key; it binds the authentication to the site you are accessing, making phishing exceedingly difficult. Not everyone has access to a security-key though, so we also support authentication apps that generate one-time passcodes for 2FA.\n\nBecause of how common this attack is, and how critical npm packages are to the broader software ecosystem, we have undertaken a phased approach in mandating 2FA for npm package maintainers. This has already rolled out to the [top-100 package maintainers](https://github.blog/2022-02-01-top-100-npm-package-maintainers-require-2fa-additional-security/) and [top-500 package maintainers](https://github.blog/changelog/2022-05-31-top-500-npm-package-maintainers-now-require-2fa/), and in the near future, maintainers of all high-impact packages (those with 1 million+ weekly downloads or 500+ dependents) will be enrolled in mandatory 2FA.\n\nWe also recognize that passwords aren’t going away any time soon. For users that don’t opt-in to 2FA, we do an enhanced login verification with a [one-time password sent to their email][email-otp] to protect from account takeover.\n\n### By registering an expired email domain\n\nAnother method used to take over an account is by identifying accounts using an expired domain for their email address. An attacker could register the expired domain and recreate the email address used to register the account. With access to an account's registered email address an attacker could take over an account not protected by 2FA via a password reset.\n\nWhen a package is published the email address associated with the account, **at the time the package was published**, is included in the public metadata. Attackers are able to utilize this public data to identify accounts that might be susceptible to account takeover. It is important to note that the** email addresses stored in public metadata of packages are not updated when a maintainer updates their email address**. As such crawling public metadata to identify accounts susceptible to expired domain takeover will result in false positives, accounts that appear to be vulnerable but are not.\n\nnpm does periodically check if accounts email addresses have expired domains or invalid MX records. When the domain has expired, we disable the account from doing a password reset and require the user to undergo account recovery or go through a successful authentication flow before they can reset their password.\n\n## Uploading Malicious Packages\n\n### By \"typosquatting\" / dependency confusion\n\nAttackers may attempt to trick others into installing a malicious package by registering a package with a similar name to a popular package, in hopes that people will mistype or otherwise confuse the two. npm is able to detect typosquat attacks and block the publishing of these packages.\n\nA variant of this attack is when a public package is registered with the same name of a private package that an organization is using. We strongly encourage using [scoped packages](https://github.blog/2021-02-12-avoiding-npm-substitution-attacks/) to ensure that a private package isn’t being substituted with one from the public registry. While npm is not able to detect dependency confusion attacks we have a zero tolerance for malicious packages on the registry. If you believe you have identified a dependency confusion packages, [please let us know][report-malware]!\n\n### By changing an existing package to have malicious behavior\n\nRather than tricking people into using a similarly-named package, attackers also try to add malicious behavior to existing popular packages. In partnership with Microsoft, npm both scans packages for known malicious content, and runs the packages to look for new patterns of behavior that could be malicious. This has led to a substantial reduction in malicious content in npm packages. Furthermore, our Trust and Safety team checks and removes malicious content reported by our users. Similar to dependency confusion attacks, we are constantly updating our detection services with new examples, so if you think a package contains malicious behavior, [please let us know][report-malware]!\n\n[configuring-2fa]: /configuring-two-factor-authentication\n[email-otp]: /receiving-a-one-time-password-over-email\n[report-malware]: /reporting-malware-in-an-npm-package\n"},{"id":"b6b595e6-dd79-5408-8a15-e0f1eb23f2f2","frontmatter":{"title":"npm CLI"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/nav.yml\ntitle: npm CLI\n---\n\n<Index depth=\"1\" />\n"},{"id":"cf3d1260-5cde-50ba-b9a5-7020064b4026","frontmatter":{"title":"npm CLI"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/nav.yml\ntitle: npm CLI\n---\n\n<Index depth=\"1\" />\n"},{"id":"5945124b-6fd0-5093-83ab-10d112bbc1d7","frontmatter":{"title":"npm CLI"},"rawBody":"---\nredirect_from:\n  - /cli\n  - /cli-documentation\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/nav.yml\ntitle: npm CLI\n---\n\n<Index depth=\"1\" />\n"},{"id":"e76706a2-24c0-5973-8df1-57d96ab264c9","frontmatter":{"title":"About npm CLI versions"},"rawBody":"---\ntitle: About npm CLI versions\nslug: /about-npm-versions\n---\n\nThe npm command line interface (CLI) is released on a regular cadence. We recommend installing the release that supports your workflow:\n\n- [latest release](#the-latest-release-of-npm): the most recent stable version.\n\n## The `latest` release of npm\n\nThe `latest` release of npm is the most recent stable version. When you install Node.js, npm is automatically installed. However, npm is released more frequently than Node.js, so to install the latest stable version of npm, on the command line, run:\n\n```\nnpm install npm@latest -g\n```\n"},{"id":"578fd137-ccf1-5a39-ac65-dc1b61e4552d","frontmatter":{"title":"Downloading and installing Node.js and npm"},"rawBody":"---\ntitle: Downloading and installing Node.js and npm\nredirect_from: [ /getting-started/installing-node ]\n---\n\nTo publish and install packages to and from the public npm registry or a private 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 recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) 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 permissions errors when you run npm packages globally.\n\n<Note>\n\n**Note:** to download the latest version of npm, on the command line, run the following command:\n\n```\nnpm install -g npm\n```\n\n</Note>\n\n## Overview\n\n- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)\n- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)\n- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)\n\n## Checking your version of npm and Node.js\n\nTo see if you already have Node.js and npm installed and check the installed version, run the following commands:\n\n```\nnode -v\nnpm -v\n```\n\n## Using a Node version manager to install Node.js and npm\n\nNode version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.\n\n### OSX or Linux Node version managers\n\n* [nvm](https://github.com/creationix/nvm)\n* [n](https://github.com/tj/n)\n\n### Windows Node version managers\n\n* [nodist](https://github.com/marcelklehr/nodist)\n* [nvm-windows](https://github.com/coreybutler/nvm-windows)\n\n## Using a Node installer to install Node.js and npm\n\nIf you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.\n\n* [Node.js installer](https://nodejs.org/en/download/)\n* [NodeSource installer](https://github.com/nodesource/distributions)\n\nIf you use Linux, we recommend that you use a NodeSource installer.\n\n### OS X or Windows Node installers\n\nIf 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.\n\n### Linux or other operating systems Node installers\n\nIf you're using Linux or another operating system, use one of the following installers:\n\n- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)\n- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)\n\nOr see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.\n\n\n### Less-common operating systems\n\nFor more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].\n\n\n[pkg-mgr]: https://nodejs.org/en/download/package-manager/\n"},{"id":"79ab481a-0efa-5b4f-b2c4-f82b9ae653d9","frontmatter":{"title":"Configuring your local environment"},"rawBody":"---\ntitle: Configuring your local environment\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"e317af43-c1dc-5eaa-b2ff-670f443fe466","frontmatter":{"title":"Changing your npm username"},"rawBody":"---\ntitle: Changing your npm username\n---\nimport shared from '../../../src/shared.js'\n\nIt is not currently possible to change your npm username.  You'll need to\ncreate a new account and migrate the data to the new account manually.\n\n1. Create a [new user account](/creating-a-new-npm-user-account) with your desired username\n2. [Transfer your packages](/transferring-a-package-from-a-user-account-to-another-user-account) to your new account.\n3. If you are a member of any [organizations](/organizations), ask the organization administrator to [invite your new account to the organization](/adding-members-to-your-organization).\n4. Delete your [original account](/deleting-your-npm-user-account).  Note that this is permanent, and after 30 days, this account name is available for other people to claim.\n\n"},{"id":"422eb896-23dc-5cdc-869a-0399d18eabd7","frontmatter":{"title":"Deleting your npm user account"},"rawBody":"---\ntitle: Deleting your npm user account\n---\nimport shared from '../../../src/shared.js'\n\nFrom the web, you can delete your npm user account.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. On this page, you will find a button to delete your account. Click that.\n\n  <Screenshot src=\"/getting-started/managing-your-npm-user-account/delete-your-account.png\" alt=\"Screenshot of button to press to delete your account\" />\n\n4. You will now be presented with an overview of how many npm packages will be deleted and deprecated as part of your account deletion. If you agree with this, then enter your username and click \"Delete this account\".\n\n  <Screenshot src=\"/getting-started/managing-your-npm-user-account/account-deletion-confirmation.png\" alt=\"Screenshot of the confirmation screen to delete an account.\" />\n\n5. You will be immediately logged out, and will not be able to log back in.\n\nIn some cases, you will be presented with an error if we were unable to automatically delete your account. For example. if you are the sole owner of an organization you will need to add an additional owner before your account can be deleted. You will be presented clear instructions of what you will need to do in order to delete your account.\n\n<>If you are in doubt about deleting your account, {shared['contact-support'].text}</>.\n"},{"id":"79918654-ea33-5d1b-93ed-9deccb835597","frontmatter":{"title":"Managing your npm user account"},"rawBody":"---\ntitle: Managing your npm user account\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"e37b4024-bb00-5906-9fd6-5dd28afd9438","frontmatter":{"title":"Managing your profile settings"},"rawBody":"---\ntitle: Managing your profile settings\nredirect_from:\n  - /getting-started/modifying_your_profile_from_command_line\n---\nimport shared from '../../../src/shared.js'\n\nYou can manage settings for your user account profile from the web or command line.\n\n## Managing user account profile settings from the web\n\nFrom the web, you can change the following user profile settings:\n\n* Avatar\n* Password\n* Full name\n* Link GitHub Account\n* Link Twitter Account\n* Email address added to package metadata\n* Two-factor authentication status\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n### Linking your npm and GitHub accounts\n\n1. On the account settings page, you will find a button to link your GitHub account. Click that.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/connect-github.png\" alt=\"Screenshot of linking from Account Setting without any accounts linked\" />\n\n2. If you are not currently logged in to GitHub you will be prompted to go through the authentication flow.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/github-login.png\" alt=\"GitHub login form\" />\n\n3. After successfully logging in, or if you already had an active browser sessions, you will be prompted to \"authorize npm account link\", click the button.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/github-authorize.png\" alt=\"Landing page to authorize the installation of the npm account linking app\" />\n\n4. You will be redirected to npm and the link will show as successful in your settings.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/github-success.png\" alt=\"Screenshot of linking from Account Setting with successfully linked GitHub account\" />\n\n### Linking your npm and Twitter accounts\n\n1. On the account settings page, you will find a button to link your Twitter account. Click that.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/connect-twitter.png\" alt=\"Screenshot of linking from Account Setting without any accounts linked\" />\n\n2. If you are not currently logged in to Twitter you will be prompted to go through the authentication flow. Click \"Log in\"\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/twitter-login.png\" alt=\"Twitter login form\" />\n\n3. After successfully logging in, or if you already had an active browser sessions, you will be prompted to \"Authorize app\", click the button.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/twitter-authorize.png\" alt=\"Landing page to authorize the installation of the npm account linking app\" />\n\n4. You will be redirected to npm and the link will show as successful in your settings.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/twitter-success.png\" alt=\"Screenshot of linking from Account Setting with successfully linked Twitter account\" />\n\n### Disconnecting your GitHub account from npm\n\n1. On the account settings page, you will find a button to disconnect your GitHub account. Click that.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/github-disconnect.png\" alt=\"Screenshot of linking from Account Setting with a cursor hovering over disconnect\" />\n\n   _Note: Clicking disconnect will only disconnect the link from your npm account. You need to `revoke` permissions from your [GitHub app authorization settings](https://github.com/settings/apps/authorizations) to permanently remove the integration from your GitHub account_\n\n### Disconnecting your Twitter account from npm\n\n1. On the account settings page, you will find a button to disconnect your GitHub account. Click that.\n\n   <Screenshot src=\"/getting-started/managing-your-npm-user-account/twitter-disconnect.png\" alt=\"Screenshot of linking from Account Setting with a cursor hovering over disconnect\" />\n\n   _Note: Clicking disconnect will only disconnect the link from your npm account. You need to `revoke` permissions from your [Twitter connect apps management page](https://twitter.com/settings/connected_apps) to permanently remove the integration from your Twitter account_\n\n## Managing user account profile settings from the command line\n\n<Note>\n\n**Note:** Your npm client must be version 5.5.1 or higher to change your account settings from the CLI. To update to the latest version of npm, on the command line, run `npm install npm@latest -g`\n\n</Note>\n\n### Viewing user account profile settings from the command line\n\nTo view your user profile settings from the CLI, on the command line, run the following command:\n\n```\nnpm profile get\n```\n\n<Screenshot src=\"/getting-started/managing-your-npm-user-account/profile-settings-cli.png\" alt=\"Screenshot of command-line interface profile settings table\" />\n\n### Updating user account profile settings from the command line\n\nFrom the CLI, you can change the following properties for your user account:\n\n* `email`\n* `two-factor auth`\n* `fullname`\n* `homepage`\n* `freenode`\n* `password`\n\n1. On the command line, type the following command, replacing `property` with the name of the property, and `value` with the new value:\n\n   ```\n   npm profile set <prop> <value>\n   ```\n\n2. When prompted, provide your current password.\n\n3. If you have enabled two-factor authentication on your account, when prompted, enter a one-time password.\n\nFor more details, see the `profile` [command line documentation](https://docs.npmjs.com/cli/profile).\n\n#### Setting a password from the command line\n\n1. On the command line, type the following command:\n\n  ```\n  npm profile set password\n  ```\n\n2. When prompted, provide your current password.\n\n3. When prompted, type a new password.\n\n<Note>\n\nTo protect your account, when you reset your password from the command line, it must:\n\n* be longer than 10 characters\n* not contain part of your username\n* not be on [this list of common passwords](https://www.npmjs.com/signup/common-passwords)\n* not be in the \"[Have I Been Pwned](https://haveibeenpwned.com/)\" breach database\n\n</Note>\n\n#### Configuring two-factor authentication from the command line\n\nEnabling two-factor authentication on your account helps protect against unauthorized access to your account and packages.\n\nTo enable, configure, and disable two-factor authentication from the command line, see \"[Configuring two-factor authentication](/configuring-two-factor-authentication#configuring-2fa-from-the-command-line)\".\n"},{"id":"879330bc-8716-51b1-90d1-adfab2561ce9","frontmatter":{"title":"Requesting an export of your personal data"},"rawBody":"---\ntitle: Requesting an export of your personal data\nedit_on_github: false\n---\n\nYou can export and review the metadata that npm stores about your personal account. The export is an archive containing the following information.\n\n1. Your personal details such as username, email address, full name, linked Twitter / GitHub accounts, masked Personal Access Tokens (PAT) and the organisations that you are a member of.\n2. Metadata of all the packages that you have access to.\n3. Each individual version of packages that you have published to npm.\n\n## How to request an export\n\n1. Navigate to [npm support form](https://www.npmjs.com/support)\n2. Select \"Account and Billing issues\" category\n3. Select \"Data export request\" sub-category\n\n<Screenshot src=\"/getting-started/managing-your-npm-user-account/requesting-your-data.png\" alt=\"Screenshot showing the option to select a DSR export request from the support form.\" />\n\n4. Fill in the details and submit the form\n\n## Retrieving the exported data\nAfter a request is placed our support team will review it and initiate an export on your behalf. Once the export process is complete you will receive an email with a link to an archive of your personal data. You must be authenticated to npmjs.com to download this archive.\n\nThe download link will be available for 7 days, after which the exported data and the link is purged.\n"},{"id":"7cc320ea-bfc9-518f-812a-45547039cc5f","frontmatter":{"title":"Downgrading to a free user account plan"},"rawBody":"---\ntitle: Downgrading to a free user account plan\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nIf you have a paid user account, but no longer need private packages, you can downgrade your paid organization to a free organization. When you downgrade from a paid to a free organization, you will lose the ability to install and publish private packages at the end of your last paid billing cycle. Your private packages will _not_ be made publicly visible when you downgrade to a free plan.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['billing-downgrade-selection'].text}</>\n\n   <>{shared['billing-downgrade-selection'].image}</>\n\n4. <>{shared['billing-downgrade-confirm'].text}</>\n\n   <>{shared['billing-downgrade-confirm'].image}</>\n"},{"id":"6c308500-2421-504c-95c4-32388d387e13","frontmatter":{"title":"Paying for your npm user account"},"rawBody":"---\ntitle: Paying for your npm user account\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"f4c7df46-ea19-5170-aa87-9739c39c6d49","frontmatter":{"title":"Updating user account billing settings"},"rawBody":"---\ntitle: Updating user account billing settings\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nYou can update the credit card used to pay for your paid user account plan. Updating your credit card will not change your billing cycle date, and the new credit card will be charged on the next billing cycle.\n\n<><strong>Note:</strong> If the credit card used to pay for your paid user account plan expires, or we are otherwise are unable to charge your card, you have a grace period of {shared['grace-period'].text} to update the card.</>\n\n## Updating credit card information\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['payment-info'].text}</>\n\n   <>{shared['payment-info'].image}</>\n\n4. <>{shared['billing-form'].text}</>\n\n   <>{shared['billing-form'].image}</>\n\n5. <>{shared['payment-info-button'].text}</>\n\n   <>{shared['payment-info-button'].image}</>\n\n6. <>{shared['billing-creditcard-form'].text}</>\n\n   <>{shared['billing-creditcard-form'].image}</>\n\n7. <>{shared['payment-remember-me'].text}</>\n\n   <>{shared['payment-remember-me'].image}</>\n\n8. <>{shared['billing-update-card'].text}</>\n\n   <>{shared['billing-update-card'].image}</>\n\n## Updating billing receipt email and extra receipt information\n\nYou can update the email address used for receipts, and add extra information to the receipt for your paid user account plan, such as your business name, VAT identification number, or address of record. Updated billing information will appear on all receipts immediately.\n\n<Note>\n\n**Note:** The billing email is used for receipts only and is not required to match the email address of the person whose card is used to pay for the paid user account plan.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n4. <>{shared['billing-receipt-settings'].text}</>\n\n   <>{shared['billing-receipt-settings'].image}</>\n\n5. <>{shared['billing-extra-info'].text}</>\n\n   <>{shared['billing-extra-info'].image}</>\n\n6. <>{shared['billing-extra-receipt-email'].text}</>\n\n   <>{shared['billing-extra-receipt-email'].image}</>\n\n7. <>{shared['billing-extra-save'].text}</>\n\n   <>{shared['billing-extra-save'].image}</>\n\n"},{"id":"13c754b6-7b70-529c-a1a8-c540b1ef50bb","frontmatter":{"title":"Upgrading to a paid user account plan"},"rawBody":"---\ntitle: Upgrading to a paid user account plan\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nIf you need to install and publish private packages, you can upgrade to a paid user account plan. Our paid user account plan costs $7 per month. For more information, see the \"npm account\" column on our [pricing page](https://www.npmjs.com/pricing).\n\nYour paid plan and billing cycle will start when you submit your credit card information, and you will be charged for the first month immediately.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. Under \"change plan\", click **Upgrade Plan ($7/User)**.\n\n   <Screenshot src=\"/getting-started/paying-for-your-npm-user-account/change-plan.png\" alt=\"Screenshot of the change payment plan button\" />\n\n4. Under \"Want to upgrade?\", click **Enable Private Publishing for $7/mo**.\n\n   <Screenshot src=\"/getting-started/paying-for-your-npm-user-account/enable-private-publishing.png\" alt=\"Screenshot showing the enable private publishing button\" />\n\n5. <>{shared['billing-form'].text}</>\n\n   <>{shared['billing-form'].image}</>\n\n6. <>{shared['payment-info-button'].text}</>\n\n   <>{shared['payment-info-button'].image}</>\n\n7. <>{shared['billing-creditcard-form'].text}</>\n\n   <Screenshot src=\"/getting-started/paying-for-your-npm-user-account/billing-upgrade-form.png\" alt=\"Screenshot of the payment form\" />\n\n8. <>{shared['payment-remember-me'].text}</>\n\n   <>{shared['payment-remember-me'].image}</>\n\n9. Click **Pay $7.00**.\n\n  <Screenshot src=\"/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png\" alt=\"Screenshot of the payment confirmation button\" />\n\n"},{"id":"77f08661-8284-5820-9d8a-aa0bff904c38","frontmatter":{"title":"Viewing, downloading, and emailing receipts for your npm user account"},"rawBody":"---\ntitle: Viewing, downloading, and emailing receipts for your npm user account\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nYou can view, download, and email receipts for the complete billing history of your npm user account.\n\n## Viewing receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n4. <>{shared['billing-view'].text}</>\n\n   <>{shared['billing-view'].image}</>\n\n## Downloading receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n4. <>{shared['billing-download'].text}</>\n\n   <>{shared['billing-download'].image}</>\n\n5. <>{shared['billing-download-checked'].text}</>\n\n   <>{shared['billing-download-checked'].image}</>\n\n## Emailing receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['billing-info'].text}</>\n\n   <>{shared['billing-info'].image}</>\n\n3. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n4. <>{shared['billing-email'].text}</>\n\n   <>{shared['billing-email'].image}</>\n\n5. <>{shared['billing-email-checked'].text}</>\n\n   <>{shared['billing-email-checked'].image}</>\n\n6. <>{shared['billing-email-receipt'].text}</>\n\n   <>{shared['billing-email-receipt'].image}</>\n\n7. Click **Send**.\n"},{"id":"5cd676bc-96f5-503a-9801-5c4f47c906d9","frontmatter":{"title":"About two-factor authentication"},"rawBody":"---\ntitle: About two-factor authentication\nredirect_from: [ /getting-started/using-two-factor-authentication ]\n---\n\n[Two-factor authentication (2FA)][2fa] protects against unauthorized access to your account by confirming your identity using:\n\n* Something you know (e.g., a password).\n* Something you have (e.g., an ID badge or a cryptographic key).\n* Something you are (e.g., a fingerprint or other biometric data).\n\n<Note>\n\n**Note**: The security-key flow using [WebAuthn][webauthn] is currently in beta.\n\n</Note>\n\nWhen you enable 2FA, you will be prompted for a second form of authentication before performing certain actions on your account or packages to which you have write access. Depending on your 2FA configuration you will be either prompted to authenticate with a [security-key][webauthn] or a [time-based one-time password (TOTP)][totp]. \n\n* The security-key flow allows you to use biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id] or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis] or [Feitian][feitian] as your 2FA.\n* To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.\n\n\n<Note>\n\n**Note:** Two-factor authentication provides the best possible security for your account against attackers. We strongly recommend enabling 2FA on your account as soon as possible after you sign up.\n\n</Note>\n\n## Two-factor authentication on npm\n\nTwo-factor authentication on npm can be enabled for authorization and writes, or authorization only.\n\n### Authorization and writes\n\nBy default, 2FA is enabled for authorization and writes. We will request a second form of authentication for certain authorized actions, as well as write actions.\n\n| Action                                            | CLI command                                            |\n| :------------------------------------------------ | :----------------------------------------------------- |\n| Log in to npm                                     | [`npm login`][login]                                   |\n| Change profile settings (including your password) | [`npm profile set`][profile-set]                       |\n| Change 2FA modes for your user account            | [`npm profile enable-2fa auth-and-writes`][2fa-enable] |\n| Disable 2FA for your user account                 | [`npm profile disable-2fa`][2fa-disable]               |\n| Create tokens                                     | [`npm token create`][token-create]                     |\n| Revoke tokens                                     | [`npm token revoke`][token-revoke]                     |\n| Publish packages                                  | [`npm publish`][publish]                               |\n| Unpublish packages                                | [`npm unpublish`][unpublish]                           |\n| Deprecate packages                                | [`npm deprecate`][deprecate]                           |\n| Change package visibility                         | [`npm access public/restricted`][access]               |\n| Change user and team package access               | [`npm access grant/revoke`][access]                    |\n| [Change package 2FA requirements][pkg-2fa]        | [`npm access 2fa-required/2fa-not-required`][access]   |\n\n### Authorization only\n\nIf you enable 2FA for authorization only. We will request a second form of authentication only for certain authorized actions.\n\n| Action                                            | CLI command                                       |\n| :------------------------------------------------ | :------------------------------------------------ |\n| Log in to npm                                     | [`npm login`][login]                              |\n| Change profile settings (including your password) | [`npm profile set`][profile-set]                  |\n| Change 2FA modes for your user account            | [`npm profile enable-2fa auth-only`][2fa-enable]  |\n| Disable 2FA for your user account                 | [`npm profile disable-2fa`][2fa-disable]          |\n| Create tokens                                     | [`npm token create`][token-create]                |\n| Revoke tokens                                     | [`npm token revoke`][token-revoke]                |\n\n[login]: https://docs.npmjs.com/cli/adduser\n[profile-set]: https://docs.npmjs.com/cli/profile\n[2fa-enable]: https://docs.npmjs.com/cli/profile\n[2fa-disable]: https://docs.npmjs.com/cli/profile\n[token-create]: https://docs.npmjs.com/cli/token\n[token-revoke]: https://docs.npmjs.com/cli/token\n[publish]: https://docs.npmjs.com/cli/publish\n[unpublish]: https://docs.npmjs.com/cli/unpublish\n[deprecate]: https://docs.npmjs.com/cli/deprecate\n[access]: https://docs.npmjs.com/cli/access\n[pkg-2fa]: /requiring-2fa-for-package-publishing-and-settings-modification\n[authy]: https://authy.com/download/\n[google-authenticator]: https://support.google.com/accounts/answer/1066447\n[microsoft-authenticator]: https://www.microsoft.com/security/mobile-authenticator-app\n[webauthn]: https://webauthn.guide/\n[can-i-use]: https://caniuse.com/#search=webauthn\n[u2f]: https://en.wikipedia.org/wiki/Universal_2nd_Factor\n[windows-hello]: https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0\n[touch-id]: https://support.apple.com/en-gb/HT204587\n[face-id]: https://support.apple.com/en-us/HT208108\n[yubikey]: https://www.yubico.com/\n[thetis]: https://thetis.io/\n[feitian]: https://www.ftsafe.com/\n[totp]: https://en.wikipedia.org/wiki/Time-based_one-time_password\n[2fa]: https://en.wikipedia.org/wiki/Multi-factor_authentication\n"},{"id":"c4bca38c-d340-5acd-9402-f7c58585f070","frontmatter":{"title":"Accessing npm using two-factor authentication"},"rawBody":"---\ntitle: Accessing npm using two-factor authentication\nredirect_from: [ /getting-started/using-two-factor-authentication ]\n---\nimport shared from '../../../src/shared.js'\n\n## Sign in from the command line using security-key flow\n\n1. On the command line, type the [`npm login`][login] command.\n\n2. When prompted, provide your username, password, and email address.\n\n   ```\n   user@host:~$ npm login\n   npm notice Log in on https://registry.npmjs.org/\n   Username: mona\n   Password:\n   Email: (this IS public) mona@github.com\n   npm notice Open https://www.npmjs.com/login/913c3ab1-89a0-44bd-be8d-d946e2e906f0 to use your security key for authentication or enter OTP from your authenticator app\n   ```\n\n3. If you have configured a security-key, open the provided URL shown in the command line. Alternatively, if you have configured a mobile authenticator skip to step 6.\n\n4. Click on *Use security key* and follow the browser specific steps to authenticate.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png\" alt=\"Screenshot showing security key prompt\" />\n\n5. Copy the generated token\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/webauthn-cli-login-token.png\" alt=\"Screenshot showing a sample token generated while using WebAuthn for cli login\" />\n\n6. Enter the one-time password into the CLI prompt.\n\n   <Prompt>Enter one-time password:</Prompt>\n\n## Sign in from the command line using `--auth-type=web`\n\nnpm 8.14.0 and higher support login flow through the browers. This will become the default behavior for the npm public registry in npm 9.\n\n### With an existing browser session\n\n1. On the command line, type the [`npm login --auth-type=web`][login] command.\n\n2. When prompted hit \"ENTER\" to open your browser to start the login flow or click the provided URL show in the command line.\n\n  ```\n  user@host:~$ npm login\n  npm notice Log in on https://registry.npmjs.org/\n  Authenticate your account at:\n  https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922\n  Press ENTER to open in the browser...\n  ```\n\n3. Click on *Use security key*  and follow the browser specific steps to authenticate.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png\" alt=\"Screenshot showing security key prompt\" />\n\n   _Note: If you have configured to use TOTP, you will see an TOTP prompt instead_\n\n### Without an existing browser session\n\n1. On the command line, type the [`npm login --auth-type=web`][login] command.\n\n2. When prompted hit \"ENTER\" to open your browser to start the login flow or click the provided URL show in the command line.\n\n  ```\n  user@host:~$ npm login\n  npm notice Log in on https://registry.npmjs.org/\n  Authenticate your account at:\n  https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922\n  Press ENTER to open in the browser...\n  ```\n\n3. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n4. Click on *Use security key*  and follow the browser specific steps to authenticate.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png\" alt=\"Screenshot showing security key prompt\" />\n\n   _Note: If you have configured to use TOTP, you will see an TOTP prompt instead_\n\n[login]: https://docs.npmjs.com/cli/adduser "},{"id":"d5a9a1bb-509b-5d30-8793-2167b550a5b7","frontmatter":{"title":"Configuring two-factor authentication"},"rawBody":"---\ntitle: Configuring two-factor authentication\n---\nimport shared from '../../../src/shared.js'\n\nYou can enable two-factor authentication (2FA) on your npm user account to protect against unauthorized access to your account and packages, either by using a [security-key][webauthn] or [time-based one-time password (TOTP)][totp] from a mobile app.\n\n<Note>\n\n**Note**: The security-key flow using [WebAuthn][webauthn] is currently in beta.\n\n</Note>\n\n## Prerequisites\n\nBefore you enable 2FA on your npm user account, you must:\n\n* Update your npm client to version 5.5.1 or higher.\n* To configure a security-key requires a modern browser that support [WebAuthn][can-i-use]. This will allow you to configure a biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id], or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis], or [Feitian][feitian].\n* To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.\n\nFor more information on supported 2FA methods, see \"[About two-factor authentication][about-two-factor-authentication]\".\n\n\n<Note>\n\n**Note:** npm does not accept SMS (text-to-phone) as a 2FA method.\n\n</Note>\n\n## Configuring 2FA from the website\n\n### Enabling 2FA\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. On the account settings page, under \"Two-Factor Authentication\", click **Enable 2FA**.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-enable.png\" alt=\"Screenshot showing Enable 2FA button\" />\n\n4. When prompted provide your current account password and then click **Confirm password to continue**.\n\n5. On the 2FA method page, select the method you would like to enable and click **Continue**. For more information on supported 2FA methods, see \"[About two-factor authentication][about-two-factor-authentication]\".\n\n  <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/device-selection.png\" alt=\"Screenshot showing 2FA types\" />\n\n6. Configure the 2FA method of your choice:\n\n  * When using a **security-key**, provide a name for it and click **Add security key**. Follow the browser specific steps to add your security-key.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-add-security-key.png\" alt=\"Screenshot showing security key setup\" />\n\n   Below is an example of configuration from Microsoft Edge running on a MacOS\n   \n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/touch-id-mac-edge.png\" alt=\"Screenshot showing 2FA device selection\" />\n\n  * When using an **authenticator application** on your phone, open it and scan the QR code on the two-step verification page. Enter the code generated by the app, then click **Verify**.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-verify.png\" alt=\"Screenshot showing 2FA device selection\" />\n\n7. On the recovery code page, copy the recovery codes to your computer or other safe location that is not your second factor device. We recommend using a password manager.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/recovery-code.png\" alt=\"Screenshot showing the Recovery Code page\" />\n\n\n   _Recovery codes are the only way to recover your account if you lose access to your second factor device. Each code can be used only once. You can [view and regenerate your recovery code][viewing-and-regenerating-recovery-code] from your 2FA settings page._\n\n8. Click **Go back to settings** after confirming that you have saved your codes.\n\n### Disabling 2FA for writes \n\nCheck the [Authorization and writes][authorization-and-writes] section for more information on different operations that requires 2FA when this mode is enabled.\n\n<Note>\n\n**Note**: As a recommended setting, 2FA for write operations are _automatically enabled_ when setting up 2FA. The following steps explain how to disable it. \n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. On the account settings page, under \"Two-Factor Authentication\", click **Modify 2FA**.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-modify.png\" alt=\"Screenshot showing Modify 2FA button\" />\n\n4. From the \"Manage Two-Factor Authentication\" navigate to \"Additional Options\" section\n5. Clear the checkbox for \"Require two-factor authentication for write actions\" and click \"Update Preferences\"\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/disable-2fa-button.png\" alt=\"Screenshot showing a cleared check box to disable 2fa under Addition options\" />\n\n### Disabling 2FA\n\nIf you have 2FA enabled, you can remove it from your account settings page.\n\n<Note>\n\n**Note:** You cannot remove 2FA if you are a member of an organization that enforces 2FA. You can view the list of organizations memberships from your profile page under the \"Organizations\" tab.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. On the account settings page, under \"Two-Factor Authentication\", click **Modify 2FA**.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-modify.png\" alt=\"Screenshot showing Modify 2FA button\" />\n\n4. Scroll to the bottom of the \"Manage Two-Factor Authentication\" page and click Disable 2FA.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-disable.png\" alt=\"Screenshot showing Disable 2FA button\" />\n\n5. Agree to the prompt from the browser.\n\n## Configuring 2FA from the command line\n\n### Enabling 2FA from the command line\n\nAlthough security-key with WebAuthn can be used for authentication from both the web and the command line, it can only be configured from the web. When enabling 2FA from the command line, currently the only available option is to use an TOTP mobile app.\n\n<Note>\n\n**Note:** Settings you configure on the command line will also apply to your profile settings on the npm website.\n\n</Note>\n\n1. If you are logged out on the command line, log in using `npm login` command.\n\n2. On the command line, type the [`npm profile`](/cli/profile) command along with the option for the 2FA mode you want to enable:\n   * To enable 2FA for authorization and writes, type:<br/>\n      ```\n      npm profile enable-2fa auth-and-writes\n      \n      ```\n   * To enable 2FA for authorization only, type:<br/>\n   \n      ```\n      npm profile enable-2fa auth-only\n      ```\n\n3. To add npm to your authenticator application, using the device with the app, you can either:\n   * Scan the QR code displayed on the command line.\n   * Type the number displayed below the QR code.\n\n4. When prompted to add an OTP code from your authenticator, on the command line, enter a one-time password generated by your authenticator app.\n\n### Sending a one-time password from the command line\n\nIf you have enabled 2FA auth-and-writes, you will need to send the TOTP from the command line for certain commands to work. To do this, append  `--otp=123456` (where *123456* is the code generated by your authenticator) at the end of the command. Here are a few examples:\n\n```\nnpm publish [<tarball>|<folder>][--tag <tag>] --otp=123456\nnpm owner add <user > --otp=123456\nnpm owner rm <user> --otp=123456\nnpm dist-tags add <pkg>@<version> [<tag>] --otp=123456\nnpm access edit [<package>) --otp=123456\nnpm unpublish [<@scope>/]<pkg>[@<version>] --otp=123456\n```\n\n### Removing 2FA from the command line\n\n1. If you are logged out on the command line, log in using `npm login` command.\n\n2. On the command line, type the following command:\n\n   ```\n   npm profile disable-2fa\n   ```\n\n3. When prompted, enter your npm password:\n\n   <Prompt>npm password:</Prompt>\n\n4. When prompted for a one-time password, enter a password from your authenticator app:\n\n   <Prompt>Enter one-time password from your authenticator: <PromptReply>123456</PromptReply></Prompt>\n\n## Resolving TOTP errors\n\nIf you are entering what seems to be a valid [TOTP][totp] but you see an error, be sure that you are using the correct authenticator account. If you have multiple authenticator accounts, using an TOTP from the wrong account will cause an error.\n\nAlso, when you reset two-factor authentication after it has been disabled, the authenticator might create a second account with the same name. Please see the authenticator documentation to delete the old account.\n\n[about-two-factor-authentication]: /about-two-factor-authentication\n[authorization-and-writes]: /about-two-factor-authentication#authorization-and-writes\n[login]: https://docs.npmjs.com/cli/adduser\n[recovering-your-2fa-enabled-account]: /recovering-your-2fa-enabled-account\n[can-i-use]: https://caniuse.com/#search=webauthn\n[viewing-and-regenerating-recovery-code]: /recovering-your-2fa-enabled-account#viewing-and-regenerating-recovery-code\n[totp]: https://en.wikipedia.org/wiki/Time-based_one-time_password\n[authy]: https://authy.com/download/\n[google-authenticator]: https://support.google.com/accounts/answer/1066447\n[microsoft-authenticator]: https://www.microsoft.com/security/mobile-authenticator-app\n[webauthn]: https://webauthn.guide/\n[u2f]: https://en.wikipedia.org/wiki/Universal_2nd_Factor\n[windows-hello]: https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0\n[touch-id]: https://support.apple.com/en-gb/HT204587\n[face-id]: https://support.apple.com/en-us/HT208108\n[yubikey]: https://www.yubico.com/\n[thetis]: https://thetis.io/\n[feitian]: https://www.ftsafe.com/"},{"id":"e0e794c3-ad30-5e3a-98b1-0b4611178d1c","frontmatter":{"title":"Creating a new user account on the public registry"},"rawBody":"---\ntitle: Creating a new user account on the public registry\n---\n\nIf you do not already have an npm user account, you can create an account in order to share and download Javascript packages on the public registry.\n\n## Creating an account on the website\n\n1. Go to the [npm signup page](https://www.npmjs.com/signup)\n\n2. In the user signup form, type in the fields:\n   - **Username:** The username that will be displayed when you publish packages or interact with other npm users on npmjs.com. Your username must be lower case, and can contain hyphens and numerals.\n   - **Email address:** Your public email address will be added to the metadata of your packages and will be visible to anyone who downloads your packages. We will also send email to this account when you update packages, as well as occasional product updates and information.\n   - **Password**: Your password must meet [our password guidelines](creating-a-strong-password).\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/signup-form.png\" alt=\"Screenshot of the signup form\" />\n\n3. Read the [End User License Agreement](https://www.npmjs.com/policies/terms) and [Privacy Policy](https://www.npmjs.com/policies/privacy), and indicate that you agree to them.\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/privacy-policy.png\" alt=\"Screenshot of the privacy policy\" />\n\n4. Click **Create An Account**.\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/create-account-button.png\" alt=\"Screenshot of the create account button\" />\n\n<Note>\n\n**Note:** After signing up for an npm account, you will receive an account verification email. You must verify your email address in order to publish packages to the registry.\n\n</Note>\n\n## Testing your new account with npm login\n\nUse the <a href=\"https://docs.npmjs.com/cli/adduser\">`npm login`</a> command to test logging in to your new account.\n\n<Note>\n\n**Note:** If you misspell your existing account username when you log in with the `npm login` command, you will create a new account with the misspelled name. For help with accidentally-created accounts, <a href=\"https://www.npmjs.com/support\">contact npm Support</a>.\n\n</Note>\n\n1. On the command line, type the following command:\n\n    ```\n    npm login\n    ```\n\n2. When prompted, enter your username, password, and email address.\n3. If you have [two-factor authentication](about-two-factor-authentication) enabled, when prompted, enter a one-time password.\n4. To test that you have successfully logged in, type:\n\n    ```\n    npm whoami\n    ```\n\n    Your npm username should be displayed.\n\n"},{"id":"d4778273-0d95-5d86-a2ef-432443c2a492","frontmatter":{"title":"Creating a strong password"},"rawBody":"---\ntitle: Creating a strong password\n---\n\nSecure your npm account with a strong and unique password using a password manager.\n\nYou must choose or generate a password for your npm account that:\n\n* is longer than 10 characters\n* does not match or significantly contain your username, e.g. do not use 'username123'\n* is not a [commonly used password](https://www.npmjs.com/signup/common-passwords)\n* has not been compromised and known to the [Have I Been Pwned](https://haveibeenpwned.com/) breach database\n\nTo keep your account secure, we recommend you follow these best practices:\n\n* Use a password manager, such as [LastPass](https://lastpass.com/) or [1Password](https://1password.com/), to generate a password more than 16 characters.\n* Generate a unique password for npm. If you use your npm password elsewhere and that service is compromised, then attackers or other malicious actors could use that information to access your npm account.\n* Configure two-factor authentication for your account. For more information, see \"About two-factor authentication.\"\n* Never share your password, even with a potential collaborator. Each person should use their own personal account on npm. For more information on ways to collaborate, see: \"[npm organizations](/organizations)\".\n\nWhen you type a password to sign in, create an account, or change your password, npm will check if the password you entered is considered weak according to datasets like HaveIBeenPwned. The password may be identified as weak even if you have never used that password before.\n\nnpm only inspects the password at the time you type it, and never stores the password you entered in plaintext. For more information, see [HaveIBeenPwned](https://haveibeenpwned.com/).\n"},{"id":"84f0a524-25f4-5345-bc50-a418eb566be7","frontmatter":{"title":"Setting up your npm user account"},"rawBody":"---\ntitle: Setting up your npm user account\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"d83880fa-6495-5619-86a4-d9fef92c07e0","frontmatter":{"title":"Receiving a one-time password over email"},"rawBody":"---\ntitle: Receiving a one-time password over email\n---\nimport shared from '../../../src/shared.js'\n\nFor your security, npm may require additional verification to allow you to log in to your account.  If you do not have [two-factor authentication](configuring-two-factor-authentication) enabled, you may be asked to verify yourself with a one-time password sent to the email address configured for your account.\n\n## Logging in with a one-time password\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. You'll be prompted for a one-time password that was sent to your email.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/one-time-password-email.png\" alt=\"Screenshot showing one-time password request\" />\n\n3. Check your email account for an email from npm containing your one-time password (the subject will begin \"OTP for logging in to your account\").\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/email-otp-code.png\" alt=\"Screenshot showing OTP code in email\" />\n\n4. Enter the digits from your email in your one-time password field.\n\n## Enabling two-factor authentication\n\nTo avoid this additional login step, with a one-time password sent to you via e-mail, you can configure [two-factor authentication with a device](/configuring-two-factor-authentication) (2FA) instead.\n"},{"id":"19a60933-a190-5116-9334-a0093ff6349c","frontmatter":{"title":"Recovering your 2FA-enabled account"},"rawBody":"---\ntitle: Recovering your 2FA-enabled account\n---\nimport shared from '../../../src/shared.js'\n\nWhen you have two-factor access enabled on your account, and you lose access to your 2FA device, you may be able to recover your account using the following methods.\n\n## Misplaced second factor device\nIf you have misplaced the device that provided second-factor authentication, you can use the recovery codes generated when you [enabled 2FA][setup-recovery-codes] to access your account.\n\n### Using recovery code on the web\n1. Locate the recovery codes generated that you have saved.\n\n2. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n3. Click on \"Use recovery code\" from the next screen\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/recovery-code-link.png\" alt=\"Screenshot showing Security Key prompt with a link to navigate to the recovery code input screen\" />\n\n   _Note: If you have configured to use TOTP, you will see an TOTP prompt instead_\n\n4. Enter an unused recovery code in the \"Use a Recovery Code\" prompt\n\n    <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/user-a-recovery-code.png\" alt=\"Screenshot showing use a recovery code prompt with an input box to enter the recovery code\" />\n\n5. You are now logged into npm.\n\n5. Follow the steps mentioned in \"[Removing 2FA on the web][removing-2fa-on-the-web]\" to disable 2FA\n\n### Using recovery code from the command line\n\n1. Locate the recovery codes generated when you enabled 2FA on your account.\n\n2. If you are logged out on the command line, log in using `npm login` command with your username and npm password.\n\n5. Enter an unused recovery code when you see this prompt:\n\n   <Prompt>Enter one-time password:</Prompt>\n\n4. Once you are logged in, use the below and enter your npm password if prompted.  \n\n   ```\n   npm profile disable-2fa\n   ```\n\n5. Enter another unused recovery code when you see this prompt:\n\n   <Prompt>Enter one-time password:</Prompt>\n\n5. npm will confirm that two-factor authentication has been disabled.\n\n6. Follow the steps outlined in \"[Configuring two-factor authentication][configuring-two-factor-authentication]\" to re-enable 2FA and generate new recovery codes.\n\n<Note>\n\n**Note:** Using the recovery codes to re-enable 2FA may create a new authenticator account with the same npm account name.\n\nIf you are using a [time-based one-time password (TOTP)][totp] mobile app and want to delete the old authenticator account, follow the steps for the authenticator.\n\n</Note>\n\n## Viewing and regenerating recovery code\n\n<Note>\n\n**Note:**  Once you regenerate a set of code, all previous recovery codes become invalid. Each code can be used only once.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. On the account settings page, under \"Two-Factor Authentication\", click **Modify 2FA**.\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/2fa-modify.png\" alt=\"Screenshot showing Modify 2FA button\" />\n\n4. Click \"Manage Recovery Codes'' to view your recovery codes\n\n   <Screenshot src=\"/getting-started/setting-up-your-npm-user-account/view-recovery-codes.png\" alt=\"Screenshot showing existing recovery codes and a button to generate set of recovery codes\" />\n\n5. Click \"Regenerate Code\" to generate a new set of codes.\n\n## Misplaced recovery codes\n\nIf you have misplaced both the device that provided second-factor authentication and your recovery codes, we may be unable to help you recover your account. If you have any questions, please [contact npm Support][contact-support].\n\n[contact-support]: https://www.npmjs.com/support\n[configuring-two-factor-authentication]: /configuring-two-factor-authentication\n[setup-recovery-codes]: /configuring-two-factor-authentication#enabling-2fa-on-the-web\n[removing-2fa-on-the-web]: /configuring-two-factor-authentication#removing-2fa-on-the-web\n[using-recovery-code-on-the-web]: /recovering-your-2fa-enabled-account#using-recovery-code-on-the-web\n[viewing-and-regenerating-recovery-code]: #viewing-and-regenerating-recovery-code\n[totp]: https://en.wikipedia.org/wiki/Time-based_one-time_password\n"},{"id":"bf88e123-0fc5-597b-8001-0c977af5a301","frontmatter":{"title":"Common errors"},"rawBody":"---\ntitle: Common errors\nredirect_from:\n  - /troubleshooting/if-your-npm-is-broken\n  - /troubleshooting/try-clearing-the-npm-cache\n  - /troubleshooting/common-errors\n---\n\n## Errors\n\n- [Broken npm installation](#broken-npm-installation)\n- [Random errors](#random-errors)\n- [No compatible version found](#no-compatible-version-found)\n- [Permissions errors](#permissions-errors)\n- [`Error: ENOENT, stat 'C:\\Users\\<user>\\AppData\\Roaming\\npm'` on Windows 7](#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7)\n- [No space](#no-space)\n- [No git](#no-git)\n- [Running a Vagrant box on Windows fails due to path length issues](#running-a-vagrant-box-on-windows-fails-due-to-path-length-issues)\n- [npm only uses `git:` and `ssh+git:` URLs for GitHub repos, breaking proxies](#npm-only-uses-git-and-sshgit-urls-for-github-repos-breaking-proxies)\n- [SSL error](#ssl-error)\n- [SSL-intercepting proxy](#ssl-intercepting-proxy)\n- [Not found / Server error](#not-found--server-error)\n- [Invalid JSON](#invalid-json)\n- [Many `ENOENT` / `ENOTEMPTY` errors in output](#many-enoent--enotempty-errors-in-output)\n- [`cb() never called!` when using shrinkwrapped dependencies](#cb-never-called-when-using-shrinkwrapped-dependencies)\n- [npm login errors](#npm-login-errors)\n- [`npm` hangs on Windows at `addRemoteTarball`](#npm-hangs-on-windows-at-addremotetarball)\n- [npm not running the latest version on a Windows machine](#npm-not-running-the-latest-version-on-a-windows-machine)\n\n## Broken npm installation\n\nIf your npm is broken:\n\n- On Mac or Linux, [reinstall npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).\n- Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see [this note about installing the latest stable version](try-the-latest-stable-version-of-npm#upgrading-on-windows)).\n\n## Random errors\n\n* Some strange issues can be resolved by simply running `npm cache clean` and trying again.\n* If you are having trouble with `npm install`, use the `-verbose` option to see more details.\n\n## No compatible version found\n\nYou have an outdated npm. [Please update to the latest stable npm](try-the-latest-stable-version-of-npm).\n\n## Permissions errors\n\nPlease see the discussions in \"[Downloading and installing Node.js and npm](downloading-and-installing-node-js-and-npm)\" and \"[Resolving EACCES permissions errors when installing packages globally](resolving-eacces-permissions-errors-when-installing-packages-globally)\" for ways to avoid and resolve permissions errors.\n\n## `Error: ENOENT, stat 'C:\\Users\\<user>\\AppData\\Roaming\\npm'` on Windows 7\n\nThe error `Error: ENOENT, stat 'C:\\Users\\<user>\\AppData\\Roaming\\npm'` on Windows 7 is a consequence of [joyent/node#8141](https://github.com/joyent/node/issues/8141), and is an issue with the Node installer for Windows. The workaround is to ensure that `C:\\Users\\<user>\\AppData\\Roaming\\npm` exists and is writable with your normal user account.\n\n## No space\n\n```\nnpm ERR! Error: ENOSPC, write\n```\n\nYou are trying to install on a drive that either has no space, or has no permission to write.\n\n* Free some disk space or\n* Set the tmp folder somewhere with more space: `npm config set tmp /path/to/big/drive/tmp` or\n* Build Node yourself and install it somewhere writable with lots of space.\n\n## No git\n\n```\nnpm ERR! not found: git\nENOGIT\n```\n\nYou need to [install git](http://git-scm.com/book/en/Getting-Started-Installing-Git). Or, you may need to add your git information to your npm profile. You can do this from the command line or the website. For more information, see \"[Managing your profile settings](managing-your-profile-settings)\".\n\n## Running a Vagrant box on Windows fails due to path length issues\n\n**[@drmyersii](https://github.com/drmyersii)** went through what sounds like a lot of painful trial and error to come up with a working solution involving Windows long paths and some custom Vagrant configuration:\n\n> [This is the commit that I implemented it in](https://github.com/renobit/vagrant-node-env/commit/bdf15f2f301e2b1660b839875e34f172ea8be227), but I'll go ahead and post the main snippet of code here:\n>\n> ```ruby\n> config.vm.provider \"virtualbox\" do |v|\n>     v.customize [\"sharedfolder\", \"add\", :id, \"--name\", \"www\", \"--hostpath\", ((\"//?/\" + File.dirname(__FILE__) + \"/www\").gsub(\"/\",\"\\\\\"))]\n> end\n>\n> config.vm.provision :shell, inline: \"mkdir /home/vagrant/www\"\n> config.vm.provision :shell, inline: \"mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` > www /home/vagrant/www\", run: \"always\"\n> ```\n>\n> In the code above, I am appending ```\\\\?\\``` to the current directory absolute path. This will actually force the Windows API to allow an increase in the MAX_PATH variable (normally capped at 260). Read more about [max path](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath). This is happening during the sharedfolder creation which is intentionally handled by VBoxManage and not Vagrant's \"synced_folder\" method. The last bit is pretty self-explanatory; we create the new shared folder and then make sure it's mounted each time the machine is accessed or touched since Vagrant likes to reload its mounts/shared folders on each load.\n\n## npm only uses `git:` and `ssh+git:` URLs for GitHub repos, breaking proxies\n\n**[@LaurentGoderre](https://github.com/LaurentGoderre)** fixed this with [some Git trickery](https://github.com/npm/npm/issues/5257#issuecomment-60441477):\n\n> I fixed this issue for several of my colleagues by running the following two commands:\n>\n> ```\n> git config --global url.\"https://github.com/\".insteadOf git@github.com:\n> git config --global url.\"https://\".insteadOf git://\n> ```\n>\n> One thing we noticed is that the `.gitconfig` used is not always the one expected so if you are on a machine that modified the home path to a shared drive, you need to ensure that your `.gitconfig` is the same on both your shared drive and in `c:\\users\\[your user]\\`\n\n## SSL Error\n\n```\nnpm ERR! Error: 7684:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\\ssl\\s23_clnt.c:787:\n```\n\nYou are trying to talk SSL to an unencrypted endpoint. More often than not, this is due to a [proxy](/misc/config#proxy) [configuration](/misc/config#https-proxy) [error](/misc/config#cafile) (see also [this helpful, if dated, guide](http://jjasonclark.com/how-to-setup-node-behind-web-proxy)). In this case, you do **not** want to disable `strict-ssl` – you may need to set up a CA / CA file for use with your proxy, but it's much better to take the time to figure that out than disabling SSL protection.\n\n```\nnpm ERR! Error: SSL Error: CERT_UNTRUSTED\n```\n\n```\nnpm ERR! Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE\n```\n\nThis problem will happen if you're running Node 0.6. Please upgrade to node 0.8 or above. [See this post for details](http://blog.npmjs.org/post/71267056460/fastly-manta-loggly-and-couchdb-attachments).\n\nYou could also try these workarounds: `npm config set ca \"\"` or `npm config set strict-ssl false`\n\n```\nnpm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN\n```\n\n[npm no longer supports its self-signed certificates](http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more)\n\nEither:\n\n* upgrade your version of npm `npm install npm -g --ca=\"\"`\n* tell your current version of npm to use known registrars `npm config set ca=\"\"`\n\nIf this does not fix the problem, then you may have an SSL-intercepting proxy.\n(For example, https://github.com/npm/npm/issues/7439#issuecomment-76024878)\n\n## SSL-intercepting proxy\n\nUnsolved. See https://github.com/npm/npm/issues/9282\n\n## Not found / Server error\n\n```\nnpm http 404 https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.0.tgz\nnpm ERR! fetch failed https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.0.tgz\nnpm ERR! Error: 404 Not Found\n```\n\n```\nnpm http 500 https://registry.npmjs.org/phonegap\n```\n\n* It's most likely a temporary npm registry glitch. Check [npm server status](http://status.npmjs.org/) and try again later.\n* If the error persists, perhaps the published package is corrupt. Contact the package owner and have them publish a new version of the package.\n\n## Invalid JSON\n\n```\nError: Invalid JSON\n```\n\n```\nnpm ERR! SyntaxError: Unexpected token <\n```\n\n```\nnpm ERR! registry error parsing json\n```\n\n* Possible temporary npm registry glitch, or corrupted local server cache.\nRun `npm cache clean` and/or try again later.\n* This can be caused by corporate proxies that give HTML\nresponses to `package.json` requests. Check npm's proxy [configuration](/misc/config).\n* Check that it's not a problem with a package you're trying to install\n(e.g. invalid `package.json`).\n\n## Many `ENOENT` / `ENOTEMPTY` errors in output\n\nnpm is written to use resources efficiently on install, and part of this is that it tries to do as many things concurrently as is practical. Sometimes this results in race conditions and other synchronization issues. As of npm 2.0.0, a very large number of these issues were addressed. If you see `ENOENT lstat`, `ENOENT chmod`, `ENOTEMPTY unlink`, or something similar in your log output, try updating npm to the latest version. If the problem persists, look at [npm/npm#6043](https://github.com/npm/npm/issues/6043) and see if somebody has already discussed your issue.\n\n## `cb() never called!` when using shrinkwrapped dependencies\n\nTake a look at [issue #5920](https://github.com/npm/npm/issues/5920). ~~We're working on fixing this one, but it's a fairly subtle race condition and it's taking us a little time. You might try moving your `npm-shrinkwrap.json` file out of the way until we have this fixed.~~ This has been fixed in versions of npm newer than `npm@2.1.5`, so update to `npm@latest`.\n\n## `npm login` errors\n\nSometimes `npm login` fails for no obvious reason.  The first thing to do is to log in at <https://www.npmjs.com/login> and check that your e-mail address on `npmjs.com` matches the\nemail address you are giving to `npm login`.\n\nIf that's not the problem, or if you are seeing the message `\"may not mix password_sha and pbkdf2\"`, then\n\n1. Log in at https://npmjs.com/\n2. Change password at https://npmjs.com/password – you can even \"change\" it to the same password\n3. Clear login-related fields from `~/.npmrc` – e.g., by running `sed -ie '/registry.npmjs.org/d' ~/.npmrc`\n4. `npm login`\n\nand it generally seems to work.\n\nSee <https://github.com/npm/npm/issues/6641#issuecomment-72984009> for the history of this issue.\n\n## `npm` hangs on Windows at `addRemoteTarball`\n\nCheck if you have two temp directories set in your `.npmrc`:\n\n```\n> npm config ls -l\n```\n\nLook for lines defining the `tmp` config variable.  If you find more than one, remove all but one of them.\n\nSee <https://github.com/npm/npm/issues/7590> for more about this unusual problem.\n\n## npm not running the latest version on a Windows machine\n\nSee the section about Windows [here](try-the-latest-stable-version-of-npm).\n"},{"id":"728d2f8c-08fe-5d94-b9ba-f029e904181f","frontmatter":{"title":"Generating and locating npm-debug.log files"},"rawBody":"---\ntitle: Generating and locating npm-debug.log files\nredirect_from:\n  - /generating-and-locating-npm-debug-log-files\n---\nimport shared from '../../../src/shared.js'\n\nWhen a package fails to install or publish, the npm CLI will generate an `npm-debug.log` file. This log file can help you figure out what went wrong.\n\nIf you need to generate a `npm-debug.log` file, you can run one of these commands.\n\nFor installing packages:\n\n```\nnpm install --timing\n```\n\nFor publishing packages:\n\n```\nnpm publish --timing\n```\n\nYou can find the `npm-debug.log` file in your `.npm` directory. To find your `.npm` directory, use `npm config get cache`.\n\nIf you use a CI environment, your logs are likely located elsewhere. For example, in Travis CI, you can find them in the `/home/travis/build` directory.\n"},{"id":"e25ebdc2-c7ef-518e-83b5-624f48c83cf9","frontmatter":{"title":"Troubleshooting"},"rawBody":"---\ntitle: Troubleshooting\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"bf4d8650-4fae-5004-bc1c-10de995e4dbd","frontmatter":{"title":"Try the latest stable version of node"},"rawBody":"---\ntitle: Try the latest stable version of node\nredirect_from:\n  - /troubleshooting/try-the-latest-stable-version-of-node\n---\n\nIf you're experiencing issues while using a version of node which is unsupported or unstable (odd numbered versions e.g. 0.7.x, 0.9.x, 0.11.x), it's very possible your issue will be fixed by simply using the [LTS](https://github.com/nodejs/LTS) version of node.\n\n## See what version of node you're running:\n\n```\nnode -v\n```\n\n### Updating node on Linux\n\nFor some Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version provided by the distribution may lag behind the stable version.  Here are [instructions from NodeSource](https://github.com/nodesource/distributions) on getting the latest node.\n\n### Updating node on Windows\n\nInstall the latest msi from <https://nodejs.org/en/download>\n\n### Updating node on OSX\n\nInstall the latest package from <https://nodejs.org/en/download>\n\nor if you are using [homebrew](http://brew.sh/)\n\n```\nbrew install node\n```\n\n### An easy way to stay up-to-date\n\nNode.js has lots of versions, and its development is very active. As a good practice to manage the various versions, we recommend that you use a version manager for your Node.js installation. There are many great options, here are a few:\n\n+ [NVM](https://github.com/creationix/nvm)\n+ [nodist](https://github.com/marcelklehr/nodist)\n+ [n](https://github.com/tj/n)\n+ [nave](https://github.com/isaacs/nave)\n+ [nodebrew](https://github.com/hokaccha/nodebrew)\n"},{"id":"54c189d4-d5c0-57ce-9dbf-333004affc02","frontmatter":{"title":"Try the latest stable version of npm"},"rawBody":"---\ntitle: Try the latest stable version of npm\nredirect_from:\n  - /troubleshooting/try-the-latest-stable-version-of-npm\n---\n\n## See what version of npm you're running\n\n```\nnpm -v\n```\n\n## Upgrading on `*nix` (OSX, Linux, etc.)\n\n_(You may need to prefix these commands with `sudo`, especially on Linux, or OS X if you installed Node using its default installer.)_\n\nYou can upgrade to the latest version of npm using:\n\n```\nnpm install -g npm@latest\n```\n\n## Upgrading on Windows\n\nBy default, npm is installed alongside node in\n\n`C:\\Program Files (x86)\\nodejs`\n\nnpm's globally installed packages (including, potentially, npm itself) are stored separately in a user-specific directory (which is currently\n\n `C:\\Users\\<username>\\AppData\\Roaming\\npm`).\n\n Because the installer puts\n\n `C:\\Program Files (x86)\\nodejs`  \n\n before\n\n `C:\\Users\\<username>\\AppData\\Roaming\\npm`\n\n on your `PATH`, it will always use the version of npm installed with node instead of the version of npm you installed using `npm -g install npm@<version>`.\n\n To get around this, you can do **one** of the following:\n\n* Option 1: [edit your Windows installation's `PATH`](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them) to put `%appdata%\\npm` before `%ProgramFiles%\\nodejs`.\nRemember that you'll need to restart `cmd.exe` (and potentially restart Windows) when you make changes to `PATH` or how npm is installed.\n\n* Option 2: remove both of\n\t* `%ProgramFiles%\\nodejs\\npm`\n\t* `%ProgramFiles%\\nodejs\\npm.cmd`\n\n* Option 3: Navigate to `%ProgramFiles%\\nodejs\\node_modules\\npm` and copy the `npmrc`file to another folder or the desktop.\nThen open `cmd.exe` as an administrator and run the following commands:\n```bash\ncd %ProgramFiles%\\nodejs\nnpm install npm@latest\n```\n\nIf you installed npm with the node.js installer, after doing one of the previous steps, do the following.\n\n* Option 1 or 2\n    * Go into `%ProgramFiles%\\nodejs\\node_modules\\npm` and copy the file named `npmrc` in the new npm folder, which should be `%appdata%\\npm\\node_modules\\npm`. This will tell the new npm where the global installed packages are.\n\n* Option 3\n    * Copy the npmrc file back into `%ProgramFiles%\\nodejs\\node_modules\\npm`\n\n*(See also the [point below](https://docs.npmjs.com/common-errors#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7) if you're running Windows 7 and don't have the directory `%appdata%\\npm`.)*\n\n### A brief note on the built-in Windows configuration\n\nThe Node installer installs, directly into the npm folder, a special piece of Windows-specific configuration that tells npm where to install global packages. When npm is used to install itself, it is supposed to copy this special `builtin` configuration into the new install. There was a bug in some versions of npm that kept this from working, so you may need to go in and fix that up by hand. Run the following command to see where npm will  install global packages to verify it is correct.\n\n```\nnpm config get prefix -g\n```\n\nIf it isn't set to `<X>:\\Users\\<user>\\AppData\\Roaming\\npm`, you can run the below command to correct it:\n\n```\nnpm config set prefix %APPDATA%\\npm -g\n```\n\nIncidentally, if you would prefer that packages not be installed to your roaming profile (because you have a quota on your shared network, or it makes logging in or out from a domain sluggish), you can put it in your local app data instead:\n\n```\nnpm config set prefix %LOCALAPPDATA%\\npm -g\n```\n\n...as well as copying `%APPDATA%\\npm` to `%LOCALAPPDATA%\\npm` (and updating your `%PATH%`, of course).\n\nEveryone who works on npm knows that this process is complicated and fraught, and we're working on making it simpler. Stay tuned.\n"},{"id":"73230f6f-837a-5a6d-ae9f-6a3c66a0df72","frontmatter":{"title":"About access tokens"},"rawBody":"---\ntitle: About access tokens\nredirect_from:\n  - /getting-started/working_with_tokens\n  - /about-authentication-tokens\n---\n\n<Note>\n\n**Note:** You must be using npm version 5.5.1 or greater to use access tokens.\n\n</Note>\n\nAn access token is an alternative to using your username and password for authenticating to npm when using the API or the npm command-line interface (CLI).  An access token is a hexadecimal string that you can use to authenticate, and which gives you the right to install and/or publish your modules.\n\nThe npm CLI automatically generates an access token for you when you run `npm login`.  You can also create an access token to give other tools (such as continuous integration testing environments) access to your npm packages. For example, GitHub Actions provides the ability to store [secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets), like access tokens, that you can then use to authenticate.  When your workflow runs,  it will be able to complete npm tasks as you, including installing private packages you can access.\n\nYou can work with tokens from the web or the CLI, whichever is easiest. What you do in each environment will be reflected in the other environment.\n\nnpm token commands let you:\n\n* View tokens for easier tracking and management\n* Create new tokens, specifying read-only or full-permission\n* Limit access according to IP address ranges (CIDR)\n* Delete/revoke tokens\n\nFor more information on creating and viewing access tokens on the web and CLI, see \"[Creating and viewing access tokens][create-token]\".\n\n[create-token]: creating-and-viewing-access-tokens\n\n"},{"id":"ab943f5c-9522-5170-b650-4a2c712fcce0","frontmatter":{"title":"Creating and viewing access tokens"},"rawBody":"---\ntitle: Creating and viewing access tokens\nredirect_from: [ /creating-and-viewing-authentication-tokens ]\n---\n\nYou can [create](#creating-access-tokens) and [view](#viewing-access-tokens) access tokens from the website and command line interface (CLI).\n\n## Creating access tokens\n\n### Creating tokens on the website\n\n1. In the upper right corner of the page, click your profile picture, then click **Access Tokens**.\n\n   <Screenshot src=\"/integrations/integrating-npm-with-external-services/tokens-profile.png\" alt=\"Screenshot of the account menu with the tokens link selected\" />\n\n2. Click **Generate New Token**.\n\n   <Screenshot src=\"/integrations/integrating-npm-with-external-services/create-token.png\" alt=\"Screenshot of the create new token button\" />\n\n3. (Optional) Name your token\n\n4. Select the type of access token:\n\n   - **Read-only**: a read-only token can only be used to download packages from the registry.  It will have permission to read any private package that you have access to.  This is recommended for automation and workflows where you are installing packages, but not publishing new ones.\n\n   - **Automation**: an automation token can download packages and publish new ones, but if you have two-factor authentication (2FA) configured on your account, it will **not** be enforced.  You can use an automation token in continuous integration workflows and other automation systems to publish a package even when you cannot enter a one-time passcode.  This is recommended for automation workflows where you are publishing new packages.\n\n   - **Publish**: a publish token can perform any action on your behalf, including downloading packages, publishing packages, and changing user settings or package settings.  If you have two-factor authentication configured on your account, you will be required to enter a one-time passcode when using a publish token.  This is recommended for interactive workflows.\n\n   <Screenshot src=\"/integrations/integrating-npm-with-external-services/token-level-select.png\" alt=\"Screenshot of the access level selection\" />\n\n5. Click **Generate Token**.\n\n6. Copy the token from the top of page.\n\n### Creating tokens with the CLI\n\nYou can create tokens with read-only permissions or read and publish permissions with the CLI; you cannot currently create automation tokens.\n\n- **Read-only:** Tokens that allow installation and distribution only, but no publishing or other rights associated with your account.\n- **Publish:** The default setting for new tokens, and most permissive token type. Publish tokens allow installation, distribution, modification, publishing, and all rights that you have on your account.\n\nIn addition, you can specify that the token is only valid for a specific IPv4 address range, using [CIDR][cidr-wiki] notation.  The token will only be valid when used from the specified IP addresses.\n\n1. To create a new token, on the command line, run:\n   * `npm token create` for a read and publish token\n   * `npm token create --read-only` for a read-only token\n   * `npm token create --cidr=[list]` for a CIDR-restricted read and publish token. For example, `npm token create --cidr=192.0.2.0/24`\n   * `npm token create --read-only --cidr=[list]` for a CIDR-restricted read-only token\n2. When prompted, enter your password.\n3. If you have enabled [two-factor authentication][tfa], when prompted, enter a one-time password.\n4. Copy the token from the **token** field in the command output.\n\n#### CIDR-restricted token errors\n\nIf the CIDR string you enter is invalid or in an inappropriate format, you will get an error similar to the one below:\n\n```\nnpm ERR! CIDR whitelist contains invalid CIDR entry: X.X.X.X./YY,Z.Z.. . .\n```\n\nMake sure you are using a valid IPv4 range and try creating the token again.\n\n## Viewing access tokens\n\n<Note>\n\n**Note:** Full tokens are never displayed, only the first and last four characters will be shown. You can only view a full token immediately after creation.\n\n</Note>\n\n### Viewing tokens on the website\n\nTo view all tokens associated with your account, in the upper right corner of the page, click your profile picture, then click **Access Tokens**.\n\n<Screenshot src=\"/integrations/integrating-npm-with-external-services/tokens-profile.png\" alt=\"Screenshot of the account menu with the tokens link selected\" />\n\n### Viewing tokens on the CLI\n\nTo view all tokens associated with your account, on the command line, run the following command:\n\n```\nnpm token list\n```\n\n#### Token attributes\n\n- **id:** Use the token ID to refer to the token in commands.\n- **token:** The first digits of the actual token.\n- **create:** Date the token was created.\n- **readonly:** If yes, indicates a read-only token. If no, indicates a token with both read and publish permissions.\n- **CIDR whitelist:** Restricts token use by IP address.\n\n\n[tfa]: about-two-factor-authentication\n[cidr-wiki]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing\n"},{"id":"4028a386-ce9f-58ff-9ce1-ae63d4fef4f9","frontmatter":{"title":"Docker and private modules"},"rawBody":"---\ntitle: Docker and private modules\nredirect_from:\n  - /private-modules/docker-and-private-modules\n---\n\nTo install private npm packages in a Docker container, you will need to use [Docker build secrets](https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information).\n\n## Background: runtime variables\n\nYou cannot install private npm packages in a Docker container using only runtime variables. Consider the following Dockerfile:\n\n```\nFROM node\n\nCOPY package.json package.json\nRUN npm install\n\n# Add your source files\nCOPY . .\nCMD npm start\n```\n\nWhich will use the official [Node.js](https://hub.docker.com/_/node) image, copy the `package.json` into our container, installs dependencies, copies the source files and runs the start command as specified in the `package.json`.\n\nIn order to install private packages, you may think that we could just add a line before we run `npm install`, using the [ENV parameter](https://docs.docker.com/engine/reference/builder/#env):\n\n```docker\nENV NPM_TOKEN=00000000-0000-0000-0000-000000000000\n```\n\nHowever, this doesn't work as you would expect, because you want the npm install to occur when you run `docker build`, and in this instance, `ENV` variables aren't used, they are set for runtime only.\n\nInstead of run-time variables, you must use Docker build secrets.\n\n## Update the Dockerfile\n\nThe Dockerfile that takes advantage of this has a few more lines in it than the earlier example that allows us to use your global `.npmrc` and the access token created when running `npm login` command (if you haven't run it already - do so before moving on).\n\n```dockerfile\n# https://docs.npmjs.com/docker-and-private-modules\nFROM node:16\n\nENV APP_HOME=\"/app\"\n\nWORKDIR ${APP_HOME}\n\nCOPY package*.json ${APP_HOME}/\n\nRUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install\n\nCOPY . ${APP_HOME}/\n\nCMD npm start\n\n```\n\nThis will configure your Dockerfile to receive `.npmrc` file via build secrets, that will leave no trace after npm dependency installation is done.\n\n## Build the Docker image\n\nTo build the image using the above Dockerfile and the npm authentication token, you can run the following command. Note the `.` at the end to give `docker build` the current directory as an argument.\n\n```shell\ndocker build . -t secure-app-secrets:1.0 --secret id=npmrc,src=$HOME/.npmrc\n```\n\nThis will build the Docker image with the access token coming from your global `.npmrc` file received via build secrets, so you can run `npm install` inside your container as the current logged-in user.\n\n<Note>\n\n**Note:** You may need to specify a working directory different from the default `/` otherwise some frameworks like Angular will fail.\n\n</Note>\n"},{"id":"f8cd157e-8a3f-50a3-a046-2dfec43015e7","frontmatter":{"title":"Integrating npm with external services"},"rawBody":"---\ntitle: Integrating npm with external services\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"1a77b656-d6e2-5c82-b605-a9fb2901af2b","frontmatter":{"title":"Revoking access tokens"},"rawBody":"---\ntitle: Revoking access tokens\nredirect_from: [ /revoking-authentication-tokens ]\n---\n\nTo keep your account and packages secure, we strongly recommend revoking (deleting) tokens you no longer need or that have been compromised. You can revoke any token you have created.\n\n1. To see a list of your tokens, on the command line, run:\n\n   ```\n   npm token list\n   ```\n\n2. In the tokens table, find and copy the ID of the token you want to delete.\n\n3. On the command line, run the following command, replacing `123456` with the ID of the token you want to delete:\n\n   ```\n   npm token delete 123456\n   ```\n\n   npm will report `Removed 1 token`\n\n4. To confirm that the token has been removed, run:\n\n   ```\n   npm token list\n   ```\n\n<Note>\n\n**Note:** You must use the token ID to delete a token, not the truncated version of the token. In some cases, there may be a delay of up to an hour before a token is successfully revoked.\n\n</Note>\n"},{"id":"38a1db2a-8775-530e-af4a-2084d7b321e9","frontmatter":{"title":"Using private packages in a CI/CD workflow"},"rawBody":"---\ntitle: Using private packages in a CI/CD workflow\nredirect_from:\n  - /private-modules/ci-server-config\n---\n\nYou can use access tokens to test private npm packages with continuous integration (CI) systems, or deploy them using continuous deployment (CD) systems.\n\n## Create a new access token\n\nCreate a new access token that will be used only to access npm packages from a CI/CD server.\n\n### Continuous integration\n\nBy default, `npm token create` will generate a token with both read and write permissions. When generating a token for use in a continuous integration environment, we recommend creating a read-only token:\n\n```\nnpm token create --read-only\n```\n\nFor more information on creating access tokens, including CIDR-whitelisted tokens, see \"[Creating an access token][create-token]\".\n\n### Continuous deployment\n\nSince continuous deployment environments usually involve the creation of a deploy artifact, you may wish to create an [automation token][create-token] on the website. This will allow you to publish even if you have two-factor authentication enabled on your account.\n\n### Interactive workflows\n\nIf your workflow produces a package, but you publish it manually after validation, then you will want to create a token with read and write permissions, which are granted with the standard token creation command:\n\n```\nnpm token create\n```\n\n### CIDR whitelists\n\nFor increased security, you may use a CIDR-whitelisted token that can only be used from a certain IP address range. You can use a CIDR whitelist with a read and publish token or a read-only token:\n\n```\nnpm token create --cidr=[list]\nnpm token create --read-only --cidr=[list]\n```\n\nExample:\n\n```\nnpm token create --cidr=192.0.2.0/24\n```\n\nFor more information, see \"[Creating and viewing authentication tokens][create-token]\".\n\n## Set the token as an environment variable on the CI/CD server\n\nSet your token as an environment variable, or a secret, in your CI/CD server.\n\nFor example, in GitHub Actions, you would [add your token as a secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets). Then you can make the secret available to workflows.\n\nIf you named the secret `NPM_TOKEN`, then you would want to create an environment variable named `NPM_TOKEN` from that secret.\n\n```\nsteps:\n  - run: |\n      npm install\n  - env:\n      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n```\n\nConsult your CI/CD server's documentation for more details.\n\n## Create and check in a project-specific .npmrc file\n\nUse a project-specific `.npmrc` file with a variable for your token to securely authenticate your CI/CD server with npm.\n\n1. In the root directory of your project, create a custom `.npmrc` file with the following contents:\n\n   ```\n   //registry.npmjs.org/:_authToken=${NPM_TOKEN}\n   ```\n\n   **Note:** that you are specifying a literal value of `${NPM_TOKEN}`. The npm cli will replace this value with the contents of the `NPM_TOKEN` environment variable. Do **not** put a token in this file.\n\n2. Check in the `.npmrc` file.\n\n## Securing your token\n\nYour token may have permission to read private packages, publish new packages on your behalf, or change user or package settings. Protect your token.\n\nDo not add your token to version control or store it insecurely. Store it in a password manager, your cloud provider's secure storage, or your CI/CD provider's secure storage.\n\n[create-token]: creating-and-viewing-access-tokens\n"},{"id":"af579523-b207-5f66-b328-d841acb14eb9","frontmatter":{"title":"Converting your user account to an organization"},"rawBody":"---\ntitle: Converting your user account to an organization\nredirect_from:\n  - /converting-your-user-account-to-an-org\n---\nimport shared from '../../../src/shared.js'\n\nIf you have an npm user account, you can convert your user account to an organization. When you convert your user account to an organization, we will:\n\n- Create a new organization with the name of your user account.\n- Prompt you to create a new npm user account. We recommend choosing a variation of your old user name so collaborators will recognize you. For example, if your old username was \"wombat\", your new username might be \"wombat-new\".\n- Make your new npm user account an owner of your new organization.\n- Add your new npm user account to a team called \"Developers\" in your new organization.\n- Transfer packages owned by your user account to your new organization.\n- Transfer your existing organization and team memberships and contributor access settings to your new user account.\n\n**Note:** Once your old user account has been converted to an organization, you will no longer be able to sign in to npm with your old user account.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['organization-create'].text}</>\n\n   <>{shared['organization-create'].image}</>\n\n3. Below the account creation form, click **Convert**.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/convert-from-user.png\" alt=\"Screenshot showing the convert dialog\" />\n\n4. Review the account conversion steps and click **Continue**.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/convert-confirmation.png\" alt=\"Screenshot showing the convert confirmation dialog\" />\n\n5. On the new user account creation page, in the \"Username\" field, type the name of your new user account, then click **Submit**.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/convert-new-username.png\" alt=\"Screenshot showing the convert username dialog\" />\n\n6. On the plan selection page, select either the \"Unlimited private packages\" paid plan or the \"Unlimited public packages\" free plan, then click **Buy** or **Create**.\n\n   <>{shared['billing-organization-plans'].image}</>\n\n7. If you selected to use the unlimited private packages plan, in the payment dialog, provide the email, name, address, and credit card information for the card that will be used to pay for the organization.\n\n"},{"id":"c26dd8cb-d09b-5374-8278-86bcdedf1fc7","frontmatter":{"title":"Creating an organization"},"rawBody":"---\ntitle: Creating an organization\nredirect_from:\n  - /orgs/creating-an-org\n  - /creating-an-org\n---\nimport shared from '../../../src/shared.js'\n\nAny npm user can create an organization to manage contributor access to packages governed by the organization.\n\n<Note>\n\n**Note:** You need an npm user account to create an organization. To create a user account, visit the [account signup page][acct-signup]\".\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n1. <>{shared['organization-create'].text}</>\n\n   <>{shared['organization-create'].image}</>\n\n3. On the organization creation page, in the **Name** field, type a name for your organization. Your organization name will also be your organization scope.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/create-name.png\" alt=\"Screenshot showing the new organization name field\" />\n\n4. Under the **Name** field, choose either the \"Unlimited private packages\" paid plan or the \"Unlimited public packages\" free plan and click **Buy** or **Create**.\n\n   <>{shared['billing-organization-plans'].image}</>\n\n5. (Optional) On the organization invitation page, type the npm username or email address of a person you would like to add to your organization as a member and select a team to invite them to, then click **Invite**.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/create-invite.png\" alt=\"Screenshot showing the invitation options for a new organization\" />\n\n6. Click **Continue**.\n\n   <Screenshot src=\"/organizations/creating-and-managing-organizations/create-confirm.png\" alt=\"Screenshot showing the new organization confirmation\" />\n\n[acct-signup]: https://www.npmjs.com/signup\n"},{"id":"fc3923fc-2a45-5416-b332-41c36214a8ac","frontmatter":{"title":"Deleting an organization"},"rawBody":"---\ntitle: Deleting an organization\nredirect_from:\n  - /deleting-an-org\n---\nimport shared from '../../../src/shared.js'\n\nAn organization administrator can delete the organization; packages in\nthe organization will also [be deleted](/unpublishing-packages-from-the-registry) if they fulfill the\n[requirements to unpublish packages](/policies/unpublish).  Packages that\ncannot be deleted can be\n[deprecated](/deprecating-and-undeprecating-packages-or-package-versions)\ninstead.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization that you want to delete.\n    <Screenshot src=\"/organizations/creating-and-managing-organizations/left-sidebar.png\" alt=\"Screenshot of left sidebar\" />\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. Under \"delete organization\", click <strong>Delete</strong>.\n    <Screenshot src=\"/organizations/creating-and-managing-organizations/org-delete-button.png\" alt=\"Screenshot of org delete button\" />\n\n6. You will be given an overview of the packages in your organization and what will happen to them when your organization is deleted.  Packages that [can be unpublished](/unpublishing-packages-from-the-registry) will be deleted.\n\n   If you are sure that you want to continue, enter your organization name and click <strong>Delete this organization</strong>.\n\n    <Screenshot src=\"/organizations/creating-and-managing-organizations/org-delete-plan.png\" alt=\"Screenshot of org delete plan\" />\n\n"},{"id":"bfd9f364-1fe3-5d20-b2a4-8853785df1de","frontmatter":{"title":"Creating and managing organizations"},"rawBody":"---\ntitle: Creating and managing organizations\nredirect_from:\n  - /orgs/creating-and-managing-orgs\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"98af0755-217e-5c3a-a443-878e4a3cb391","frontmatter":{"title":"Renaming an organization"},"rawBody":"---\ntitle: Renaming an organization\nredirect_from:\n  - /renaming-an-org\n---\n\nOrganizations cannot be renamed from the website or command line interface.\n\nTo rename an organization, as an organization owner, you must manually migrate your existing organization members, teams, and packages to a new organization, then [contact npm Support][contact-support] to have the outdated packages unpublished and the previous organization deleted.\n\n1. [Create a new organization][org-create] with the name you want. If your old organization is on a paid plan, you must choose a paid plan for the new organization.\n2. [Add the members][add-org-members] of your old organization to your new organization.\n3. In your new organization, [create teams][create-teams] to match teams in your old organization.\n4. Republish packages to the new organization by updating the package scope in its `package.json` file to match the new organizationanization name and running `npm publish`.\n5. In the new organization teams, [configure package access][pkg-access] to match team package access in your old organization.\n6. [Contact npm Support][contact-support] to have the outdated packages unpublished and the previous organization deleted.\n\n\n[contact-support]: https://www.npmjs.com/support\n[org-create]: creating-an-organization\n[add-org-members]: adding-members-to-your-organization\n[create-teams]: creating-teams\n[pkg-access]: managing-team-access-to-packages\n"},{"id":"0d6ba636-852b-5a41-83dd-a1c4352f0ffa","frontmatter":{"title":"Requiring two-factor authentication in your organization"},"rawBody":"---\ntitle: Requiring two-factor authentication in your organization\nredirect_from:\n  - /requiring-two-factor-authentication-in-your-organization\n---\nimport shared from '../../../src/shared.js'\n\nOrganization owners can require organization members to enable two-factor authentication for their personal accounts, making it harder for malicious actors to access an organization's packages and settings\n\n## About two-factor authentication for organizations\n\nTwo-factor authentication (2FA) is an extra layer of security used when logging into websites or apps. You can require all members in your organization to enable two-factor authentication on npm. For more information about two-factor authentication, see [\"Configuring two-factor authentication.\"][configure-2fa].\n\n<Note>\n\n**Note:**\n  * When you require use of two-factor authentication for your organization, members who do not use 2FA will be removed from the organization and lose access to its packages. You can add them back to the organization if they enable two-factor authentication.\n  * An organization owner cannot opt-in to requiring 2FA for an organization if they do not have 2FA enabled on their account.\n  * If you are the member of an organization that requires 2FA you will not be able to disable 2FA until you leave that organization.\n\n</Note>\n\n## Prerequisites\n\nBefore you can require organization members to use two-factor authentication, you must enable two-factor authentication for your account on npm. For more information, see [\"Configuring two-factor authentication.\"][configure-2fa].\n\nBefore you require use of two-factor authentication, we recommend notifying organization members and asking them to set up 2FA for their accounts. You can see if members already use 2Fa in the organizations members page.\n\n## Requiring two-factor authentication in your organization\n\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-members-tab'].text}</>\n\n   <>{shared['organization-members-tab'].image}</>\n\n5. Click the **Enable 2FA Enforcement** button.\n\n   <Screenshot src=\"/organizations/requiring-two-factor-authentication-in-your-organization/enable-2fa.png\" alt=\"Screenshot of the enforce 2fa button\" />\n\n6. If prompted, read the information about members who will be removed from the organization. Type your organization's name to confirm the change, then click Remove members & require two-factor authentication.\n\n   <Screenshot src=\"/organizations/requiring-two-factor-authentication-in-your-organization/removal-confirmation.png\" alt=\"Screenshot of the removal confirmation prompt\" />\n\n7. If any members are removed from the organization, we recommend sending them an invitation that can reinstate their former privileges and access to your organization. They must enable two-factor authentication before they can accept your invitation.\n\n## Helping removed members and outside collaborators rejoin your organization\n\nIf any members are removed from the organization when you enable required use of two-factor authentication, they'll receive an email notifying them that they've been removed. They should then enable 2FA for their personal account, and contact an organization owner to request access to your organization.\n\n[configure-2fa]: configuring-two-factor-authentication\n"},{"id":"a0b76b5e-8310-5a26-a80e-6ba39f6a6784","frontmatter":{"title":"Accepting or rejecting an organization invitation"},"rawBody":"---\ntitle: Accepting or rejecting an organization invitation\nredirect_from:\n  - /accepting-or-rejecting-an-org-invitation\n---\n\n## Accepting an organization invitation\n\nIf you receive an invitation to an organization, you have to accept the invitation over email to be added to the organization.\n\nYou have the option to use a different email address than the one that received the invitation to join the organization.\n\n1. Click the verification link in the organization invitation email.\n\n2. You will be prompted to log into your npm user account. If you don't have an npm user account, you can sign up for one.\n\n   <Screenshot src=\"/organizations/managing-organization-members/accept-invitation.png\" alt=\"Accept organization invitation\" />\n\n## Rejecting an organization invitation\n\nIf you are invited to an organization that you do not want to join, you can let the invitation expire. Organization invitations expire after one week.\n"},{"id":"5592b863-7d90-54ce-b872-bc866088d468","frontmatter":{"title":"Adding members to your organization"},"rawBody":"---\ntitle: Adding members to your organization\nredirect_from:\n  - /adding-members-to-your-org\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner, you can add other npm users to your organization to give them read or read and write access to public and private packages within your organization's scope, as well as public unscoped packages governed by your organization.\n\nWhen you add a member to your organization, they are sent an email inviting them to the organization.\n\nOnce the new member [accepts the invitation][accept-invitation], they are:\n\n- assigned the role of \"[member][member-perms]\"\n- added to the [\"developers\" team][developers-team]\n\nIf you have a [paid organization][paid-org], as part of an npm Teams plan, you will be billed $7 per month for each new member.\n\n## Inviting members to your organization\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-members-tab'].text}</>\n\n   <>{shared['organization-members-tab'].image}</>\n\n5. Click the **Invite Members** button.\n\n   <Screenshot src=\"/organizations/managing-organization-members/invite-members-button.png\" alt=\"Screenshot of the invite members button\" />\n\n6. In the \"Username or email\" field, type the username or email address of the person you wish to invite. Optionally you can select a specific team to invite the member to.\n\n   <Screenshot src=\"/organizations/managing-organization-members/username-or-email-field.png\" alt=\"Screenshot of the username or email field\" />\n\n7. Click **Invite**.\n\n   <Screenshot src=\"/organizations/managing-organization-members/invite-button.png\" alt=\"Screenshot of the invite button\" />\n\n## Revoking an organization invitation\n\nAs an organization owner, if you've made a mistake in inviting someone to your organization, you can revoke the organization invitation.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-members-tab'].text}</>\n\n   <>{shared['organization-members-tab'].image}</>\n\n5. Click the **Invite Members** button.\n\n   <Screenshot src=\"/organizations/managing-organization-members/invite-members-button.png\" alt=\"Screenshot of the invite members button\" />\n\n6. Under the \"Invitations\" field, click the **X** next to the name of the user invitation you would like to revoke.\n\n   <Screenshot src=\"/organizations/managing-organization-members/revoke-invitation.png\" alt=\"Screenshot of the revoke invitation button\" />\n\n[accept-invitation]: accepting-or-rejecting-an-org-invitation\n[member-perms]: org-roles-and-permissions\n[developers-team]: about-developers-team\n[paid-org]: upgrading-to-a-paid-org-plan\n"},{"id":"dc2c43b3-b477-5396-8251-139f8641b1cd","frontmatter":{"title":"Managing organization members"},"rawBody":"---\ntitle: Managing organization members\nredirect_from:\n  - /orgs/managing-org-members\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"8de562ce-23cc-51fd-8fdf-29c8255e1d40","frontmatter":{"title":"Managing organization permissions"},"rawBody":"---\ntitle: Managing organization permissions\nredirect_from:\n  - /managing-org-permissions\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner, you can change the role of any member of your organization to add or remove permissions on the organization for that member.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-members-tab'].text}</>\n\n   <>{shared['organization-members-tab'].image}</>\n\n5. In the list of organization members, find the member whose role you want to change.\n\n6. In the member row, to select the new role of the organization member, click **member**, **admin**, or **owner**.\n\n   <Screenshot src=\"/organizations/managing-organization-members/change-member-role.png\" alt=\"Screenshot showing the change member role option\" />\n\n"},{"id":"311e83f9-33b7-5ef6-a86a-ebcab4c8792e","frontmatter":{"title":"Organization roles and permissions"},"rawBody":"---\ntitle: Organization roles and permissions\nredirect_from:\n  - /org-roles-and-permissions\n---\nimport shared from '../../../src/shared.js'\n\nThere are three roles in an organization:\n\n- **Owner:** Users who manage organization members and billing.\n- **Admin:** Users who manage team membership and package access.\n- **Member:** Users who create and publish packages in the organization scope.\n\n<><strong>On the public registry, you cannot remove the last owner from an organization.</strong> To delete an organization, {shared['contact-support'].text}.</>\n\n| Action                                                | **Owner** | **Admin** | **Member** |\n|:------------------------------------------------------|:---------:|:---------:|:----------:|\n| Manage organization billing                           | X         |         |          |\n| Add members to the organization                       | X         |         |          |\n| Remove members from the organization                  | X         |         |          |\n| Rename an organization                                | X         |         |          |\n| Delete an organization                                | X         |         |          |\n| Change any organization member's role                 | X         |         |          |\n| Create teams                                          | X         | X        |          |\n| Delete teams                                          | X         | X        |          |\n| Add any member to any team                            | X         | X        |          |\n| Remove any member from any team                       | X         | X        |          |\n| Manage team package access                            | X         | X        |          |\n| Create and publish packages in the organization scope | X         | X        | X         |\n"},{"id":"de5339a9-3038-5170-a2f2-ac0e6b79b810","frontmatter":{"title":"Removing members from your organization"},"rawBody":"---\ntitle: Removing members from your organization\nredirect_from:\n  - /removing-members-from-your-org\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner, you can remove members from your organization if they are longer collaborating on packages owned or governed by your organization.\n\nIf you remove a member from an npm Teams subscription (a paid organization), then they will lose access to your organization's private packages, and the credit card on file for your organization will not be charged for them on the next billing cycle.\n\n<Note>\n\n**Note:** Members are not notified when you remove them from your organization.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-members-tab'].text}</>\n\n   <>{shared['organization-members-tab'].image}</>\n\n5. In the list of organization members, find the member you want to remove.\n\n6. At the end of the member row, click **X**.\n\n   <Screenshot src=\"/organizations/managing-organization-members/remove-member.png\" alt=\"Screenshot of the remove member dialog\" />\n"},{"id":"ad80dfe0-f4ce-5304-88c1-7be7046eb2a1","frontmatter":{"title":"About organization scopes and packages"},"rawBody":"---\ntitle: About organization scopes and packages\nredirect_from:\n  - /about-org-scopes-and-packages\n---\n\nEvery organization is granted an organization scope, a unique namespace for packages owned by the organization that matches the organization name. For example, an organization named \"wombat\" would have the scope `@wombat`.\n\nYou can use scopes to:\n\n- Maintain a fork of a package: `@wombat/request`.\n- Avoid name disputes with popular names: `@wombat/web`.\n- Easily find packages in the same namespace\n\nPackages in a scope must follow the same [naming guidelines][name-guidelines] as unscoped packages.\n\n## Managing unscoped packages\n\nWhile you are granted a scope by default when you create an organization, you can also use organizations to manage unscoped packages, or packages under a different scope (such as a user scope).\n\n\n[name-guidelines]: /files/package.json#name\n"},{"id":"410b1d1f-113d-5a9d-b51a-a143b47c1219","frontmatter":{"title":"Configuring your npm client with your organization settings"},"rawBody":"---\ntitle: Configuring your npm client with your organization settings\nredirect_from:\n  - /configuring-your-npm-client-with-your-org-settings\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization member, you can configure your npm client to:\n\n- make a single package or all new packages you create locally use your organization's scope\n- make a single package or all new packages you create locally have default public visibility\n\nBefore configuring your npm client, you must [install npm][install-npm].\n\n## Configuring your npm client to use your organization's scope\n\nIf you will be publishing packages with your organization's scope often, you can add your organization's scope to your global `.npmrc` configuration file.\n\n### Setting your organization scope for all new packages\n\n<Note>\n\n**Note:** Setting the organization scope using the steps below will only set the scope for new packages; for existing packages, you will need to update the `name` field in `package.json`.\n\n</Note>\n\nOn the command line, run the following command, replacing &lt;org-name&gt; with the name of your organization:\n\n```\nnpm config set scope <org-name> --global\n```\n\nFor packages you do not want to publish with your organization's scope, you must manually edit the package's `package.json` to remove the organization scope from the `name` field.\n\n### Setting your organization scope for a single package\n\n1. On the command line, navigate to the package directory.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. Run the following command, replacing &lt;org-name&gt; with the name of your organization:\n\n    ```\n    npm config set scope <org-name>\n    ```\n\n## Changing default package visibility to public\n\nBy default, publishing a scoped package with `npm publish` will publish the package as private. If you are a member of an organization on the free organization plan, or are on the paid organization plan but want to publish a scoped package as public, you must pass the `--access public` flag:\n\n```\nnpm publish --access public\n```\n\n### Setting package visibility to public for a single package\n\nYou can set a single package to pass `--access public ` to every `npm publish` command that you issue for that package.\n\n1. On the command line, navigate to the package directory.\n\n   ```\n   cd /path/to/package\n\n2. Run the following command:\n\n    ```\n    npm config set access public\n    ```\n\n### Setting package visibility to public for all packages\n\nYou can set all packages to pass `--access public ` to every `npm publish` command that you issue for that package.\n\n<Note>\n\n**Warning:** Setting packages access to `public` in your global `.npmrc` will affect all packages you create, including packages in your personal account scope, as well as packages scoped to your organization.\n\n</Note>\n\nOn the command line, run the following command:\n\n```\nnpm config set access public --global\n```\n\n[install-npm]: downloading-and-installing-node-js-and-npm\n"},{"id":"42049605-d20b-57e0-b6e5-901b695177b8","frontmatter":{"title":"Creating and publishing an organization scoped package"},"rawBody":"---\ntitle: Creating and publishing an organization scoped package\nredirect_from:\n  - /creating-and-publishing-an-org-scoped-package\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization member, you can create and publish public and private packages within the organization's scope.\n\n## Creating an organization scoped package\n\n1. On the command line, make a directory with the name of the package you would like to create.\n\n   ```\n   mkdir /path/to/package/directory\n   ```\n\n2. Navigate to the newly-created package directory.\n\n3. To create an organization scoped package, on the command line, run:\n\n   ```\n   npm init --scope=<your_org_name>\n   ```\n\n4. To verify the package is using your organization scope, in a text editor, open the package's `package.json` file and check that the name is `@your_org_name/<pkg_name>`, replacing `your_org_name` with the name of your organization.\n\n## Publishing a private organization scoped package\n\nBy default, `npm publish` will publish a scoped package as private.\n\nBy default, any scoped package is published as private. However, if you have an organization that does not have the Private Packages feature, `npm publish` will fail unless you pass the `access` flag.\n\n1. On the command line, navigate to the package directory.\n\n2. Run `npm publish`.\n\nPrivate packages will say `private` below the package name on the npm website.\n\n<>{shared['organization-package-private'].image}</>\n\n## Publishing a public organization scoped package\n\nTo publish an organization scoped package as public, use `npm publish --access public`.\n\n1. On the command line, navigate to the package directory.\n\n2. Run `npm publish --access public`.\n\nPublic packages will say `public` below the package name on the npm website.\n\n<>{shared['organization-package-public'].image}</>\n"},{"id":"9af8ca32-da0e-5671-b7d7-0c407e7e5483","frontmatter":{"title":"Managing organization packages"},"rawBody":"---\ntitle: Managing organization packages\nredirect_from:\n  - /orgs/managing-org-packages\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"0e6abf6a-6ccd-522d-8c83-605eac25a31b","frontmatter":{"title":"About the developers team"},"rawBody":"---\ntitle: About the developers team\n---\n\nThe \"**developers**\" team is automatically created when you create an organization. By default, the developers team has read/write access to all new packages created under the organization's scope.\n\n- Members added to the organization, including the organization owner, are automatically added to the **developers** team\n- The [`maintainers` field] in the [`package.json`] of any newly created packages under the organization scope\nis automatically populated with the members of the current **developers** team\n\nIf you create a new package under your organization's scope and you do not\nwant members of the **developers** team to have read/write access to that\npackage, an owner or admin can remove the **developers** team's access to that\npackage. For more informations, see \"[Managing team access to organization packages][pkg-access]\".\n\nIf an owner adds a new member to an organization and **does not** want\nthat member to be on the **developers** team, an owner can remove them.\n\n<Note>\n\n**Note:** The **developers** team can no longer be removed from an organization for the following reasons:\n\n* It is the source of truth for all users, packages, and default permissions in an organization.\n* When you want to restrict write access, it is almost always better to set the default permissions to read-only and create separate teams for managing write permissions.\n\n</Note>\n\n[pkg-access]: managing-team-access-to-org-packages\n[create-team]: creating-teams\n[`maintainers` field]: /files/package.json#people-fields-author-contributors\n[`package.json`]: /files/package.json\n"},{"id":"83ff3b0d-be27-5293-a77d-765fd2f17bd0","frontmatter":{"title":"Adding organization members to teams"},"rawBody":"---\ntitle: Adding organization members to teams\nredirect_from:\n  - /adding-org-members-to-teams\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner or team admin, you can add organization members to teams to give them access to a specific set of packages governed by the organization.\n\n<Note>\n\n**Note:** An npm user must be a member of your organization before you can add them to a team. To add a member to your organization, see \"[Adding members to your organization][add-organization-members]\".\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. Beside the team you want to add members to, click **Members**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-members.png\" alt=\"Screenshot of the team members button\" />\n\n6. In the \"Username\" field, type the npm username of the organization member you would like to add to your team.\n\n   <Screenshot src=\"/organizations/managing-teams/team-member-select.png\" alt=\"Screenshot of the team member selection\" />\n\n7. Click **+ Add User**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-member-add-button.png\" alt=\"Screenshot of the team member add button\" />\n\n<Note>\n\n**Note:** organization members are not notified when they are added to a team. We recommend telling the organization member you have added them to a team.\n\n</Note>\n\n## Managing teams from the CLI\n\nIf you would like to manage the membership of your team from\nthe command line interface (CLI), you can use:\n\n```\nnpm team\n```\n\nFor more information, see the [CLI documentation on teams][team-cli].\n\n\n[add-organization-members]: adding-members-to-your-organization\n[team-cli]: /cli/team\n"},{"id":"48b5e3fe-2c84-5193-abd3-65be51db12e5","frontmatter":{"title":"Creating teams"},"rawBody":"---\ntitle: Creating teams\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner or team admin, you can create teams to manage access to sets of packages governed by your organization.\n\n<Note>\n\n**Note:** Team names cannot be changed. To \"rename\" a team, you must delete the team and recreate it.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. In the \"Name\" and \"Description\" fields, type a team name and helpful description. Team names must be lower case and cannot contain spaces or punctuation.\n\n   <Screenshot src=\"/organizations/managing-teams/team-name-description.png\" alt=\"Screenshot of team name and description\" />\n\n6. Click **Make it so**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-creation-confirmation.png\" alt=\"Screenshot of the team creation confirmation button\" />\n\n<Note>\n\n**Note:** New teams do not have members or package access by default. Once you create a team, add packages and members from the \"Teams\" tab.\n\n</Note>\n"},{"id":"2031dcee-80dc-59db-9ec2-c3066a6eadaf","frontmatter":{"title":"Managing teams"},"rawBody":"---\ntitle: Managing teams\nredirect_from:\n  - /orgs/managing-teams\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"f27144fd-023e-545d-a1e3-640f5b9ee816","frontmatter":{"title":"Managing team access to organization packages"},"rawBody":"---\ntitle: Managing team access to organization packages\nredirect_from:\n  - /managing-team-access-to-org-packages\n  - /managing-team-access-to-packages\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner or team admin, you can add or remove package access to or from teams in your organization.\n\n## Adding package access to a team\n\n### Adding package access to a team on the web\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. Beside the team to which you want to add package access, click **Packages**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-packages-button.png\" alt=\"Screenshot of the packages button\" />\n\n6. On the \"Add Packages\" page, in the \"Package\" field, type the name of the package and select from the dropdown menu.\n\n   <Screenshot src=\"/organizations/managing-teams/team-package-select.png\" alt=\"Screenshot of the package selection\" />\n\n7. Click **+ Add Existing Package**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-package-add-existing-button.png\" alt=\"Screenshot of the add package button\" />\n\n8. Beside the package name, click **read** or **read/write** to set the team permissions for the package.\n\n   <Screenshot src=\"/organizations/managing-teams/team-package-permissions.png\" alt=\"Screenshot of the team package permission option\" />\n\n### Adding package access to a team using the CLI\n\nAs an organization owner or team admin, you can use the CLI `access` command to add package access to a team on\nthe command line:\n\n```\nnpm access grant <read-only|read-write> <org:team> [<package>]\n```\n\nFor more information, see \"[npm-access][access-cli]\".\n\n## Removing package access from a team\n\n### Removing package access from a team on the web\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. Beside the team from which you want to remove package access, click **Packages**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-packages-button.png\" alt=\"Screenshot of the packages button\" />\n\n6. Beside the name of the package from which you want to remove access, click **x**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-package-remove-button.png\" alt=\"Screenshot of the remove package button\" />\n\n### Removing package access from a team using the CLI\n\nAs an organization owner or team admin, you can also use the CLI `access` command to revoke package access from a team on\nthe command line:\n\n```\nnpm access revoke <org:team> [<package>]\n```\nFor more information, see \"[npm-access][access-cli]\".\n\n## Changing package access for a team\n\n### Changing package access for a team on the web\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. Beside the team from which you want to remove package access, click **Packages**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-packages-button.png\" alt=\"Screenshot of the packages button\" />\n\n6. Beside the package name, click **read** or **read/write** to set the team permissions for the package.\n\n   <Screenshot src=\"/organizations/managing-teams/team-package-change-permissions.png\" alt=\"Screenshot of the change package permission option\" />\n\n### Changing package access for a team from the CLI\n\nAs an organization owner or team admin, you can change package access for a team from the command line:\n\n```\nnpm access\n```\nFor more information, see the [`npm-access` CLI documentation][access-cli].\n\n\n[access-cli]: /cli/access\n"},{"id":"6f6baa2e-2974-5df7-91d2-46847cdcddab","frontmatter":{"title":"Removing organization members from teams"},"rawBody":"---\ntitle: Removing organization members from teams\nredirect_from:\n  - /removing-org-members-from-teams\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner or team admin, you can remove organization members from teams if they no longer need access to packages accessible to the team.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. In the list of team members, find the member you want to remove.\n\n6. In the member row, to remove the member from the team, click **X**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-member-remove-button.png\" alt=\"Screenshot of the team member remove button\" />\n\n<Note>\n\n**Note: Removing a member from a team, even if it is the only team they are a member of, will not remove them from the organization.** To remove a member from the organization, see \"[Removing members from your organization][removing-organization-members]\".\n\n</Note>\n\n[removing-organization-members]: removing-members-from-your-organization\n"},{"id":"bcbee485-e2c6-5f28-8ad3-c3ccdbeee37c","frontmatter":{"title":"Removing teams"},"rawBody":"---\ntitle: Removing teams\n---\nimport shared from '../../../src/shared.js'\n\nAs an organization owner or team admin, you can remove teams that no longer need access to a set of packages governed by your organization. Removing the team will not remove the team members or packages from your organization.\n\n<Note>\n<><strong>Note:</strong> if you remove all teams referencing a particular package, it will be orphaned and you will lose access to it. If this happens, {shared['contact-support'].text}.</>\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. <>{shared['organization-selection'].text}</>\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-teams-tab'].text}</>\n\n   <>{shared['organization-teams-tab'].image}</>\n\n5. Beside the name of the team you want to remove, click **X**.\n\n   <Screenshot src=\"/organizations/managing-teams/team-remove.png\" alt=\"Screenshot of the remove team button\" />\n\n<Note>\n\n**Note:** You cannot remove the developers team, [learn more about the developers team](/about-developers-team).\n\n</Note>\n"},{"id":"dfbb9935-c3da-54aa-a03a-891778f6783d","frontmatter":{"title":"Downgrading to a free organization plan"},"rawBody":"---\ntitle: Downgrading to a free organization plan\nredirect_from:\n  - /downgrading-to-a-free-org-plan\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nIf you are a subscriber to the npm Teams product (you have a paid organization) and you are an owner of the organization, then you can downgrade from npm Teams to a free organization.  When you downgrade from a paid to a free organization, you and your organization members will lose the ability to install and publish private packages at the end of your last paid billing cycle. Your private packages will _not_ be made publicly visible when you downgrade to a free plan.\n\n**Note:** If you would like to pay for fewer seats, you can remove members from your organization by following the steps in \"[Removing members from your organization][remove-members]\".\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization you want to downgrade.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. <>{shared['billing-downgrade-selection'].text}</>\n\n   <>{shared['billing-downgrade-selection'].image}</>\n\n6. <>{shared['billing-downgrade-confirm'].text}</>\n\n   <>{shared['billing-downgrade-confirm'].image}</>\n\n\n[remove-members]: removing-members-from-your-org\n"},{"id":"836ab02c-0d62-597a-821c-9517a681cbd5","frontmatter":{"title":"Paying for your organization"},"rawBody":"---\ntitle: Paying for your organization\nredirect_from:\n  - /orgs/paying-for-your-org\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"79fdf7de-32a8-542e-b0e9-88e3695eb5f6","frontmatter":{"title":"Updating organization billing settings"},"rawBody":"---\ntitle: Updating organization billing settings\nredirect_from:\n  - /updating-org-billing-settings\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nAs an owner of an npm Teams subscription, a paid organization plan, you can update the credit card used to pay for your plan. Updating your credit card will not change your billing cycle date, and the new credit card will be charged on the next billing cycle.\n\n<Note>\n<><strong>Note:</strong> If the credit card used to pay for your npm Teams subscription or your paid organization plan expires, or we are otherwise are unable to charge your card, you have a grace period of {shared['grace-period'].text} to update the card.</>\n</Note>\n\n## Updating credit card information\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization whose credit card information you want to change.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. <>{shared['payment-info'].text}</>\n\n   <>{shared['payment-info'].image}</>\n\n6. <>{shared['billing-form'].text}</>\n\n   <>{shared['billing-form'].image}</>\n\n7. <>{shared['payment-info-button'].text}</>\n\n   <>{shared['payment-info-button'].image}</>\n\n8. <>{shared['billing-creditcard-form'].text}</>\n\n   <>{shared['billing-creditcard-form'].image}</>\n\n9. <>{shared['payment-remember-me'].text}</>\n\n   <>{shared['payment-remember-me'].image}</>\n\n10. <>{shared['billing-update-card'].text}</>\n\n    <>{shared['billing-update-card'].image}</>\n\n## Updating billing receipt email and extra receipt information\n\nAs an organization owner, you can update the email address used for receipts, and add extra information to the receipt for your paid organization plan, such as your business name, VAT identification number, or address of record. Updated billing information will appear on all receipts immediately.\n\n<Note>\n\n**Note:** The billing email is used for receipts only and is not required to match the email address of the person whose card is used to pay for the organization.\n\n</Note>\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization whose billing receipt information you want to change.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n5. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n6. <>{shared['billing-receipt-settings'].text}</>\n\n   <>{shared['billing-receipt-settings'].image}</>\n\n7. <>{shared['billing-extra-info'].text}</>\n\n   <>{shared['billing-extra-info'].image}</>\n\n8. <>{shared['billing-extra-receipt-email'].text}</>\n\n   <>{shared['billing-extra-receipt-email'].image}</>\n\n9. <>{shared['billing-extra-save'].text}</>\n\n   <>{shared['billing-extra-save'].image}</>\n"},{"id":"06bb4353-e17b-5c5d-b577-db71e9a34ea8","frontmatter":{"title":"Upgrading to a paid organization plan"},"rawBody":"---\ntitle: Upgrading to a paid organization plan\nredirect_from:\n  - /upgrading-to-a-paid-org-plan\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nAs an organization owner, you can upgrade your free organization plan to the npm Teams product.  npm Teams is a paid plan to give organization members the ability to install and publish private packages.  For more information about npm Teams and our organization pricing plans, see the \"npm Teams\" section of [our pricing page][org-plans-link].\n\nIf you have an organization with a private packages plan, your organization will cost you seven (7) dollars a month per user. **The $7 charge is a flat fee for any member of the organization even if the teams the member belongs do not have access to private packages**\n\nNewly added members to an organization are always billed during the next billing cycle. For more information, see \"[Adding members to your organization][add-members]\".\n\n**Note:** Your paid plan and billing cycle will start when you submit your credit card information, and you will be charged for the first month immediately.\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization you want to upgrade.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. Under \"change plan\", click **Upgrade Plan ($7/User)**.\n\n6. Under \"Want to upgrade?\", click **Enable Private Publishing for $7/mo**.\n\n7. <>{shared['billing-form'].text}</>\n\n   <>{shared['billing-form'].image}</>\n\n8. <>{shared['payment-info-button'].text}</>\n\n   <>{shared['payment-info-button'].image}</>\n\n9. <>{shared['billing-creditcard-form'].text}</>\n\n   <>{shared['billing-creditcard-form'].image}</>\n\n10. <>{shared['payment-remember-me'].text}</>\n\n    <>{shared['payment-remember-me'].image}</>\n\n10. Click **Pay** for the monthly amount.  The monthly amount will be the number of members in your organization multiplied by $7.\n\n\n[org-plans-link]: https://www.npmjs.com/pricing\n[add-members]: adding-members-to-your-org\n"},{"id":"a3cbc79d-ee49-59d2-9f06-00bf77f93421","frontmatter":{"title":"Viewing, downloading, and emailing receipts for your organization"},"rawBody":"---\ntitle: Viewing, downloading, and emailing receipts for your organization\nredirect_from:\n  - /viewing-downloading-and-emailing-receipts-for-your-org\n---\nimport shared from '../../../src/shared.js'\n\n<Note>\n\n**Note:** This article only applies to users of the public npm registry.\n\n</Note>\n\nAs an organization owner, you can view, download, and email receipts for the complete billing history of your organization.\n\n## Viewing receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization whose billing receipts you want to view.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n6. To view a single receipt, find the row of the receipt you want to view, then, on the right side of the row, click the view icon.\n\n6. <>{shared['billing-view'].text}</>\n\n   <>{shared['billing-view'].image}</>\n\n## Downloading receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization whose billing receipts you want to download.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n6. <>{shared['billing-download'].text}</>\n\n   <>{shared['billing-download'].image}</>\n\n7. <>{shared['billing-download-checked'].text}</>\n\n   <>{shared['billing-download-checked'].image}</>\n\n## Emailing receipts\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. <>{shared['account-settings'].text}</>\n\n   <>{shared['account-settings'].image}</>\n\n3. In the left sidebar, click the name of the organization whose billing receipts you want to email.\n\n   <>{shared['organization-selection'].image}</>\n\n4. <>{shared['organization-billing-tab'].text}</>\n\n   <>{shared['organization-billing-tab'].image}</>\n\n5. <>{shared['billing-history'].text}</>\n\n   <>{shared['billing-history'].image}</>\n\n6. <>{shared['billing-email'].text}</>\n\n   <>{shared['billing-email'].image}</>\n\n7. <>{shared['billing-email-checked'].text}</>\n\n   <>{shared['billing-email-checked'].image}</>\n\n8. <>{shared['billing-email-receipt'].text}</>\n\n   <>{shared['billing-email-receipt'].image}</>\n\n9. Click **Send**.\n"},{"id":"65a6d61d-d38c-5a38-8775-942c9a4d510f","frontmatter":{"title":"About package README files"},"rawBody":"---\ntitle: About package README files\n---\n\nTo help others find your packages on npm and have a good experience using your code in their projects, we recommend including a README file in your package directory. Your README file may include directions for installing, configuring, and using the code in your package, as well as any other information a user may find helpful. The README file will be shown on the package page.\n\nAn npm package README file must be in the root-level directory of the package.\n\n## Creating and adding a README.md file to a package\n\n1. In a text editor, in your package root directory, create a file called `README.md`.\n2. In the `README.md` file, add useful information about your package.\n3. Save the `README.md` file.\n\n<Note>\n\n**Note:** The file extension `.md` indicates a Markdown file. For more information about Markdown, see the GitHub Guide \"<a href=\"https://guides.github.com/features/mastering-markdown/#what\">Mastering Markdown</a>\".\n\n</Note>\n\n## Updating an existing package README file\n\nThe README file will only be updated on the package page when you publish a new version of your package. To update your README file:\n\n1. In a text editor, update the contents of the `README.md` file.\n\n2. Save the `README.md` file.\n\n3. On the command line, in the package root directory, run the following commands:\n\n   ```\n   npm version patch\n   npm publish\n   ```\n\n\n[markdown-link]: https://guides.github.com/features/mastering-markdown/#what\n"},{"id":"d8839df6-a5ec-5f20-a850-732b11b9585b","frontmatter":{"title":"About semantic versioning"},"rawBody":"---\ntitle: About semantic versioning\nredirect_from:\n  - /getting-started/semantic-versioning/\n---\n\nTo keep the JavaScript ecosystem healthy, reliable, and secure, every time you make significant updates to an npm package you own, we recommend publishing a new version of the package with an updated version number in the [`package.json` file][pkg-json] that follows the [semantic versioning spec][semver-org]. Following the semantic versioning spec helps other developers who depend on your code understand the extent of changes in a given version, and adjust their own code if necessary.\n\n<div class=\"note\">\n\n<span class=\"bold\">Note:</span> If you introduce a change that breaks a package dependency, we strongly recommend incrementing the version <span class=\"bold\">major number</span>; see below for details.\n\n</div>\n\n## Incrementing semantic versions in published packages\n\nTo help developers who rely on your code, we recommend starting your package version at `1.0.0` and incrementing as follows:\n\n| Code status | Stage | Rule | Example version |\n|-------------|-------|------|----------------|\n| First release | New product | Start with 1.0.0 | 1.0.0 |\n| Backward compatible bug fixes | Patch release | Increment the third digit | 1.0.1 |\n| Backward compatible new features | Minor release | Increment the middle digit and reset last digit to zero | 1.1.0 |\n| Changes that break backward compatibility | Major release | Increment the first digit and reset middle and last digits to zero | 2.0.0 |\n\n## Using semantic versioning to specify update types your package can accept\n\nYou can specify which update types your package can accept from dependencies in your package's `package.json` file.\n\nFor example, to specify acceptable version ranges up to 1.0.4, use the following syntax:\n\n* Patch releases: `1.0` or `1.0.x` or `~1.0.4`\n* Minor releases: `1` or `1.x` or `^1.0.4`\n* Major releases: `*` or `x`\n\nFor more information on semantic versioning syntax, see the [npm semver calculator][semver-calc].\n\n### Example\n\n```json\n\n\"dependencies\": {\n  \"my_dep\": \"^1.0.0\",\n  \"another_dep\": \"~2.2.0\"\n},\n```\n\n## Resources\n\n<iframe src=\"https://www.youtube.com/embed/kK4Meix58R4\" frameborder=\"0\" allowfullscreen></iframe>\n\n\n[semver-calc]: https://semver.npmjs.com/\n[pkg-json]: creating-a-package-json-file\n[semver-org]: http://semver.org/\n[semver-video]: https://www.youtube.com/embed/kK4Meix58R4\n"},{"id":"37558650-3014-5356-a5e5-fd38dac4e8a6","frontmatter":{"title":"Adding dist-tags to packages"},"rawBody":"---\ntitle: Adding dist-tags to packages\nredirect_from:\n  - /getting-started/using-tags/\n---\n\nDistribution tags (dist-tags) are human-readable labels that you can use to organize and label different versions of packages you publish. dist-tags supplement [semantic versioning][semver]. In addition to being more human-readable than semantic version numbering, tags allow publishers to distribute their packages more effectively.\n\nFor more information, see the [`dist-tag` CLI documentation][dist-tag].\n\n<Note>\n\n**Note:** Since dist-tags share a namespace with semantic versions, avoid dist-tags that conflict with existing version numbers. We recommend avoiding dist-tags that start with a number or the letter \"v\".\n\n</Note>\n\n## Publishing a package with a dist-tag\n\nBy default, running `npm publish` will tag your package with the `latest` dist-tag. To use another dist-tag, use the `--tag` flag when publishing.\n\n1. On the command line, navigate to the root directory of your package.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. Run the following command, replacing `<tag>` with the tag you want to use:\n\n   ```\n   npm publish --tag <tag>\n   ```\n\n### Example\n\nTo publish a package with the \"beta\" dist-tag, on the command line, run the following command in the root directory of your package:\n\n```\nnpm publish --tag beta\n```\n\n## Adding a dist-tag to a specific version of your package\n\n1. On the command line, navigate to the root directory of your package.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. Run the following command, replacing `<package_name>` with the name of your package, `<version>` with your package version number, and `<tag>` with the distribution tag:\n\n   ```\n   npm dist-tag add <package-name>@<version> [<tag>]\n   ```\n\n### Example\n\nTo add the \"stable\" tag to the 1.4.0 version of the \"example-package\" package, you would run the following command:\n\n```\nnpm dist-tag add example-package@1.4.0 stable\n```\n\n\n[semver]: about-semantic-versioning\n[dist-tag]: /cli/dist-tag\n"},{"id":"233012ba-94cb-56c7-bd1e-2fe6e89c78a1","frontmatter":{"title":"Creating a package.json file"},"rawBody":"---\ntitle: Creating a package.json file\nredirect_from:\n  - /about-package-json-and-package-lock-json-files\n  - /getting-started/using-a-package.json\n---\n\nYou can add a `package.json` file to your package to make it easy for others to manage and install. Packages published to the registry must contain a `package.json` file.\n\nA `package.json` file:\n\n* lists the packages your project depends on\n* specifies versions of a package that your project\ncan use using [semantic versioning rules][semver]\n* makes your build reproducible, and therefore easier\nto share with other developers\n\n<Note>\n\n**Note:** To make your package easier to find on the npm website, we recommend including a custom `description` in your `package.json` file.\n\n</Note>\n\n## `package.json` fields\n\n### Required `name` and `version` fields\n\nA `package.json` file must contain `\"name\"` and `\"version\"` fields.\n\nThe `\"name\"` field contains your package's name, and must be lowercase and one word, and may contain hyphens and underscores.\n\nThe `\"version\"` field must be in the form `x.x.x` and follow the [semantic versioning guidelines][semver].\n\n### Author field\n\nIf you want to include package author information in `\"author\"` field, use the following format (email and website are both optional):\n\n```\nYour Name <email@example.com> (http://example.com)\n```\n\n### Example\n\n```\n{\n  \"name\": \"my-awesome-package\",\n  \"version\": \"1.0.0\"\n}\n```\n\n## Creating a new `package.json` file\n\nYou can create a `package.json` file by running a CLI questionnaire or  creating a default `package.json` file.\n\n### Running a CLI questionnaire\n\nTo create a `package.json` file with values that you supply, use the `npm init` command.\n\n1. On the command line, navigate to the root directory of your package.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. Run the following command:\n\n   ```\n   npm init\n   ```\n\n3. Answer the questions in the command line questionnaire.\n\n#### Customizing the `package.json` questionnaire\n\nIf you expect to create many `package.json` files, you can customize the questions asked and fields created during the `init` process so all the `package.json` files contain a standard set of information.\n\n\n1. In your home directory, create a file called `.npm-init.js`.\n\n2. To add custom questions, using a text editor, add questions with the `prompt` function:\n\n   ```\n   module.exports = prompt(\"what's your favorite flavor of ice cream, buddy?\", \"I LIKE THEM ALL\");\n   ```\n\n3. To add custom fields, using a text editor, add desired fields to the `.npm-init.js` file:\n\n   ```\n   module.exports = {\n     customField: 'Example custom field',\n     otherCustomField: 'This example field is really cool'\n   }\n   ```\n\nTo learn more about creating advanced `npm init` customizations, see the [init-package-json][init-pkg-json] GitHub repository.\n\n### Creating a default `package.json` file\n\nTo create a default `package.json` using information extracted from the current directory, use the `npm init` command with the `--yes`\nor `-y` flag. For a list of default values, see \"[Default values extracted from the current directory](#default-values-extracted-from-the-current-directory)\".\n\n1. On the command line, navigate to the root directory of your package.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. Run the following command:\n\n   ```\n   npm init --yes\n   ```\n\n#### Example\n\n```\n> npm init --yes\nWrote to /home/monatheoctocat/my_package/package.json:\n\n{\n  \"name\": \"my_package\",\n  \"description\": \"\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/monatheoctocat/my_package.git\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"bugs\": {\n    \"url\": \"https://github.com/monatheoctocat/my_package/issues\"\n  },\n  \"homepage\": \"https://github.com/monatheoctocat/my_package\"\n}\n```\n\n#### Default values extracted from the current directory\n\n  - `name`: the current directory name\n  - `version`: always `1.0.0`\n  - `description`: info from the README, or an empty string `\"\"`\n  - `scripts`: by default creates an empty `test` script\n  - `keywords`: empty\n  - `author`: empty\n  - `license`: [`ISC`][isc-license]\n  - `bugs`: information from the current directory, if present\n  - `homepage`: information from the current directory, if present\n\n### Setting config options for the init command\n\nYou can set default config options for the init command. For example, to set the default author email, author name, and license, on the command line, run the following commands:\n\n```\n> npm set init-author-email \"example-user@example.com\"\n> npm set init-author-name \"example_user\"\n> npm set init-license \"MIT\"\n```\n\n[semver]: about-semantic-versioning\n[init-pkg-json]: https://github.com/npm/init-package-json\n[isc-license]: https://opensource.org/licenses/ISC\n"},{"id":"d99e4216-f95b-5f5c-ad70-73e79e1e12ac","frontmatter":{"title":"Creating and publishing private packages"},"rawBody":"---\ntitle: Creating and publishing private packages\nredirect_from:\n  - /private-modules/intro\n---\nimport shared from '../../../src/shared.js'\n\nTo share your code with a limited set of users or teams, you can publish private user-scoped or organization-scoped packages to the npm registry.\n\nFor more information on scopes and private packages, see \"[About scopes][scopes]\" and \"[About private packages][private-pkgs]\".\n\n<Note>\n\n**Note:** Before you can publish private user-scoped npm packages, you must <a href=\"https://npmjs.com/signup\">sign up</a> for a paid npm user account.\n\nAdditionally, to publish private organization-scoped packages, you must <a href=\"https://npmjs.com/signup\">create an npm user account</a>, then <a href=\"https://www.npmjs.com/signup?next=/org/create\">\ncreate a paid npm organization</a>.\n\n</Note>\n\n## Creating a private package\n\n1. If you are using npmrc to [manage accounts on multiple registries][reg-config], on the command line, switch to the appropriate profile:\n\n    ```\n    npmrc <profile-name>\n    ```\n\n2. On the command line, create a directory for your package:\n\n    ```\n    mkdir my-test-package\n    ```\n\n3. Navigate to the root directory of your package:\n\n    ```\n    cd my-test-package\n    ```\n\n4. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:\n\n    ```\n    git init\n    git remote add origin git://git-remote-url\n    ```\n\n5. In the package root directory, run the `npm init` command and pass the scope to the `scope` flag:\n\n   * For an organization-scoped package, replace `my-org` with the name of your organization:\n     ```\n     npm init --scope=@my-org\n     ```\n\n   * For a user-scoped package, replace `my-username` with your username:\n     ```\n     npm init --scope=@my-username\n     ```\n\n6. Respond to the prompts to generate a <a href=\"https://docs.npmjs.com/about-package-json-and-package-lock-json-files\">`package.json`</a> file. For help naming your package, see \"[Package name guidelines][pkg-name]\".\n\n7. Create a [README file][readme-file] that explains what your package code is and how to use it.\n\n8. In your preferred text editor, write the code for your package.\n\n## Reviewing package contents for sensitive or unnecessary information\n\nPublishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.** Even if your package is private, sensitive information can be exposed if the package is made public or downloaded to a computer that can be accessed by more users than intended.\n\nFor less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].\n\n## Testing your package\n\nTo reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:\n\n```\nnpm install my-package\n```\n\n## Publishing private packages\n\nBy default, scoped packages are published with private visibility.\n\n1. On the command line, navigate to the root directory of your package.\n\n   ```\n   cd /path/to/package\n   ```\n\n2. To publish your private package to the npm registry, run:\n\n   ```\n   npm publish\n   ```\n\n3. To see your private package page, visit https://npmjs.com/package/*package-name*, replacing *package-name* with the name of your package. Private packages will say `private` below the package name on the npm website.\n\n   <>{shared['organization-package-private'].image}</>\n\nFor more information on the `publish` command, see the [CLI documentation][cli-publish].\n\n[scopes]: about-scopes\n[private-pkgs]: about-private-packages\n[user-signup]: https://www.npmjs.com/signup\n[create-org]: https://www.npmjs.com/signup?next=/org/create\n[pkg-name]: package-name-guidelines\n[readme-file]: about-package-readme-files\n[developers]: /misc/developers#keeping-files-out-of-your-package\n[cli-publish]: /cli/publish\n[reg-config]: configuring-your-registry-settings-as-an-npm-enterprise-user#using-npmrc-to-manage-multiple-profiles-for-different-registries\n"},{"id":"f60de04f-5cf2-5aa6-88f3-99d8c030e19e","frontmatter":{"title":"Creating and publishing scoped public packages"},"rawBody":"---\ntitle: Creating and publishing scoped public packages\n---\nimport shared from '../../../src/shared.js'\n\nTo share your code publicly in a user or organization namespace, you can publish public user-scoped or organization-scoped packages to the npm registry.\n\nFor more information on scopes, see \"[About scopes][scopes]\".\n\n<Note>\n\n**Note:** Before you can publish user-scoped npm packages, you must <a href=\"https://www.npmjs.com/signup\">sign up</a> for an npm user account.\n\nAdditionally, to publish organization-scoped packages, you must <a href=\"https://www.npmjs.com/signup\">create an npm user account</a>, then <a href=\"https://www.npmjs.com/signup?next=/org/create\">create an npm organization</a>.\n\n</Note>\n\n## Creating a scoped public package\n\n1. If you are using npmrc to [manage accounts on multiple registries][reg-config], on the command line, switch to the appropriate profile:\n\n    ```\n    npmrc <profile-name>\n    ```\n\n2. On the command line, create a directory for your package:\n\n    ```\n    mkdir my-test-package\n    ```\n\n3. Navigate to the root directory of your package:\n\n    ```\n    cd my-test-package\n    ```\n\n4. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:\n\n    ```\n    git init\n    git remote add origin git://git-remote-url\n    ```\n\n5. In the package root directory, run the `npm init` command and pass the scope to the `scope` flag:\n\n   * For an organization-scoped package, replace `my-org` with the name of your organization:\n     ```\n     npm init --scope=@my-org\n     ```\n\n   * For a user-scoped package, replace `my-username` with your username:\n     ```\n     npm init --scope=@my-username\n     ```\n\n6. Respond to the prompts to generate a <a href=\"https://docs.npmjs.com/about-package-json-and-package-lock-json-files\">`package.json`</a> file. For help naming your package, see \"[Package name guidelines][pkg-name]\".\n7. Create a [README file][readme-file] that explains what your package code is and how to use it.\n8. In your preferred text editor, write the code for your package.\n\n## Reviewing package contents for sensitive or unnecessary information\n\nPublishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.**\n\nFor less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].\n\n## Testing your package\n\nTo reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:\n\n```\nnpm install my-package\n```\n\n## Publishing scoped public packages\n\nBy default, scoped packages are published with private visibility. To publish a scoped package with public visibility, use `npm publish --access public`.\n\n1. On the command line, navigate to the root directory of your package.\n\n    ```\n    cd /path/to/package\n    ```\n\n2. To publish your scoped public package to the npm registry, run:\n\n    ```\n    npm publish --access public\n    ```\n\n3. To see your public package page, visit https://npmjs.com/package/\\*package-name\\*, replacing \\*package-name\\* with the name of your package. Public packages will say `public` below the package name on the npm website.\n\n   <>{shared['organization-package-public'].image}</>\n\nFor more information on the `publish` command, see the [CLI documentation][cli-publish].\n\n\n[scopes]: about-scopes\n[user-signup]: https://www.npmjs.com/signup\n[create-org]: https://www.npmjs.com/signup?next=/org/create\n[reg-config]: configuring-your-registry-settings-as-an-npm-enterprise-user\n[pkg-name]: package-name-guidelines\n[readme-file]: about-package-readme-files\n[developers]: /misc/developers#keeping-files-out-of-your-package\n[cli-publish]: /cli/publish\n[pii]: https://en.wikipedia.org/wiki/Personally_identifiable_information\n"},{"id":"eabc01d0-cc01-5360-a41a-b7c5b9b5da7b","frontmatter":{"title":"Creating and publishing unscoped public packages"},"rawBody":"---\ntitle: Creating and publishing unscoped public packages\n---\n\nAs an npm user, you can create unscoped packages to use in your own projects and publish them to the npm public registry for others to use in theirs. Unscoped packages are always public and are referred to by the package name only:\n\n```\npackage-name\n```\n\nFor more information on package scope, access, and visibility, see \"[Package scope, access level, and visibility][pkg-viz]\".\n\n<Note>\n\n**Note:** Before you can publish public unscoped npm packages, you must <a href=\"https://www.npmjs.com/signup\">sign up</a> for an npm user account.\n\n</Note>\n\n## Creating an unscoped public package\n\n1. On the command line, create a directory for your package:\n\n    ```\n    mkdir my-test-package\n    ```\n\n2. Navigate to the root directory of your package:\n\n    ```\n    cd my-test-package\n    ```\n\n3. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:\n\n    ```\n    git init\n    git remote add origin git://git-remote-url\n    ```\n\n4. In the package root directory, run the `npm init` command.\n5. Respond to the prompts to generate a <a href=\"https://docs.npmjs.com/about-package-json-and-package-lock-json-files\">`package.json`</a> file. For help naming your package, see \"[Package name guidelines][pkg-name]\".\n6. Create a [README file][readme-file] that explains what your package code is and how to use it.\n7. In your preferred text editor, write the code for your package.\n\n## Reviewing package contents for sensitive or unnecessary information\n\nPublishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.**\n\nFor less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].\n\n## Testing your package\n\nTo reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:\n\n```\nnpm install my-package\n```\n\n## Publishing unscoped public packages\n\n1. On the command line, navigate to the root directory of your package.\n\n    ```\n    cd /path/to/package\n    ```\n\n2. To publish your public package to the npm registry, run:\n\n    ```\n    npm publish\n    ```\n\n3. To see your public package page, visit https://npmjs.com/package/*package-name*, replacing *package-name* with the name of your package. Public packages will say `public` below the package name on the npm website.\n\nFor more information on the `publish` command, see the [CLI documentation][cli-publish].\n\n\n[pkg-viz]: package-scope-access-level-and-visibility\n[user-signup]: https://www.npmjs.com/signup\n[create-org]: https://www.npmjs.com/signup?next=/org/create\n[pkg-name]: package-name-guidelines\n[readme-file]: about-package-readme-files\n[developers]: /misc/developers#keeping-files-out-of-your-package\n[cli-publish]: /cli/publish\n[pii]: https://en.wikipedia.org/wiki/Personally_identifiable_information\n"},{"id":"fdcd1921-0305-52ea-8756-68aee89ea71e","frontmatter":{"title":"Creating Node.js modules"},"rawBody":"---\ntitle: Creating Node.js modules\nredirect_from:\n  - /getting-started/creating-node-modules\n---\n\nNode.js modules are a type of [package][about-pkgs] that can be published to npm.\n\n## Overview\n\n1. [Create a `package.json` file](#create-a-package-json-file)\n2. [Create the file that will be loaded when your module is required by another application](#create-the-file-that-will-be-loaded-when-your-module-is-required-by-another-application)\n3. [Test your module](#test-your-module)\n\n## Create a `package.json` file\n\n1. To create a `package.json` file, on the command line, in the root directory of your Node.js module, run `npm init`:\n   - For [scoped modules][scoped-pkg], run `npm init --scope=@scope-name`\n   - For [unscoped modules][unscoped-pkg], run `npm init`\n2. Provide responses for the required fields (`name` and `version`), as well as the `main` field:\n   - `name`: The name of your module.\n   - `version`: The initial module version. We recommend following [semantic versioning guidelines][semver] and starting with `1.0.0`.\n\nFor more information on `package.json` files, see \"[Creating a package.json file][creating-pkg-json]\".\n\n## Create the file that will be loaded when your module is required by another application\n\n\nIn the file, add a function as a property of the `exports` object. This will make the function available to other code:\n\n```\nexports.printMsg = function() {\n  console.log(\"This is a message from the demo package\");\n}\n```\n\n## Test your module\n\n1. Publish your package to npm:\n\n   - For [private packages][priv-pkg-pub] and [unscoped packages][unscoped-pkg-pub], use `npm publish`.\n   - For [scoped public packages][scoped-pkg-pub], use `npm publish --access public`\n\n2. On the command line, create a new test directory outside of your project directory.\n\n   ```\n   mkdir test-directory\n   ```\n\n3. Switch to the new directory:\n\n   ```\n   cd /path/to/test-directory\n   ```\n\n4. In the test directory, install your module:\n\n   ```\n   npm install <your-module-name>\n   ```\n\n5. In the test directory, create a `test.js` file which requires your module and calls your module as a method.\n\n6. On the command line, run `node test.js`. The message sent to the console.log should appear.\n\n## Resources\n\n<iframe src=\"https://www.youtube.com/embed/3I78ELjTzlQ\" frameborder=\"0\" allowfullscreen></iframe>\n\n\n[about-pkgs]: about-packages-and-modules\n[scoped-pkg]: about-scopes\n[unscoped-pkg]: creating-and-publishing-unscoped-public-packages\n[semver]: about-semantic-versioning\n[creating-pkg-json]: creating-a-package-json-file\n[priv-pkg-pub]: creating-and-publishing-private-packages#publishing-private-packages\n[unscoped-pkg-pub]: creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages\n[scoped-pkg-pub]: creating-and-publishing-scoped-public-packages#publishing-scoped-public-packages\n"},{"id":"80254e39-35b3-5d35-857a-d58e7e7b37b7","frontmatter":{"title":"Contributing packages to the registry"},"rawBody":"---\ntitle: Contributing packages to the registry\nredirect_from: [ /getting-started/publishing-npm-packages ]\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"7649271c-dacc-5c62-9a3d-a0b654eae11a","frontmatter":{"title":"Package name guidelines"},"rawBody":"---\ntitle: Package name guidelines\n---\n\nWhen choosing a name for your package, choose a name that\n\n- is unique\n- is descriptive\n- meets [npm policy guidelines][policies]. For example, do not give your package an offensive name, and do not use someone else's trademarked name or violate the [npm trademark policy][npm-trademark].\n\nAdditionally, when choosing a name for an [**unscoped** package][create-unscoped], also choose a name that\n\n- is not already owned by someone else\n- is not spelled in a similar way to another package name\n- will not confuse others about authorship\n\n\n[policies]: https://www.npmjs.com/policies\n[npm-trademark]: https://www.npmjs.com/policies/trademark#the-npm-trademark-policy\n[create-unscoped]: creating-and-publishing-unscoped-public-packages\n"},{"id":"431e9df4-2a18-51a9-9f1b-84cb07f0d2ff","frontmatter":{"title":"Specifying dependencies and devDependencies in a package.json file"},"rawBody":"---\ntitle: Specifying dependencies and devDependencies in a package.json file\n---\n\nTo specify the packages your project depends on, you must\nlist them as `\"dependencies\"` or `\"devDependencies\"` in your package's [`package.json`][pkg-json] file. When you (or another user) run `npm install`, npm will download dependencies and devDependencies that are listed in `package.json` that meet the [semantic version][semver] requirements listed for each. To see which versions of a package will be installed, use the [semver calculator][semver-calc].\n\n- `\"dependencies\"`: Packages required by your application in production.\n- `\"devDependencies\"`: Packages that are only needed for local development and testing.\n\n## Adding dependencies to a `package.json` file\n\nYou can add dependencies to a `package.json` file from the command line or by manually editing the `package.json` file.\n\n### Adding dependencies to a `package.json` file from the command line\n\nTo add dependencies and devDependencies to a `package.json` file from the command line, you can install them in the root directory of your package using the `--save-prod` flag for dependencies (the default behavior of `npm install`) or the `--save-dev` flag for devDependencies.\n\nTo add an entry to the `\"dependencies\"` attribute of a `package.json` file, on the command line, run the following command:\n\n```\nnpm install <package-name> [--save-prod]\n```\n\nTo add an entry to the `\"devDependencies\"` attribute of a `package.json` file, on the command line, run the following command:\n\n```\nnpm install <package-name> --save-dev\n```\n\n### Manually editing the `package.json` file\n\nTo add dependencies to a `package.json` file, in a text editor, add an attribute called `\"dependencies\"` that references the name and [semantic version][semver] of each dependency:\n\n```\n{\n  \"name\": \"my_package\",\n  \"version\": \"1.0.0\",\n  \"dependencies\": {\n    \"my_dep\": \"^1.0.0\",\n    \"another_dep\": \"~2.2.0\"\n  }\n}\n```\n\nTo add devDependencies to a `package.json` file, in a text editor, add an attribute called `\"devDependencies\"` that references the name and [semantic version][semver] of each devDependency:\n\n```\n\"name\": \"my_package\",\n\"version\": \"1.0.0\",\n\"dependencies\": {\n  \"my_dep\": \"^1.0.0\",\n  \"another_dep\": \"~2.2.0\"\n},\n\"devDependencies\" : {\n  \"my_test_framework\": \"^3.1.0\".\n  \"another_dev_dep\": \"1.0.0 - 1.2.0\"\n}\n```\n\n[pkg-json]: creating-a-packge-json-file\n[semver]: about-semantic-versioning\n[semver-calc]: https://semver.npmjs.com/\n"},{"id":"86f67d67-59ed-5978-91b8-2abb00bd0462","frontmatter":{"title":"Downloading and installing packages globally"},"rawBody":"---\ntitle: Downloading and installing packages globally\nredirect_from:\n  - /getting-started/installing-npm-packages-globally\n---\n\n<Note>\n\n**Tip:** If you are using npm 5.2 or higher, we recommend using `npx` to run packages globally.\n\n</Note>\n\n[Installing][cli-install] a package globally allows you to use the code in the package as a set of tools on your local computer.\n\nTo download and install packages globally, on the command line, run the following command:\n\n```\nnpm install -g <package_name>\n```\n\nIf you get an EACCES permissions error, you may need to reinstall npm with a version manager or manually change npm's default directory. For more information, see \"[Resolving EACCES permissions errors when installing packages globally][perm-errors]\".\n\n\n[cli-install]: /cli/install\n[perm-errors]: resolving-eacces-permissions-errors-when-installing-packages-globally\n"},{"id":"731d5d33-7975-5aa7-80b1-7c30eefbf445","frontmatter":{"title":"Downloading and installing packages locally"},"rawBody":"---\ntitle: Downloading and installing packages locally\nredirect_from:\n  - /downloading-and-installing-packages\n  - /getting-started/installing-npm-packages-locally\n---\n\nYou can [install][cli-install] a package locally if you want to depend on the package from your own module, using something like Node.js `require`. This is `npm install`'s default behavior.\n\n## Installing an unscoped package\n\nUnscoped packages are always public, which means they can be searched for, downloaded, and installed by anyone. To install a public package, on the command line, run\n\n```\nnpm install <package_name>\n```\n\nThis will create the `node_modules` directory in your current directory (if one doesn't exist yet) and will download the package to that directory.\n\n<Note>\n\n**Note:** If there is no `package.json` file in the local directory, the latest version of the package is installed.\n\nIf there is a `package.json` file, npm installs the latest version that satisfies the [semver rule](about-semantic-versioning) declared in `package.json`.\n\n</Note>\n\n## Installed a scoped public package\n\n[Scoped public packages][scoped-public-pkg] can be downloaded and installed by anyone, as long as the scope name is referenced during installation:\n\n```\nnpm install @scope/package-name\n```\n\n## Installing a private package\n\n[Private packages][private-pkg] can only be downloaded and installed by those who have been granted read access to the package. Since private packages are always scoped, you must reference the scope name during installation:\n\n```\nnpm install @scope/private-package-name\n```\n\n## Testing package installation\n\nTo confirm that `npm install` worked correctly, in your module directory, check that a `node_modules` directory exists and that it contains a directory for the package(s) you installed:\n\n```\nls node_modules\n```\n\n## Installed package version\n\nIf there is a `package.json` file in the directory in which `npm install` is run, npm installs the latest version of the package that satisfies the [semantic versioning rule][semver] declared in `package.json`.\n\nIf there is no `package.json` file, the latest version of the package is installed.\n\n## Installing a package with dist-tags\n\nLike `npm publish`, `npm install <package_name>` will use the `latest` tag by default.\n\nTo override this behavior, use `npm install <package_name>@<tag>`. For example, to install the `example-package` at the version tagged with `beta`, you would run the following command:\n\n```\nnpm install example-package@beta\n```\n\n## Resources\n\n<iframe src=\"https://www.youtube.com/embed/JDSfqFFbNYQ\" frameborder=\"0\" allowfullscreen></iframe>\n\n\n[scoped-public-pkg]: about-scopes\n[private-pkg]: about-private-packages\n[cli-install]: /cli-documentation/install\n[semver]: about-semantic-versioning\n"},{"id":"84e0994f-cac8-519c-bb23-29b12eef7d5a","frontmatter":{"title":"Getting packages from the registry"},"rawBody":"---\ntitle: Getting packages from the registry\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"33219d4f-238c-5066-a1fe-8fb3d957961b","frontmatter":{"title":"Resolving EACCES permissions errors when installing packages globally"},"rawBody":"---\ntitle: Resolving EACCES permissions errors when installing packages globally\nredirect_from:\n  - /getting-started/fixing-npm-permissions\n---\n\nIf you see an `EACCES` error when you try to [install a package globally][global-install], you can either:\n\n- Reinstall npm with a node version manager (recommended),\n\n  **or**\n\n- Manually change npm's default directory\n\n## Reinstall npm with a node version manager\n\nThis is the best way to avoid permissions issues. To reinstall npm with a node version manager, follow the steps in \"[Downloading and installing Node.js and npm][install-npm]\". You do not need to remove your current version of npm or Node.js before installing a node version manager.\n\n## Manually change npm's default directory\n\n<Note>\n\n**Note:** This section does not apply to Microsoft Windows.\n\n</Note>\n\nTo minimize the chance of permissions errors, you can configure npm to use a different directory. In this example, you will create and use hidden directory in your home directory.\n\n1. Back up your computer.\n\n2. On the command line, in your home directory, create a directory for global installations:\n\n    ```\n    mkdir ~/.npm-global\n    ```\n\n3. Configure npm to use the new directory path:\n\n   ```\n   npm config set prefix '~/.npm-global'\n   ```\n\n4. In your preferred text editor, open or create a `~/.profile` file and add this line:\n\n    ```\n    export PATH=~/.npm-global/bin:$PATH\n    ```\n\n5. On the command line, update your system variables:\n\n    ```\n    source ~/.profile\n    ```\n\n6. To test your new configuration, install a package globally without using `sudo`:\n\n    ```\n    npm install -g jshint\n    ```\n\nInstead of steps 2-4, you can use the corresponding ENV variable (e.g. if you don't want to modify `~/.profile`):\n\n```\nNPM_CONFIG_PREFIX=~/.npm-global\n```\n\n<Note>\n\n**npx: an alternative to running global commands**\n\nIf you are using npm version 5.2 or greater, you may want to consider [npx](https://www.npmjs.com/package/npx) as an alternative way to run global commands, especially if you only need a command occasionally. For more information, see [this article about npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b).\n\n</Note>\n\n[global-install]: downloading-and-installing-packages-globally\n[install-npm]: downloading-and-installing-node-js-and-npm\n[npx]: https://www.npmjs.com/package/npx\n[npx-article]: https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b\n"},{"id":"522d1fa1-fe39-5e2e-941e-e24cdc81f4a3","frontmatter":{"title":"Searching for and choosing packages to download"},"rawBody":"---\ntitle: Searching for and choosing packages to download\nredirect_from:\n  - /getting-started/searching-for-packages\n---\n\nYou can use the npm search bar to find packages to use in your projects. npm search uses npms and the npms analyzer; for more information on both, see https://npms.io/about.\n\n## Searching for a package\n\n1. In the search bar, type a search term and press **Enter**. As you type, possible choices will appear.\n\n   <Screenshot src=\"/packages-and-modules/getting-packages-from-the-registry/search-qr.png\" alt=\"Screenshot of a search text box\" />\n   <Screenshot src=\"/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png\" alt=\"Screenshot of the search text box and search results\" />\n\n2. To list packages ranked according to [package search rank criteria](#package-search-rank-criteria), in the left sidebar, under \"Sort packages\", click the criterion. For example, to sort packages by popularity, click \"Popularity\".\n\n3. In the package search results list, click the name of the package.\n\n## Package search rank criteria\n\nOften, there are dozens or even hundreds of packages with similar names and/or similar purposes. To help you decide the best ones to explore, each package has been ranked according to four criteria using the npms analyzer:\n\n### Popularity\n\nPopularity indicates how many times the package has been downloaded. This is a strong indicator of packages that others have found to be useful.\n\n### Quality\n\nQuality includes considerations such as the presence of a README file, stability, tests, up-to-date dependencies, custom website, and code complexity.\n\n### Maintenance\n\nMaintenance ranks packages according to the attention they are given by developers. More frequently maintained packages are more likely to work well with the current or upcoming versions of the npm CLI, for example.\n\n### Optimal\n\nOptimal combines the other three criteria (popularity, quality, maintenance) into one score in a meaningful way.\n"},{"id":"7d9d9535-012a-567c-8176-6c7b94ff4266","frontmatter":{"title":"Uninstalling packages and dependencies"},"rawBody":"---\ntitle: Uninstalling packages and dependencies\nredirect_from:\n  - /getting-started/uninstalling-local-packages\n  - /getting-started/uninstalling-global-packages\n---\n\nIf you no longer need to use a package in your code, we recommend uninstalling it and removing it from your project's dependencies.\n\n## Uninstalling local packages\n\n### Removing a local package from your node_modules directory\n\nTo remove a package from your node_modules directory, on the command line, use the [`uninstall` command][cli-uninstall]. Include the scope if the package is scoped.\n\nThis uninstalls a package, completely removing everything npm installed on its behalf.\n\nIt also removes the package from the dependencies, devDependencies, optionalDependencies, and peerDependencies objects in your package.json.\n\nFurther, if you have an npm-shrinkwrap.json or package-lock.json, npm will update those files as well.\n\n#### Unscoped package\n\n```\nnpm uninstall <package_name>\n\n```\n\n#### Scoped package\n\n```\nnpm uninstall <@scope/package_name>\n```\n\n### Example\n\n```\nnpm uninstall lodash\n```\n\n### Removing a local package without removing it from package.json\n\nUsing the `--no-save` will tell npm not to remove the package from your `package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files.\n\n### Example\n\n```\nnpm uninstall --no-save lodash\n```\n\n<Note>\n\n`--save` or `-S` will tell npm to remove the package from your `package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files. **This is the default**, but you may need to use this if you have for instance `save=false` in your `.npmrc` file.\n\n</Note>\n\n### Confirming local package uninstallation\n\nTo confirm that `npm uninstall` worked correctly, check that the `node_modules` directory no longer contains a directory for the uninstalled package(s).\n\n- Unix system (such as OSX): `ls node_modules`\n- Windows systems: `dir node_modules`\n\n## Uninstalling global packages\n\nTo uninstall an unscoped global package, on the command line, use the `uninstall` command with the `-g` flag. Include the scope if the package is scoped.\n\n### Unscoped package\n\n```\nnpm uninstall -g <package_name>\n```\n\n### Scoped package\n\n```\nnpm uninstall -g <@scope/package_name>\n```\n\n### Example\n\nFor example, to uninstall a package called `jshint`, run:\n\n```\nnpm uninstall -g jshint\n```\n\n## Resources\n\n### Uninstalling local packages\n\n<iframe src=\"https://www.youtube.com/embed/Z-BpYj6cSoQ\" frameborder=\"0\" allowfullscreen></iframe>\n\n### Uninstalling global packages\n\n<iframe src=\"https://www.youtube.com/embed/XbvjZxUZJGg\" frameborder=\"0\" allowfullscreen></iframe>\n\n\n[cli-uninstall]: /cli/uninstall\n"},{"id":"390e337e-8228-5443-a962-b4ef05b9c599","frontmatter":{"title":"Updating packages downloaded from the registry"},"rawBody":"---\ntitle: Updating packages downloaded from the registry\nredirect_from:\n  - /getting-started/updating-local-packages\n  - /getting-started/updating-global-packages\n---\n\nUpdating local and global packages you downloaded from the registry helps keep your code and tools stable, usable, and secure.\n\n## Updating local packages\n\nWe recommend regularly updating the local packages your project depends on to improve your code as improvements to its dependencies are made.\n\n1. Navigate to the root directory of your project and ensure it contains a `package.json` file:\n\n   ```\n   cd /path/to/project\n   ```\n\n2. In your project root directory, run the [`update` command][npm-update]:\n\n   ```\n   npm update\n   ```\n\n3. To test the update, run the [`outdated` command][npm-outdated]. There should not be any output.\n\n   ```\n   npm outdated\n   ```\n\n## Updating globally-installed packages\n\n<Note>\n\n**Note:** If you are using npm version 2.6.0 or less, run [this script](https://gist.github.com/othiym23/4ac31155da23962afd0e) to update all outdated global packages.\n\nHowever, please consider upgrading to the latest version of npm:\n\n```\nnpm install npm@latest -g\n```\n\n</Note>\n\n### Determining which global packages need updating\n\nTo see which global packages need to be updated, on the command line, run:\n\n```\nnpm outdated -g --depth=0\n```\n\n### Updating a single global package\n\nTo update a single global package, on the command line, run:\n\n```\nnpm update -g <package_name>\n```\n\n### Updating all globally-installed packages\n\nTo update all global packages, on the command line, run:\n\n```\nnpm update -g\n```\n\n## Resources\n\n<iframe src=\"https://www.youtube.com/embed/HRudtPGcOt4\" frameborder=\"0\" allowfullscreen></iframe>\n\n### CLI commands\n\n- [npm-update](/cli/update)\n- [npm-outdated](/cli/outdated)\n\n\n[npm-update]: /cli/update\n[npm-outdated]: /cli/outdated\n"},{"id":"a2a0ad87-15c1-533a-b4b9-da7c74650bd0","frontmatter":{"title":"Using deprecated packages"},"rawBody":"---\ntitle: Using deprecated packages\n---\n\nIf you install a package, and it prints a deprecation message, we recommend following the instructions, if possible.\n\nThat might mean updating to a new version, or updating your package dependencies.\n\n<Screenshot src=\"/packages-and-modules/getting-packages-from-the-registry/package-deprecated.png\" alt=\"Screenshot of a deprecated package showing that it is no longer supported\" />\n\nA deprecation message doesn't always mean the package or version is unusable; it may mean the package is unmaintained and will no longer be updated by the publisher.\n"},{"id":"f2d08035-ab85-5ded-8de9-7c5379e530b3","frontmatter":{"title":"About public packages"},"rawBody":"---\ntitle: About public packages\n---\n\nAs an npm user or organization member, you can create and publish public packages that anyone can download and use in their own projects.\n\n* **Unscoped** public packages exist in the global public registry namespace and can be referenced in a `package.json` file with the package name alone: `package-name`.\n* **Scoped** public packages belong to a user or organization and must be preceded by the user or organization name when included as a dependency in a `package.json` file:\n  * `@username/package-name`\n  * `@org-name/package-name`\n\n## Next steps\n\n* \"[Creating and publishing scoped public packages][create-scoped-pkg]\"\n* \"[Creating and publishing unscoped public packages][create-unscoped-pkg]\"\n* \"[Using npm packages in your projects][use-pkg]\"\n\n\n[create-scoped-pkg]: creating-and-publishing-scoped-public-packages\n[create-unscoped-pkg]: creating-and-publishing-unscoped-public-packages\n[use-pkg]: using-npm-packages-in-your-projects\n"},{"id":"fe6412d3-c106-5594-9a4f-cfec15480ace","frontmatter":{"title":"About scopes"},"rawBody":"---\ntitle: About scopes\nredirect_from:\n  - /getting-started/scoped-packages\n---\n\n<div class=\"note\">\n\n<span class=\"bold\">Note:</span> You must be using npm version 2 or greater to use scopes. To upgrade to the latest version of npm, on the command line, run <code class=\"highlighter-rouge\">npm install npm@latest -g</code>\n\n</div>\n\nWhen you sign up for an npm user account or create an organization, you are granted a scope that matches your user or organization name. You can use this scope as a namespace for related packages.\n\nA scope allows you to create a package with the same name as a package created by another user or organization without conflict.\n\nWhen listed as a dependent in a `package.json` file, scoped packages are preceded by their scope name. The scope name is everything between the `@` and the slash:\n\n* **\"npm\" scope:**\n```\n@npm/package-name\n```\n* **\"npmcorp\" scope:**\n```\n@npmcorp/package-name\n```\n\nTo create and publish public scoped packages, see \"[Creating and publishing scoped public packages][create-public-pkg]\".\n\nTo create and publish private scoped packages, see \"[Creating and publishing private packages][create-private-pkg]\".\n\n## Scopes and package visibility\n\n- Unscoped packages are always public.\n- [Private packages][about-priv-pkg] are always scoped.\n- Scoped packages are private by default; you must pass a command-line flag when publishing to make them public.\n\nFor more information on package scope and visibility, see \"[Package scope, access level, and visibility][pkg-viz]\".\n\n\n[create-public-pkg]: creating-and-publishing-scoped-public-packages\n[create-private-pkg]: creating-and-publishing-private-packages\n[about-priv-pkg]: about-private-packages\n[pkg-viz]: package-scope-access-level-and-visibility\n"},{"id":"a2192793-60a8-5837-9b0d-2ed914761f97","frontmatter":{"title":"About the public npm registry"},"rawBody":"---\ntitle: About the public npm registry\n---\n\nThe public npm registry is a database of JavaScript packages, each comprised of software and metadata. Open source developers and developers at companies use the npm registry to contribute packages to the entire community or members of their organizations, and download packages to use in their own projects.\n\nTo get started with the registry, [sign up for an npm account][signup] and check out the \"[Getting started][getting-started]\" and [CLI][cli] documentation.\n\n[public-website]: https://npmjs.com\n[cli]: /cli-documentation\n[signup]: https://www.npmjs.com/signup\n[getting-started]: /getting-started\n"},{"id":"588f6e3e-c67f-541c-8243-3817fbec39b9","frontmatter":{"title":"Introduction to packages and modules"},"rawBody":"---\ntitle: Introduction to packages and modules\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"18e92413-ebe9-5c75-8443-2e1fd1061b53","frontmatter":{"title":"npm package scope, access level, and visibility"},"rawBody":"---\ntitle: npm package scope, access level, and visibility\n---\n\nVisibility of npm packages depends on the scope (namespace) in which the package is contained, and the access level (private or public) set for the package.\n\n<div class=\"note\">\n\n<span class=\"bold\">Note:</span> To create organization-scoped packages, you must first create an organization. For more information, see \"<a href=\"https://docs.npmjs.com/creating-an-organization\">Creating an organization</a>\".\n\n</div>\n\n## Public registry\n\n| Scope        | Access level | Can view and download | Can write (publish)                                                                  |\n|--------------|--------------|-----------------------------------------------------------------------------|---|\n| Org | Private      | Members of a team in the organization with read access to the package | Members of a team in the organization with read and write access to the package |\n| Org | Public       | Everyone     | Members of a team in the organization with read and write access to the package |\n| User     | Private      | The package owner and users who have been granted read access to the package  | The package owner and users who have been granted read and write access to the package |\n| User     | Public       | Everyone  | The package owner and users who have been granted read and write access to the package |\n| Unscoped | Public | Everyone | The package owner and users who have been granted read and write access to the package |\n\n<div class=\"note\">\n\n<span class=\"bold\">Note:</span> Only user accounts can create and manage unscoped packages. Organizations can only manage scoped packages.\n\n</div>\n"},{"id":"d1e4838e-50e0-5cc8-a0ac-dd7f44423237","frontmatter":{"title":"About audit reports"},"rawBody":"---\ntitle: About audit reports\n---\n\n# About audit reports\n\nAudit reports contain tables of information about security vulnerabilities in your project's dependencies to help you fix the vulnerability or troubleshoot further.\n\n<Screenshot src=\"/packages-and-modules/securing-your-code/audit-report-results.png\" alt=\"Screenshot showing command-line audit report results\" />\n\n## Vulnerability table fields\n\n* [Severity](#severity)\n* [Description](#description)\n* [Package](#package)\n* [Patched in](#patched-in)\n* [Dependency of](#dependency-of)\n* [Path](#path)\n* [More info](#more-info)\n\n### Severity\n\nThe severity of the vulnerability, determined by the impact and exploitability of the vulnerability in its most common use case.\n\n| Severity |  Recommended action |\n|:---------|:--------------------|\n| Critical | Address immediately |\n| High | Address as quickly as possible |\n| Moderate | Address as time allows |\n| Low | Address at your discretion |\n\n#### Description\nThe description of the vulnerability. For example, \"Denial of service\".\n\n#### Package\nThe name of the package that contains the vulnerability.\n\n#### Patched in\nThe semantic version range that describes which versions contain a fix for the vulnerability.\n\n#### Dependency of\nThe module that the package with the vulnerability depends on.\n\n#### Path\nThe path to the code that contains the vulnerability.\n\n#### More info\nA link to the security report.\n"},{"id":"5c502cd6-8abd-5a51-a247-d7dc53560527","frontmatter":{"title":"About PGP registry signatures (deprecated)"},"rawBody":"---\ntitle: About PGP registry signatures (deprecated)\n---\n<Note>\n\n**Note:** PGP signatures will be deprecated early 2023, in favour of ECDSA registry signatures that can be verified using the npm CLI. [Learn more.](/about-registry-signatures)\n\n</Note>\n\nTo increase confidence in the npm public registry, we add our [PGP][pgp-wiki] signature to package metadata and publicize our public PGP key on [Keybase][keybase]. Our Keybase account is \"[npmregistry][npmregistry]\" and our public PGP key can be found at https://keybase.io/npmregistry/pgp_keys.asc\n\nYou can use the package PGP signature and our public PGP key to verify that the same entity who published the key (npm) also signed the package you downloaded from the npm public registry. For more information, see \"[Verifying the PGP signature of a package from the npm public registry][verify-pgp]\".\n\n## Tools we use\n\n### openpgpjs\n\nTo generate PGP signatures, we use [openpgpjs][openpgpjs-repo], a pure JavaScript implementation of OpenPGP. To learn more about openpgpjs, see https://openpgpjs.org/.\n\n### Keybase\n\nWe use Keybase to publicize our PGP key and give you confidence that the npm registry you install from is the same registry that signs packages.\n\nKeybase offers two advantages over the core OpenPGP experience that move us to recommend it to you:\n\n- The Keybase application and CLI provide an excellent user experience for PGP, which can be intimidating for newcomers.\n- Keybase manages and displays social proofs that the entity that controls a specific PGP key also controls accounts on social media and other places. These proofs help you determine whether you can trust an account.\n\nWe’ve established proofs on Keybase that we control [@npmjs][npmjs-twitter] on Twitter, the domain [npmjs.com][npmjs-com], and the domain [npmjs.org][npmjs-org]. Verifying these proofs won’t tell you who owns those domains, but it does establish that the same entity controls them, and the PGP key advertised on Keybase.\n\nIf you install Keybase and create an account, you can follow npmregistry yourself and obtain a local copy of the registry’s public key. For more information, and to verify the PGP signature of a specific package version from the npm public registry, see \"[Verifying the PGP signature for a package from the npm public registry][verify-pgp]\".\n\n\n[keybase]: https://keybase.io\n[pgp-wiki]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy\n[npmregistry]: https://keybase.io/npmregistry\n[openpgpjs-repo]: https://github.com/openpgpjs/openpgpjs\n[npmjs-twitter]: https://twitter.com/npmjs\n[npmjs-com]: https://npmjs.com\n[npmjs-org]: https://npmjs.org\n[verify-pgp]: verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry\n"},{"id":"b2c7655d-db30-5b11-9e5f-09c1363a541f","frontmatter":{"title":"About ECDSA registry signatures"},"rawBody":"---\ntitle: About ECDSA registry signatures\n---\n\nPackages published to the public npm registry are signed to make it possible to detect if the package content has been tampered with.\n\nSigning and verifying published packages protects against an attacker controlling a registry mirror or proxy where they attempt to intercept and tamper with the package tarball content.\n\n## Migrating from PGP to ECDSA signatures\n\n<Note>\n\n**Note:** PGP signatures will be deprecated early 2023, in favour of ECDSA registry signatures. More information will soon be provided.\n\n</Note>\n\nThe public npm registry is migrating away from the existing PGP signatures to ECDSA signatures that are more compact and can be verified without extra dependencies in the npm CLI.\n\nSignature verification was previously a multi-step process involving the Keybase CLI, as well as manually retrieving and parsing the signature from the package metadata.\n\nRead more about <a href=\"/verifying-registry-signatures\">migrating and verifying signatures</a> using the npm CLI.\n\n## Supporting signatures on third-party registries\n\nThe npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed:\n\n**1. Signatures are provided in the package's `packument` in each published version within the `dist` object:**\n\n  ```\n  \"dist\":{\n    ..omitted..,\n    \"signatures\": [{\n      \"keyid\": \"SHA256:{{SHA256_PUBLIC_KEY}}\",\n      \"sig\": \"a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809...\"\n    }],\n  ```\n\nSee this <a href=\"https://registry.npmjs.org/light-cycle/1.4.3\" target=\"_blank\">example of a signed package from the public npm registry</a>.\n\nTo generate the signature, sign the package name, version and tarball sha integrity: `${package.name}@${package.version}:${package.dist.integrity}`.\n\nThe current best practice is to use a <a href=\"https://en.wikipedia.org/wiki/Key_management#Key_management_system\" target=\"_blank\">Key Management System</a> that does the signing operation on a <a href=\"https://en.wikipedia.org/wiki/Hardware_security_module\" target=\"_blank\">Hardware Security Module (HSM)</a> in order to not directly handle the private key part, which reduces the attack surface.\n\nThe `keyid` must match one of the public signing keys below.\n\n**2. Public signing keys are provided at `registry-host.tld/-/npm/v1/keys` in the following format:**\n\n  ```\n  {\n    \"keys\": [{\n      \"expires\": null,\n      \"keyid\": \"SHA256:{{SHA256_PUBLIC_KEY}}\",\n      \"keytype\": \"ecdsa-sha2-nistp256\",\n      \"scheme\": \"ecdsa-sha2-nistp256\",\n      \"key\": \"{{B64_PUBLIC_KEY}}\"\n    }]\n  }\n  ```\n\nKeys response:\n\n- `expires`: null or a simplified extended <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ`\n- `keydid`: sha256 fingerprint of the public key\n- `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI\n- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI\n- `key`: base64 encoded public key\n\nSee this <a href=\"https://registry.npmjs.org/-/npm/v1/keys\" target=\"_blank\">example key's response from the public npm registry</a>.\n"},{"id":"09c9e0ae-17d2-5e46-a753-97df56082d3a","frontmatter":{"title":"Auditing package dependencies for security vulnerabilities"},"rawBody":"---\ntitle: Auditing package dependencies for security vulnerabilities\nredirect_from:\n  - /getting-started/running-a-security-audit/\n---\n\n## About security audits\n\nA security audit is an assessment of package dependencies for security vulnerabilities. Security audits help you protect your package's users by enabling you to find and fix known vulnerabilities in dependencies that could cause data loss, service outages, unauthorized access to sensitive information, or other issues.\n\n## Running a security audit with `npm audit`\n\n<Note>\n\n**Note:** The `npm audit` command is available in npm@6. To upgrade, run `npm install npm@latest -g`.\n\n</Note>\n\nThe <a href=\"https://docs.npmjs.com/cli/audit\">`npm audit` command</a> submits a description of the dependencies configured in your package to your default registry and asks for a report of known vulnerabilities. `npm audit` checks direct dependencies, devDependencies, bundledDependencies, and optionalDependencies, but does not check peerDependencies.\n\n`npm audit` automatically runs when you install a package with `npm install`. You can also run `npm audit` manually on your [locally installed packages](downloading-and-installing-packages-locally) to conduct a security audit of the package and produce a report of dependency vulnerabilities and, if available, suggested patches.\n\n1. On the command line, navigate to your package directory by typing `cd path/to/your-package-name` and pressing **Enter**.\n2. Ensure your package contains `package.json` and `package-lock.json` files.\n3. Type `npm audit` and press **Enter**.\n4. Review the audit report and run recommended commands or investigate further if needed.\n\n### Resolving `EAUDITNOPJSON` and `EAUDITNOLOCK` errors\n\n`npm audit` requires packages to have `package.json` and `package-lock.json` files.\n\n* If you get an `EAUDITNOPJSON` error, create a `package.json` file by following the steps in \"[Creating a package.json file](creating-a-package-json-file)\".\n* If you get an `EAUDITNOLOCK` error, make sure your package has a `package.json` file, then create the package lock file by running `npm i --package-lock-only`.\n\n## Reviewing and acting on the security audit report\n\nRunning `npm audit` will produce a report of security vulnerabilities with the affected package name, vulnerability severity and description, path, and other information, and, if available, commands to apply patches to resolve vulnerabilities. For more information on the fields in the audit report, see \"[About audit reports](about-audit-reports)\"\n\n### Security vulnerabilities found with suggested updates\n\nIf security vulnerabilities are found and updates are available, you can either:\n\n* Run the `npm audit fix` subcommand to automatically install compatible updates to vulnerable dependencies.\n* Run the recommended commands individually to install updates to vulnerable dependencies. (Some updates may be semver-breaking changes; for more information, see \"[SEMVER warnings](#semver-warnings)\".)\n\n<Screenshot src=\"/packages-and-modules/securing-your-code/audit-report-suggested-fixes.png\" alt=\"Screenshot of command-line audit results with suggested fixes\" />\n\n#### SEMVER warnings\n\nIf the recommended action is a potential breaking change (semantic version major change), it will be followed by a `SEMVER WARNING` that says \"SEMVER WARNING: Recommended action is a potentially breaking change\". If the package with the vulnerability has changed its API, you may need to make additional changes to your package's code.\n\n### Security vulnerabilities found requiring manual review\n\nIf security vulnerabilities are found, but no patches are available, the audit report will provide information about the vulnerability so you can investigate further.\n\n<Screenshot src=\"/packages-and-modules/securing-your-code/audit-manual-review.png\" alt=\"Screenshot of command-line audit results requiring a manual review\" />\n\nTo address the vulnerability, you can\n\n* [Check for mitigating factors](#check-for-mitigating-factors)\n* [Update dependent packages if a fix exists](#update-dependent-packages-if-a-fix-exists)\n* [Fix the vulnerability](#fix-the-vulnerability)\n* [Open an issue in the package or dependent package issue tracker](#open-an-issue-in-the-package-or-dependent-package-issue-tracker)\n\n#### Check for mitigating factors\n\nReview the security advisory in the \"More info\" field for mitigating factors that may allow you to continue using the package with the vulnerability in limited cases. For example, the vulnerability may only exist when the code is used on specific operating systems, or when a specific function is called.\n\n#### Update dependent packages if a fix exists\n\nIf a fix exists but packages that depend on the package with the vulnerability have not been updated to include the fixed version, you may want to open a pull or merge request on the dependent package repository to use the fixed version.\n\n1. To find the package that must be updated, check the \"Path\" field for the location of the package with the vulnerability, then check for the package that depends on it. For example, if the path to the vulnerability is `@package-name > dependent-package > package-with-vulnerability`, you will need to update `dependent-package`.\n2. On the [npm public registry](https://npmjs.com), find the dependent package and navigate to its repository. For more information on finding packages, see \"[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)\".\n3. In the dependent package repository, open a pull or merge request to update the version of the vulnerable package to a version with a fix.\n4. Once the pull or merge request is merged and the package has been updated in the [npm public registry](https://npmjs.com), update your copy of the package with `npm update`.\n\n#### Fix the vulnerability\n\nIf a fix does not exist, you may want to suggest changes that address the vulnerability to the package maintainer in a pull or merge request on the package repository.\n\n1. Check the \"Path\" field for the location of the vulnerability.\n2. On the [npm public registry](https://npmjs.com), find the package with the vulnerability. For more information on finding packages, see \"[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)\".\n3. In the package repository, open a pull or merge request to make the fix on the package repository.\n4. Once the fix is merged and the package has been updated in the npm public registry, update your copy of the package that depends on the package with the fix.\n\n#### Open an issue in the package or dependent package issue tracker\n\nIf you do not want to fix the vulnerability or update the dependent package yourself, open an issue in the package or dependent package issue tracker.\n\n1. On the [npm public registry](https://npmjs.com), find the package with the vulnerability or the dependent package that needs an update. For more information on finding packages, see \"[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)\".\n2. In the package or dependent package issue tracker, open an issue and include information from the audit report, including the vulnerability report from the \"More info\" field.\n\n### No security vulnerabilities found\n\nIf no security vulnerabilities are found, this means that packages with known vulnerabilities were not found in your package dependency tree. Since the advisory database can be updated at any time, we recommend regularly running `npm audit` manually, or adding `npm audit` to your continuous integration process.\n\n<Screenshot src=\"/packages-and-modules/securing-your-code/audit-no-vulnerabilities.png\" alt=\"Screenshot showing audit report with no vulnerabilities\" />\n\n## Turning off `npm audit` on package installation\n\n### Installing a single package\n\nTo turn off `npm audit` when installing a single package, use the `--no-audit` flag:\n\n```\nnpm install example-package-name --no-audit\n```\n\nFor more information, see the [`npm-install` command][cli-install].\n\n### Installing all packages\n\nTo turn off `npm audit` when installing all packages, set the `audit` setting to `false` in your user and global npmrc config files:\n\n```\nnpm set audit false\n```\n\nFor more information, see the [`npm-config` management command][cli-config] and the [`npm-config` audit setting][cli-config-audit].\n\n\n[cli-install]: /cli/install\n[cli-config]: /cli/config\n[cli-config-audit]: /cli/config#audit\n"},{"id":"d27213fb-a92e-5cb5-a94c-68f75a86e15c","frontmatter":{"title":"Securing your code"},"rawBody":"---\ntitle: Securing your code\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"0b2dcdcd-ffc7-5608-8ca3-f042c3444e0a","frontmatter":{"title":"Reporting malware in an npm package"},"rawBody":"---\ntitle: Reporting malware in an npm package\nredirect_from:\n  - /reporting-a-vulnerability-in-an-npm-package\n---\n\nIf you find malware in an npm package (either yours or someone else's), you can report it to the npm Security team to help keep the Javascript ecosystem safe.\n\n<Note>\n\n**Note:** Vulnerabilities in npm packages should be reported directly to the package maintainers. We strongly advise doing this privately. You can find contact information about package maintainers with `npm owner ls <package-name>`. If the source code is hosted on GitHub please refer to the repository's [Security Policy](https://docs.github.com/en/free-pro-team@latest/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository#about-security-policies).\n\n</Note>\n\n## How npm Security handles malware\n\nMalware is a major concern for npm Security and we have removed hundreds of malicious packages from the registry. For every malware report we receive, npm Security takes the following actions:\n1. Confirm validity of the report.\n2. Remove the package from the registry.\n3. Publish a security placeholder for the package.\n4. Publish a security advisory alerting the community.\n\nAs part of our process we determine whether the user account who uploaded the package should be banned. We also cooperate with 3rd parties when applicable.\n\n## Reporting malware\n\n1. Gather information about the malware.\n2. On the package page, click **Report malware**.\n3. On the malware report page, provide information about yourself and the malware:\n   - **Name:** Your name.\n   - **Email address:** An email address the npm Security team can use to contact you.\n   - **Package name:** The name of the package that contains the malware.\n   - **Package version:** The version of the package that contains the malware. Include all affected versions.\n   - **Description of the malware:** A brief description of the malware and its effects. Include references, commits, and/or code examples that would help our researchers confirm the report.\n4. Click **Send Report**.\n"},{"id":"a3757046-836d-539b-8aff-c744bd263483","frontmatter":{"title":"Requiring 2FA for package publishing and settings modification"},"rawBody":"---\ntitle: Requiring 2FA for package publishing and settings modification\n---\nimport shared from '../../../src/shared.js'\n\nTo protect your packages, as a package publisher, you can require everyone who has write access to a package to have two-factor authentication (2FA) enabled. This will require that users provide 2FA credentials in addition to their login token when they publish the package. For more information, see \"[Configuring two-factor authentication][config-2fa]\".\n\nYou may also choose to allow publishing with either two-factor authentication _or_ with [automation tokens][creating-tokens]. This lets you configure automation tokens in a CI/CD workflow, but requires two-factor authentication from interactive publishes.\n\n## Configuring two-factor authentication\n\n1. <>{shared['user-login'].text}</>\n\n   <>{shared['user-login'].image}</>\n\n2. Navigate to the package on which you want to require a second factor to publish or modify settings.\n\n3. Click **Settings**.\n\n   <Screenshot src=\"/packages-and-modules/securing-your-code/2fa-package-admin.png\" alt=\"Screenshot showing the admin tab on a package page\" />\n\n4. Under \"Publishing access\", select the requirements to publish a package.\n   1. **Two-factor authentication is not required**  \n      With this option, a maintainer can publish a package or change the package settings whether they have two-factor authentication enabled or not.  This is the least secure setting.\n\n   2. **Require two-factor authentication or automation tokens**  \n      With this option, maintainers must have two-factor authentication enabled for their account.  If they publish a package interactively, using the `npm publish` command, they will be required to enter 2FA credentials when they perform the publish. However, maintainers may also create an [automation token][creating-tokens] and use that to publish. A second factor is _not_ required when using an automation token, making it useful for continuous integration and continuous deployment workflows.\n\n   3. **Two-factor authentication only**  \n      With this option, a maintainer must have two-factor authentication enabled for their account, and they must publish interactively. Maintainers will be required to enter 2FA credentials when they perform the publish.\n\n   <Screenshot src=\"/packages-and-modules/securing-your-code/2fa-package-require.png\" alt=\"Screenshot showing the require two-factor option for a package\" />\n\n5. Click **Update Package Settings**.\n\n   <Screenshot src=\"/packages-and-modules/securing-your-code/2fa-package-update.png\" alt=\"Screenshot showing the update package settings button\" />\n\n[config-2fa]: configuring-two-factor-authentication\n[creating-tokens]: creating-and-viewing-access-tokens\n"},{"id":"3d80def4-6d17-5ed6-b57c-ba3ae046509e","frontmatter":{"title":"Verifying ECDSA registry signatures"},"rawBody":"---\ntitle: Verifying ECDSA registry signatures\n---\n\nTo ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI.\n\n## Prerequisites\n\n1. Install npm CLI version v8.15.0 or later\n2. Install dependencies using `npm install` or `npm ci`\n\n## Verifying registry signatures\n\nRegistry signatures can be verified using the following `audit` command:\n\n   ```\n   npm audit signatures\n   ```\n\nExample response if all installed versions have valid registry signatures:\n\n  ```\n  audited 1640 packages in 2s\n\n  1640 have verified registry signatures\n  ```\n\n## Troubleshooting\n\n### Some packages are missing registry signatures\n\nThe CLI will error if packages don't have signatures *and* if the package registry supports signatures. This could mean an attacker might be trying to circumvent signature verification.\nYou can check if the registry supports signatures by requesting the public signing keys from `registry-host.tld/-/npm/v1/keys`.\n\nExample response if some versions have missing registry signatures:\n\n   ```\n   audited 1640 packages in 2s\n\n   1405 packages have verified registry signatures\n\n   235 packages have missing registry signatures but the registry is providing signing keys:\n\n   missing-dep@1.0.0 (https://registry.npmjs.org/)\n   ...\n   ```\n"},{"id":"b0617300-f370-5245-8e18-7b3f074ec5ad","frontmatter":{"title":"Verifying the PGP registry signature of a package from the npm public registry (deprecated)"},"rawBody":"---\ntitle: Verifying the PGP registry signature of a package from the npm public registry (deprecated)\n---\n\n<Note>\n\n**Note:** PGP signatures will be deprecated early 2023, in favour of ECDSA registry signatures that can be verified using the npm CLI. More information will soon be provided.\n\n</Note>\n\nTo ensure the integrity of a package version you download from the npm public registry, you can manually verify the [PGP signature][about-pgp-sig] of the package.\n\n<Note>\n\n**Note:** Since fully verifying signatures on Keybase requires rechecking proofs (which requires network activity) and is therefore expensive, we recommend only verifying signatures if it is necessary -- for example, when verifying a deploy artifact, or when initially storing a package in your cache.\n\n</Note>\n\n## Prerequisites\n\n1. Install Keybase from https://keybase.io/download\n2. Create a Keybase account on https://keybase.io\n3. Follow \"[npmregistry][npmregistry]\" on Keybase.\n4. Download a local copy of the npm public registry's [public PGP key][npm-key].\n\n## Verifying npm signatures for the public registry\n\n<Note>\n\n**Note:** The following steps use version 1.4.3 of the `light-cycle` package as an example.\n\n</Note>\n\n1. On the command line, fetch the signature for the package version you want and save it in a file:\n\n   ```\n   npm view light-cycle@1.4.3 dist.npm-signature > sig-to-check\n   ```\n\n2. Get the integrity field for that version (example below includes response):\n\n   ```\n   npm view light-cycle@1.4.3 dist.integrity\n   ```\n\n   Example response:\n\n   ```\n   sha512-sFcuivsDZ99fY0TbvuRC6CDXB8r/ylafjJAMnbSF0y4EMM1/1DtQo40G2WKz1rBbyiz4SLAc3Wa6yZyC4XSGOQ==\n   ```\n\n3. Construct the string that ties the unique package name and version to the integrity string (example below includes response):\n\n   ```\n   keybase pgp verify --signed-by npmregistry -d sig-to-check -m 'light-cycle@1.4.3:sha512-sFcuivsDZ99fY0TbvuRC6CDXB8r/ylafjJAMnbSF0y4EMM1/1DtQo40G2WKz1rBbyiz4SLAc3Wa6yZyC4XSGOQ=='\n   ```\n\n   Example response:\n\n   ```\n   ▶ INFO Identifying npmregistry\n   ✔ public key fingerprint: 0963 1802 8A2B 58C8 4929 D8E1 3D4D 5B12 0276 566A\n   ✔ admin of DNS zone npmjs.org: found TXT entry keybase-site-verification=Ls8jN55i6KesjiX91Ck79bUZ17eA-iohmw2jJFM16xc\n   ✔ admin of DNS zone npmjs.com: found TXT entry keybase-site-verification=iK3pjpRBkv-CIJ4PHtWL4TTcFXMpPiwPynatKl3oWO4\n   ✔ \"npmjs\" on twitter: https://twitter.com/npmjs/status/981288548845240320\n   Signature verified. Signed by npmregistry 3 years ago (2018-04-13 15:00:37 -0700 MST).\n   PGP Fingerprint: 096318028a2b58c84929d8e13d4d5b120276566a.\n   ```\n\n[about-pgp-sig]: about-pgp-signatures-for-packages-in-the-public-registry\n[keybase]: https://keybase.io\n[npmregistry]: https://keybase.io/npmregistry\n[npm-key]: https://keybase.io/npmregistry/pgp_keys.asc\n"},{"id":"1265aeaa-28ed-5446-9fb3-e272db6bd62b","frontmatter":{"title":"Adding collaborators to private packages owned by a user account"},"rawBody":"---\ntitle: Adding collaborators to private packages owned by a user account\n---\n\nAs an npm user with a paid user account, you can add another npm user with a paid account as a collaborator on a private package you own.\n\n<Note>\n\n**Note:** The user you want to add as a collaborator on your private package must have a paid user account. To sign up for a paid account, they can visit `https://www.npmjs.com/settings/username/billing`, replacing `username` with their npm username.\n\n</Note>\n\nWhen you add a member to your package, they are sent an email inviting them to the package. The new member has to accept the invitation gain access to the package.\n\n## Granting access to a private user package on the web\n\n1. On the [npm website][npmjs-com], go to the package to which you want to add a collaborator: `https://www.npmjs.com/package/<your-package-name>`\n2. On the package page, under \"Collaborators\", click **+**.\n3. Enter the npm username of the collaborator.\n4. Click **Submit**.\n\n## Granting private package access from the command line interface\n\nTo add a collaborator to a package on the command line, run the following command, replacing `<user>` with the npm username of your collaborator, and `<your-package-name>` with the name of the private package:\n\n```\nnpm owner add <user> <your-package-name>\n```\n\n## Granting access to private organization packages\n\nTo grant an npm user access to private organization packages, you must have an organization owner add them to your organization, then add them to a team that has access to the private package. For more information, see \"[Adding members to your organization][add-org-members]\".\n\n[npmjs-com]: https://npmjs.com\n[add-org-members]: adding-members-to-your-organization\n"},{"id":"a6083216-2841-536c-aaa7-7148adf05d82","frontmatter":{"title":"Changing package visibility"},"rawBody":"---\ntitle: Changing package visibility\n---\n\nYou can change the visibility of a scoped package from the website or command line.\n\nYou must be the owner of the user account or organization that owns the package in order to change package visibility.\n\nFor more information about package visibility, see \"[Package scope, access level, and visibility][pkg-viz]\".\n\n<Note>\n\n**Note:** You cannot change the visibility of an unscoped package. Only scoped packages with a paid subscription may be private.\n\n</Note>\n\n## Making a public package private\n\n<Note>\n\n**Note:** Making a package private requires a paid user account or organization. To sign up for a paid user or organization, go to `https://www.npmjs.com/settings/account-name/billing`, replacing `account-name` with the name of your npm user account or organization.\n\n</Note>\n\nIf you want to restrict access and visibility for a public package you own, you can make the package private. When you make a package private, its access will be updated immediately and it will be removed from the website within a few minutes of the change.\n\n### Using the website\n\n1. On the [npm website][npmjs-com], go to the package page.\n2. On the package page, click **Admin**.\n3. Under \"Package Access\", select \"Is Package Private?\"\n4. Click **Update package settings**.\n\n### Using the command line\n\nTo make a public package private on the command line, run the following command, replacing `<package-name>` with the name of your package:\n\n```\nnpm access restricted <package-name>\n```\n\nFor more information, see the <a href=\"https://docs.npmjs.com/cli-documentation/access\">`npm access`</a> documentation.\n\n## Making a private package public\n\n<div class=\"note\">\n\n<span class=\"bold\">Note:</span> When you make a private package public, the package will be visible to and downloadable by all npm users.\n\n</div>\n\n### Using the website\n\n1. On the npm website, go to the package page.\n2. On the package page, click **Admin**.\n3. Under \"Package Access\", deselect \"Is Package Private?\"\n4. Click **Update package settings**.\n\n### Using the command line\n\nTo make a private package public on the command line, run the following command, replacing `<package-name>` with the name of your package:\n\n```\nnpm access public <package-name>\n```\n\nFor more information, see the [`npm access` CLI documentation][access-cli].\n\n\n[contact-support]: https://www.npmjs.com/support\n[pkg-viz]: package-scope-access-level-and-visibility\n[npmjs-com]: https://npmjs.com\n[access-cli]: /cli/access\n"},{"id":"ee828cfa-7b56-5963-8ded-42c3abc81e10","frontmatter":{"title":"Deprecating and undeprecating packages or package versions"},"rawBody":"---\ntitle: Deprecating and undeprecating packages or package versions\n---\nimport shared from '../../../src/shared.js'\n\nIf you no longer wish to maintain a package, or if you would like to encourage users to update to a new or different version, you can [deprecate][deprecate-cli] it. Deprecating a package or version will print a message to the terminal when a user installs it.\n\nA deprecation warning or message can say anything. You may wish to include a message encouraging users to update to a specific version, or an alternate, supported package.\n\n<Note>\n\n**Note:** We strongly recommend deprecating packages or package versions instead of <a href=\"/unpublishing-packages-from-the-registry\">unpublishing</a> them, because unpublishing removes a package from the registry entirely, meaning anyone who relied on it will no longer be able to use it, with no warning.\n\n</Note>\n\n## Deprecating an entire package\n\nDeprecating an entire package will remove it from search results on the\nnpm website and a deprecation message will also be displayed on the\npackage page.\n\n<Screenshot src=\"/packages-and-modules/updating-and-managing-your-published-packages/deprecate-package.png\" alt=\"Screenshot of package deprecation\" />\n\nDeprecating a package is an alternative to deleting a package if\nyour package does not meet the\n[unpublishing requirements](/policies/unpublish).\n\n### Using the website\n\n1. <>{shared[\"user-login\"].text}</>\n\n    <>{shared[\"user-login\"].image}</>\n\n2. Navigate to the package page for the package you want to deprecate, replacing `<your-package-name>` with the name of your package:\n   `https://www.npmjs.com/package/<your-package-name>`.\n\n3. Click **Settings**.\n    <Screenshot\n    \tsrc=\"/packages-and-modules/securing-your-code/2fa-package-admin.png\"\n    \talt=\"Screenshot showing the settings tab on a package page\"\n    />\n\n4. Under \"deprecate package\", click <strong>Deprecate package</strong>.\n\n\t<Screenshot\n    \tsrc=\"/packages-and-modules/deleting-deprecating/deprecate-package-settings.png\"\n    \talt=\"Screenshot showing the deprecate package button\"\n    />\n\n5. If you are sure that you want to continue, enter your package name and click <strong>Deprecate package</strong>.\n\n\t<Screenshot\n    \tsrc=\"packages-and-modules/deleting-deprecating/deprecate-package-confirm.png\"\n    \talt=\"Screenshot showing the deprecate package confirmation\"\n    />\n\n### Using the command line\n\nTo deprecate an entire package, run the following command, replacing `<package-name>` with the name of your package, and `\"<message>\"` with your deprecation message:\n\n```\nnpm deprecate <package-name> \"<message>\"\n```\n\nIf you have enabled [two-factor authentication][two-factor-auth], add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator app).\n\n## Deprecating a single version of a package\n\nWhen you deprecate a version of a package, a red message will be displayed on that version's package page, similar to deprecating an entire package.\n\n<Screenshot src=\"/packages-and-modules/updating-and-managing-your-published-packages/deprecate-version.png\" alt=\"Screenshot of package deprecation for a particular version\" />\n\n### Using the command line\n\nTo deprecate a package version, run the following command, replacing `<package-name>` with the name of your package, `<version>` with your version number, and `\"<message>\"` with your deprecation message:\n\n```\nnpm deprecate <package-name>@<version> \"<message>\"\n```\n\nThe CLI will also accept version ranges for `<version>`.\n\nIf you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).\n\n## Undeprecating a package or version\n\nTo undeprecate a package, replace `\"<message>\"` with `\"\"` (an empty string) in one of the above commands.\n\nFor example, to undeprecate a package version, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:\n\n```\nnpm deprecate <package-name>@<version> \"\"\n```\n\nIf you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).\n\n## Transferring a deprecated package to npm\n\nIf you are no longer maintaining a package, but other users depend on it, and you'd like to remove it from your user profile, you can transfer it to the [`@npm`][npm-account] user account, which is owned by the npm registry.\n\n<Note>\n\n**Note:** Once you transfer a package to the npm account, you will no longer be able to update it.\n\n</Note>\n\nTo transfer a package to the npm user account, run the following two commands in order, replacing `<user>` with your npm user name, and `<package-name>` with the package you want to transfer:\n\n```\nnpm owner add npm <package-name>\nnpm owner rm <user> <package-name>\n```\n\nIf you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).\n\n[deprecate-cli]: /cli/deprecate\n[two-factor-auth]: about-two-factor-authentication\n[npm-account]: https://www.npmjs.com/~npm\n"},{"id":"bae3e6a3-91bf-5d92-b195-f8158b88b73e","frontmatter":{"title":"Updating and managing your published packages"},"rawBody":"---\ntitle: Updating and managing your published packages\n---\n\n<!-- edit the output of Index in `src/nav-base.yml` -->\n<Index />\n"},{"id":"f436305c-225a-5ed4-b464-fdb7f7d9b8c5","frontmatter":{"title":"Transferring a package from a user account to another user account"},"rawBody":"---\ntitle: Transferring a package from a user account to another user account\n---\n\nAs a package owner or maintainer, you can transfer ownership of a package you no longer wish to maintain to another trusted npm user using either the npm website or the command line.\n\nFor more information on how npm support handles package name disputes between users, you can refer to npm's [package name dispute policy][dispute-policy].\n\n<Note>\n\n**Note:** You cannot transfer a scoped package to another user account or organization, because a package's scope _is_ the user account or organization name.  You will need to create a new package in the new scope.\n\n</Note>\n\n## Transferring a package from a user account to another user account on the website\n\nTo transfer a package you own or maintain to another user, follow these steps:  \n\n1. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:\n`https://www.npmjs.com/package/<your-package-name>`.\n\n2. On the package Admin tab, under \"Maintainers\", enter the npm username of the new maintainer.\n\n   <Screenshot src=\"/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-invite.png\" alt=\"Screenshot showing text field to invite maintainers\" />\n\n3. Click \"Invite.\"\n\n4. To remove yourself as a maintainer, under the maintainers list, click the \"x\" next to your username.\n\n   <Screenshot src=\"/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-list.png\" alt=\"Screenshot showing maintainer list\" />\n\n## Transferring a package from a user account to another user account on the command line\n\nTo transfer a package to another npm user using the CLI, run the [`npm owner add`][npm-owner] command replacing `<their-username>` with the other user's npm username. An email invitation is sent to the other user. After the user has accepted the invitation, run the `npm owner rm` command replacing `<your-username>` with your npm username:\n\n```\nnpm owner add <their-username> <package-name>\n\n# new maintainer accepts invitation\n\nnpm owner rm <your-username> <package-name>\n```\n\nIf you have two-factor authentication enabled for writes, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator application).\n\n```\nnpm owner add <their-username> <package-name> --otp=123456\n\n# new maintainer accepts invitation\n\nnpm owner rm <your-username> <package-name> --otp=123456\n```\n\n[dispute-policy]: /policies/disputes\n[npm-owner]: cli/owner\n"},{"id":"8d1238b7-7bde-59b2-b084-f731213b0bad","frontmatter":{"title":"Unpublishing packages from the registry"},"rawBody":"---\ntitle: Unpublishing packages from the registry\n---\nimport shared from '../../../src/shared.js'\n\nAs a package owner or collaborator, if your package has no dependents, you can permanently remove it from the npm registry by using the CLI. You can [unpublish](https://docs.npmjs.com/cli/v7/commands/npm-unpublish) within 72 hours of the initial publish; beyond 72 hours, you can still unpublish your package if [it meets certain criteria](https://www.npmjs.com/policies/unpublish).\n\nThese criteria are set to avoid damaging the JavaScript package ecosystem.  If you cannot unpublish your package, you can [deprecate it instead](/deprecating-and-undeprecating-packages-or-package-versions).\n\n<Note>\n\n**Note:** Removing all the collaborators or teams from the package will not unpublish it.\n\n</Note>\n\n## Unpublishing a package\n\nIf you want to completely remove all versions of a package from the registry, you can unpublish it completely.  This will delete it from the registry and it will be unable to be installed.\n\nTo unpublish a package, you must meet the requirements of the [package unpublishing rules](#how-to-unpublish).\n\n### Using the website\n\n1. <>{shared[\"user-login\"].text}</>\n\n    <>{shared[\"user-login\"].image}</>\n\n2. Navigate to the package page for the package you want to unpublish, replacing `<your-package-name>` with the name of your package:\n   `https://www.npmjs.com/package/<your-package-name>`.\n\n3. Click **Settings**.\n    <Screenshot\n    \tsrc=\"/packages-and-modules/securing-your-code/2fa-package-admin.png\"\n    \talt=\"Screenshot showing the admin tab on a package page\"\n    />\n\n4. Under \"delete package\", click <strong>Delete package</strong>.\n\n\t<Screenshot\n    \tsrc=\"/packages-and-modules/deleting-deprecating/delete-package-settings.png\"\n    \talt=\"Screenshot showing the admin tab on a package page\"\n    />\n\n    <Note>\n\n    **Note:** If you cannot delete the package because it does not meet the [unpublishing requirements](#how-to-unpublish), then the delete package option will not be available.  Instead, you will be prompted to [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecating-a-package-from-the-website).\n\n    </Note>\n\n5. If you are sure that you want to continue, enter your package name and click <strong>Delete package</strong>.\n\n\t<Screenshot\n    \tsrc=\"/packages-and-modules/deleting-deprecating/delete-package-confirm.png\"\n    \talt=\"Screenshot showing the admin tab on a package page\"\n    />\n\n### Using the command line\n\nTo unpublish an entire package, run the following command, replacing `<package-name>` with the name of your package:\n\n```\nnpm unpublish <package-name> -f\n```\n\nIf you have [two-factor authentication][two-factor-auth] enabled for writes, you will need to add a one-time password to the `unpublish` command, `--otp=123456` (where *123456* is the code from your authenticator app).\n\n<>If you need help unpublishing your package, please {shared['contact-support'].text}. If you are an Enterprise customer, please {shared['contact-enterprise-support'].text}</>.\n\n<Note>\n\n**Note:** If you unpublish an entire package, you may not publish any new versions of that package until 24 hours have passed.\n\n</Note>\n\n## Unpublishing a single version of a package\n\nIf you want to remove a single version of a package, you can unpublish one version without affecting the others.   This will delete only that version from the registry and it will be unable to be installed. This option is only available via the npm CLI.\n\n### Using the command line\n\nTo unpublish a single version of a package, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:\n\n```\nnpm unpublish <package-name>@<version>\n```\n\n## When to unpublish\n\nUnpublishing a package permanently removes the package from the registry so it is no longer available for other users to install. Once a package is unpublished, republishing under the same name is blocked for 24 hours. If you've unpublished a package by mistake, we'd recommend publishing again under a different name, or for unpublished versions, bumping the version number and publishing again.\n\nYou might want to unpublish a package because you:\n\n* Published something accidentally.\n* Wanted to test npm.\n* Published content you [didn't intend to be public][oh-no].\n* Want to rename a package. (The only way to rename a package is to re-publish it under a new name)\n\n<Note>\n\n**Note:** `package-name@version` is unique, and cannot be reused by unpublishing and re-publishing it. We recommend publishing a minor version update instead.\n\n</Note>\n\n## When to deprecate\n\nIf you are no longer interested in maintaining a package, but want it to remain available for users to install, or if your package has dependents, we'd recommend [deprecating][deprecate-cli] it. To learn about how to deprecate a package, see \"[Deprecating and undeprecating packages or package versions][deprecate-package]\".\n\n\n[oh-no]: https://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to\n[deprecate-cli]: cli/deprecate\n[deprecate-package]: deprecating-and-undeprecating-packages-or-package-versions\n[two-factor-auth]: about-two-factor-authentication\n[unpublish]: /policies/unpublish\n[unpublish-cli]: /cli/unpublish\n"},{"id":"9b5f2016-386b-5b39-9579-da42ffe62e33","frontmatter":{"title":"Updating your published package version number"},"rawBody":"---\ntitle: Updating your published package version number\n---\n\nWhen you make significant changes to a published package, we recommend updating the version number to communicate the extent of the changes to others who rely on your code.\n\n<Note>\n\n**Note:** If you have linked a git repository to a package, updating the package version number will also add a tag with the updated release number to the linked git repository.\n\n</Note>\n\n1. To change the version number in `package.json`, on the command line, in the package root directory, run the following command, replacing `<update_type>` with one of the [semantic versioning][semver] release types (patch, major, or minor):\n\n   ```\n   npm version <update_type>\n   ```\n\n2. Run `npm publish`.\n\n3. Go to your package page (`https://npmjs.com/package/<package>`) to check that the package version has been updated.\n\nFor more information on `npm version`, see the [CLI documentation][cli-version].\n\n\n[semver]: about-semantic-versioning\n[cli-version]: /cli/version\n"},{"id":"87031dd6-68de-5593-aa55-54ed06e097c4","frontmatter":{"title":"CLI Commands"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/nav.yml\ntitle: CLI Commands\n---\n\n<Index depth=\"1\" />\n"},{"id":"d624a318-4150-5c8a-aaa2-69946b51e041","frontmatter":{"title":"npm-access"},"rawBody":"---\ntitle: npm-access\nsection: 1\ndescription: Set access level on published packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-access.md\n---\n\n### Synopsis\n\n```bash\nnpm access public [<package>]\nnpm access restricted [<package>]\n\nnpm access grant <read-only|read-write> <scope:team> [<package>]\nnpm access revoke <scope:team> [<package>]\n\nnpm access 2fa-required [<package>]\nnpm access 2fa-not-required [<package>]\n\nnpm access ls-packages [<user>|<scope>|<scope:team>]\nnpm access ls-collaborators [<package> [<user>]]\nnpm access edit [<package>]\n```\n\n### Description\n\nUsed to set access controls on private packages.\n\nFor all of the subcommands, `npm access` will perform actions on the packages\nin the current working directory if no package name is passed to the\nsubcommand.\n\n* public / restricted:\n  Set a package to be either publicly accessible or restricted.\n\n* grant / revoke:\n  Add or remove the ability of users and teams to have read-only or read-write\n  access to a package.\n\n* 2fa-required / 2fa-not-required:\n  Configure whether a package requires that anyone publishing it have two-factor\n  authentication enabled on their account.\n\n* ls-packages:\n  Show all of the packages a user or a team is able to access, along with the\n  access level, except for read-only public packages (it won't print the whole\n  registry listing)\n\n* ls-collaborators:\n  Show all of the access privileges for a package. Will only show permissions\n  for packages to which you have at least read access. If `<user>` is passed in,\n  the list is filtered only to teams _that_ user happens to belong to.\n\n* edit:\n  Set the access privileges for a package at once using `$EDITOR`.\n\n### Details\n\n`npm access` always operates directly on the current registry, configurable\nfrom the command line using `--registry=<registry url>`.\n\nUnscoped packages are *always public*.\n\nScoped packages *default to restricted*, but you can either publish them as\npublic using `npm publish --access=public`, or set their access as public using\n`npm access public` after the initial publish.\n\nYou must have privileges to set the access of a package:\n\n* You are an owner of an unscoped or scoped package.\n* You are a member of the team that owns a scope.\n* You have been given read-write privileges for a package, either as a member\n  of a team or directly as an owner.\n\nIf you have two-factor authentication enabled then you'll have to pass in an\notp with `--otp` when making access changes.\n\nIf your account is not paid, then attempts to publish scoped packages will fail\nwith an HTTP 402 status code (logically enough), unless you use\n`--access=public`.\n\nManagement of teams and team memberships is done with the `npm team` command.\n\n### See Also\n\n* [`libnpmaccess`](https://npm.im/libnpmaccess)\n* [npm team](/cli/v6/commands/npm-team)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm config](/cli/v6/commands/npm-config)\n* [npm registry](/cli/v6/using-npm/registry)\n"},{"id":"56282ba5-718f-58fe-8c4e-7c079f7ddff2","frontmatter":{"title":"npm-adduser"},"rawBody":"---\ntitle: npm-adduser\nsection: 1\ndescription: Add a registry user account\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-adduser.md\n---\n\n### Synopsis\n\n```bash\nnpm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]\n\naliases: login, add-user\n```\n\n### Description\n\nCreate or verify a user named `<username>` in the specified registry, and\nsave the credentials to the `.npmrc` file. If no registry is specified,\nthe default registry will be used (see [`config`](/cli/v6/using-npm/config)).\n\nThe username, password, and email are read in from prompts.\n\nTo reset your password, go to <https://www.npmjs.com/forgot>\n\nTo change your email address, go to <https://www.npmjs.com/email-edit>\n\nYou may use this command multiple times with the same user account to\nauthorize on a new machine.  When authenticating on a new machine,\nthe username, password and email address must all match with\nyour existing record.\n\n`npm login` is an alias to `adduser` and behaves exactly the same way.\n\n### Configuration\n\n#### registry\n\nDefault: https://registry.npmjs.org/\n\nThe base URL of the npm package registry. If `scope` is also specified,\nthis registry will only be used for packages with that scope. `scope` defaults\nto the scope of the project directory you're currently in, if any. See [`scope`](/cli/v6/using-npm/scope).\n\n#### scope\n\nDefault: none\n\nIf specified, the user and login credentials given will be associated\nwith the specified scope. See [`scope`](/cli/v6/using-npm/scope). You can use both at the same time,\ne.g.\n\n```bash\n    npm adduser --registry=http://myregistry.example.com --scope=@myco\n```    \n\nThis will set a registry for the given scope and login or create a user for\nthat registry at the same time.\n\n#### always-auth\n\nDefault: false\n\nIf specified, save configuration indicating that all requests to the given\nregistry should include authorization information. Useful for private\nregistries. Can be used with `--registry` and / or `--scope`, e.g.\n\n```bash\n    npm adduser --registry=http://private-registry.example.com --always-auth\n```\n\nThis will ensure that all requests to that registry (including for tarballs)\ninclude an authorization header. This setting may be necessary for use with\nprivate registries where metadata and package tarballs are stored on hosts with\ndifferent hostnames. See `always-auth` in [`config`](/cli/v6/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration.\n\n#### auth-type\n\n* Default: `'legacy'`\n* Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`\n\nWhat authentication strategy to use with `adduser`/`login`. Some npm registries\n(for example, npmE) might support alternative auth strategies besides classic\nusername/password entry in legacy npm.\n\n### See Also\n\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm owner](/cli/v6/commands/npm-owner)\n* [npm whoami](/cli/v6/commands/npm-whoami)\n"},{"id":"ce51fb4a-50b8-5d03-8a87-920dbd121e84","frontmatter":{"title":"npm-audit"},"rawBody":"---\ntitle: npm-audit\nsection: 1\ndescription: Run a security audit\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-audit.md\n---\n\n### Synopsis\n\n```bash\nnpm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]\nnpm audit fix [--force|--package-lock-only|--dry-run]\n\ncommon options: [--production] [--only=(dev|prod)]\n```\n\n### Examples\n\nScan your project for vulnerabilities and automatically install any compatible\nupdates to vulnerable dependencies:\n```bash\n$ npm audit fix\n```\n\nRun `audit fix` without modifying `node_modules`, but still updating the\npkglock:\n```bash\n$ npm audit fix --package-lock-only\n```\n\nSkip updating `devDependencies`:\n```bash\n$ npm audit fix --only=prod\n```\n\nHave `audit fix` install semver-major updates to toplevel dependencies, not just\nsemver-compatible ones:\n```bash\n$ npm audit fix --force\n```\n\nDo a dry run to get an idea of what `audit fix` will do, and _also_ output\ninstall information in JSON format:\n```bash\n$ npm audit fix --dry-run --json\n```\n\nScan your project for vulnerabilities and just show the details, without fixing\nanything:\n```bash\n$ npm audit\n```\n\nGet the detailed audit report in JSON format:\n```bash\n$ npm audit --json\n```\n\nGet the detailed audit report in plain text result, separated by tab characters, allowing for\nfuture reuse in scripting or command line post processing, like for example, selecting\nsome of the columns printed:\n```bash\n$ npm audit --parseable\n```\n\nTo parse columns, you can use for example `awk`, and just print some of them:\n```bash\n$ npm audit --parseable | awk -F $'\\t' '{print $1,$4}'\n```\n\nFail an audit only if the results include a vulnerability with a level of moderate or higher:\n```bash\n$ npm audit --audit-level=moderate\n```\n\n### Description\n\nThe audit command submits a description of the dependencies configured in\nyour project to your default registry and asks for a report of known\nvulnerabilities. The report returned includes instructions on how to act on\nthis information. The command will exit with a 0 exit code if no\nvulnerabilities were found.\n\nYou can also have npm automatically fix the vulnerabilities by running `npm\naudit fix`. Note that some vulnerabilities cannot be fixed automatically and\nwill require manual intervention or review. Also note that since `npm audit fix`\nruns a full-fledged `npm install` under the hood, all configs that apply to the\ninstaller will also apply to `npm install` -- so things like `npm audit fix\n--package-lock-only` will work as expected.\n\nBy default, the audit command will exit with a non-zero code if any vulnerability\nis found. It may be useful in CI environments to include the `--audit-level` parameter\nto specify the minimum vulnerability level that will cause the command to fail. This\noption does not filter the report output, it simply changes the command's failure\nthreshold.\n\n### Content Submitted\n\n* npm_version\n* node_version\n* platform\n* node_env\n* A scrubbed version of your package-lock.json or npm-shrinkwrap.json\n\n#### Scrubbing\n\nIn order to ensure that potentially sensitive information is not included in\nthe audit data bundle, some dependencies may have their names (and sometimes\nversions) replaced with opaque non-reversible identifiers.  It is done for\nthe following dependency types:\n\n* Any module referencing a scope that is configured for a non-default\n  registry has its name scrubbed.  (That is, a scope you did a `npm login --scope=@ourscope` for.)\n* All git dependencies have their names and specifiers scrubbed.\n* All remote tarball dependencies have their names and specifiers scrubbed.\n* All local directory and tarball dependencies have their names and specifiers scrubbed.\n\nThe non-reversible identifiers are a sha256 of a session-specific UUID and the\nvalue being replaced, ensuring a consistent value within the payload that is\ndifferent between runs.\n\n### Exit Code\n\nThe `npm audit` command will exit with a 0 exit code if no vulnerabilities were found.\n\nIf vulnerabilities were found the exit code will depend on the `audit-level`\nconfiguration setting.\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [package-locks](/cli/v6/configuring-npm/package-locks)\n* [config](/cli/v6/using-npm/config)\n"},{"id":"35860864-7510-556a-a070-acf9316b0cb9","frontmatter":{"title":"npm-bin"},"rawBody":"---\ntitle: npm-bin\nsection: 1\ndescription: Display npm bin folder\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-bin.md\n---\n\n### Synopsis\n```bash\nnpm bin [-g|--global]\n```\n\n### Description\n\nPrint the folder where npm will install executables.\n\n### See Also\n\n* [npm prefix](/cli/v6/commands/npm-prefix)\n* [npm root](/cli/v6/commands/npm-root)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"86ad796b-f3f9-55ab-a183-fecd20583d05","frontmatter":{"title":"npm-bugs"},"rawBody":"---\ntitle: npm-bugs\nsection: 1\ndescription: Bugs for a package in a web browser maybe\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-bugs.md\n---\n\n### Synopsis\n```bash\nnpm bugs [<pkgname>]\n\naliases: issues\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's\nbug tracker URL, and then tries to open it using the `--browser`\nconfig param. If no package name is provided, it will search for\na `package.json` in the current folder and use the `name` property.\n\n### Configuration\n\n#### browser\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: String\n\nThe browser that is called by the `npm bugs` command to open websites.\n\n#### registry\n\n* Default: https://registry.npmjs.org/\n* Type: url\n\nThe base URL of the npm package registry.\n\n\n### See Also\n\n* [npm docs](/cli/v6/commands/npm-docs)\n* [npm view](/cli/v6/commands/npm-view)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [package.json](/cli/v6/configuring-npm/package-json)\n"},{"id":"1b580263-503b-5bc5-bf2b-76aef1a83d85","frontmatter":{"title":"npm-build"},"rawBody":"---\ntitle: npm-build\nsection: 1\ndescription: Build a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-build.md\n---\n\n### Synopsis\n```shell\nnpm build [<package-folder>]\n```\n\n* `<package-folder>`:\n  A folder containing a `package.json` file in its root.\n\n### Description\n\nThis is the plumbing command called by `npm link` and `npm install`.\n\nIt should generally be called during installation, but if you need to run it\ndirectly, run:\n```bash\n    npm build\n```\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [npm link](/cli/v6/commands/npm-link)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [package.json](/cli/v6/configuring-npm/package-json)\n"},{"id":"3f229705-f996-5169-8477-94818e3c2515","frontmatter":{"title":"npm-bundle"},"rawBody":"---\ntitle: npm-bundle\nsection: 1\ndescription: REMOVED\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-bundle.md\n---\n\n### Description\n\nThe `npm bundle` command has been removed in 1.0, for the simple reason\nthat it is no longer necessary, as the default behavior is now to\ninstall packages into the local space.\n\nJust use `npm install` now to do what `npm bundle` used to do.\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"679734a4-84cd-5487-9280-1e027d8d83e0","frontmatter":{"title":"npm-cache"},"rawBody":"---\ntitle: npm-cache\nsection: 1\ndescription: Manipulates packages cache\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-cache.md\n---\n\n### Synopsis\n\n```bash\nnpm cache add <tarball file>\nnpm cache add <folder>\nnpm cache add <tarball url>\nnpm cache add <name>@<version>\n\nnpm cache clean [<path>]\naliases: npm cache clear, npm cache rm\n\nnpm cache verify\n```\n\n### Description\n\nUsed to add, list, or clean the npm cache folder.\n\n* add:\n  Add the specified package to the local cache.  This command is primarily\n  intended to be used internally by npm, but it can provide a way to\n  add data to the local installation cache explicitly.\n\n* clean:\n  Delete all data out of the cache folder.\n\n* verify:\n  Verify the contents of the cache folder, garbage collecting any unneeded data,\n  and verifying the integrity of the cache index and all cached data.\n\n### Details\n\nnpm stores cache data in an opaque directory within the configured `cache`,\nnamed `_cacache`. This directory is a `cacache`-based content-addressable cache\nthat stores all http request data as well as other package-related data. This\ndirectory is primarily accessed through `pacote`, the library responsible for\nall package fetching as of npm@5.\n\nAll data that passes through the cache is fully verified for integrity on both\ninsertion and extraction. Cache corruption will either trigger an error, or\nsignal to `pacote` that the data must be refetched, which it will do\nautomatically. For this reason, it should never be necessary to clear the cache\nfor any reason other than reclaiming disk space, thus why `clean` now requires\n`--force` to run.\n\nThere is currently no method exposed through npm to inspect or directly manage\nthe contents of this cache. In order to access it, `cacache` must be used\ndirectly.\n\nnpm will not remove data by itself: the cache will grow as new packages are\ninstalled.\n\n### A note about the cache's design\n\nThe npm cache is strictly a cache: it should not be relied upon as a persistent\nand reliable data store for package data. npm makes no guarantee that a\npreviously-cached piece of data will be available later, and will automatically\ndelete corrupted contents. The primary guarantee that the cache makes is that,\nif it does return data, that data will be exactly the data that was inserted.\n\nTo run an offline verification of existing cache contents, use `npm cache\nverify`.\n\n### Configuration\n\n#### cache\n\nDefault: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows.\n\nThe root cache folder.\n\n### See Also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm pack](/cli/v6/commands/npm-pack)\n* https://npm.im/cacache\n* https://npm.im/pacote\n"},{"id":"ca93a0a3-f79b-5d9a-a468-01605ba7ea46","frontmatter":{"title":"npm-ci"},"rawBody":"---\ntitle: npm-ci\nsection: 1\ndescription: Install a project with a clean slate\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-ci.md\n---\n\n### Synopsis\n```bash\nnpm ci\n```\n\n### Example\n\nMake sure you have a package-lock and an up-to-date install:\n\n```bash\n$ cd ./my/npm/project\n$ npm install\nadded 154 packages in 10s\n$ ls | grep package-lock\n```\n\nRun `npm ci` in that project\n\n```bash\n$ npm ci\nadded 154 packages in 5s\n```\n\nConfigure Travis to build using `npm ci` instead of `npm install`:\n\n```bash\n# .travis.yml\ninstall:\n- npm ci\n# keep the npm cache around to speed up installs\ncache:\n  directories:\n  - \"$HOME/.npm\"\n```\n\n### Description\n\nThis command is similar to [`npm install`](/cli/v6/commands/npm-install), except it's meant to be used in\nautomated environments such as test platforms, continuous integration, and\ndeployment -- or any situation where you want to make sure you're doing a clean\ninstall of your dependencies. It can be significantly faster than a regular npm\ninstall by skipping certain user-oriented features. It is also more strict than\na regular install, which can help catch errors or inconsistencies caused by the\nincrementally-installed local environments of most npm users.\n\nIn short, the main differences between using `npm install` and `npm ci` are:\n\n* The project **must** have an existing `package-lock.json` or `npm-shrinkwrap.json`.\n* If dependencies in the package lock do not match those in `package.json`, `npm ci` will exit with an error, instead of updating the package lock.\n* `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command.\n* If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install.\n* It will never write to `package.json` or any of the package-locks: installs are essentially frozen.\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [package-locks](/cli/v6/configuring-npm/package-locks)\n"},{"id":"84cd9146-af0d-58f8-a84a-5680ca3b515d","frontmatter":{"title":"npm-completion"},"rawBody":"---\ntitle: npm-completion\nsection: 1\ndescription: Tab Completion for npm\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-completion.md\n---\n\n### Synopsis\n```bash\nsource <(npm completion)\n```\n\n### Description\n\nEnables tab-completion in all npm commands.\n\nThe synopsis above\nloads the completions into your current shell.  Adding it to\nyour ~/.bashrc or ~/.zshrc will make the completions available\neverywhere:\n\n```bash\nnpm completion >> ~/.bashrc\nnpm completion >> ~/.zshrc\n```\n\nYou may of course also pipe the output of `npm completion` to a file\nsuch as `/usr/local/etc/bash_completion.d/npm` or \n`/etc/bash_completion.d/npm` if you have a system that will read \nthat file for you.\n\nWhen `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the\nenvironment, `npm completion` acts in \"plumbing mode\", and outputs\ncompletions based on the arguments.\n\n### See Also\n\n* [npm developers](/cli/v6/using-npm/developers)\n* [npm](/cli/v6/commands/npm)\n"},{"id":"70ca1a7f-b780-512e-a4b1-8040b72d3f81","frontmatter":{"title":"npm-config"},"rawBody":"---\ntitle: npm-config\nsection: 1\ndescription: Manage the npm configuration files\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-config.md\n---\n\n### Synopsis\n```bash\nnpm config set <key> <value> [-g|--global]\nnpm config get <key>\nnpm config delete <key>\nnpm config list [-l] [--json]\nnpm config edit\nnpm get <key>\nnpm set <key> <value> [-g|--global]\n\naliases: c\n```\n\n### Description\n\nnpm gets its config settings from the command line, environment\nvariables, `npmrc` files, and in some cases, the `package.json` file.\n\nSee [npmrc](/cli/v6/configuring-npm/npmrc) for more information about the npmrc files.\n\nSee [config](/cli/v6/using-npm/config) for a more thorough discussion of the mechanisms\ninvolved.\n\nThe `npm config` command can be used to update and edit the contents\nof the user and global npmrc files.\n\n### Sub-commands\n\nConfig supports the following sub-commands:\n\n#### set\n```bash\nnpm config set key value\n```\nSets the config key to the value.\n\nIf value is omitted, then it sets it to \"true\".\n\n#### get\n```bash\nnpm config get key\n```\n\nEcho the config value to stdout.\n\n#### list\n```bash\nnpm config list\n```\n\nShow all the config settings. Use `-l` to also show defaults. Use `--json`\nto show the settings in json format.\n\n#### delete\n```bash\nnpm config delete key\n```\n\nDeletes the key from all configuration files.\n\n#### edit\n```bash\nnpm config edit\n```\n\nOpens the config file in an editor.  Use the `--global` flag to edit the\nglobal config.\n\n### See Also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm](/cli/v6/commands/npm)\n"},{"id":"bfda055d-b160-52c2-9b5d-675ce3cdd0db","frontmatter":{"title":"npm-dedupe"},"rawBody":"---\ntitle: npm-dedupe\nsection: 1\ndescription: Reduce duplication\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-dedupe.md\n---\n\n### Synopsis\n```bash\nnpm dedupe\nnpm ddp\n\naliases: find-dupes, ddp\n```\n\n### Description\n\nSearches the local package tree and attempts to simplify the overall\nstructure by moving dependencies further up the tree, where they can\nbe more effectively shared by multiple dependent packages.\n\nFor example, consider this dependency graph:\n\n```bash\na\n+-- b <-- depends on c@1.0.x\n|   `-- c@1.0.3\n`-- d <-- depends on c@~1.0.9\n    `-- c@1.0.10\n```\n\nIn this case, `npm dedupe` will transform the tree to:\n\n```bash\na\n+-- b\n+-- d\n`-- c@1.0.10\n```\n\nBecause of the hierarchical nature of node's module lookup, b and d\nwill both get their dependency met by the single c package at the root\nlevel of the tree.\n\nThe deduplication algorithm walks the tree, moving each dependency as far\nup in the tree as possible, even if duplicates are not found. This will\nresult in both a flat and deduplicated tree.\n\nIf a suitable version exists at the target location in the tree\nalready, then it will be left untouched, but the other duplicates will\nbe deleted.\n\nArguments are ignored. Dedupe always acts on the entire tree.\n\nModules\n\nNote that this operation transforms the dependency tree, but will never\nresult in new modules being installed.\n\n### See Also\n\n* [npm ls](/cli/v6/commands/npm-ls)\n* [npm update](/cli/v6/commands/npm-update)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"9ea5feb3-b5a3-538e-9b9b-60d12f632e4b","frontmatter":{"title":"npm-deprecate"},"rawBody":"---\ntitle: npm-deprecate\nsection: 1\ndescription: Deprecate a version of a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-deprecate.md\n---\n\n### Synopsis\n```bash\nnpm deprecate <pkg>[@<version>] <message>\n```\n\n### Description\n\nThis command will update the npm registry entry for a package, providing\na deprecation warning to all who attempt to install it.\n\nIt works on [version ranges](https://semver.npmjs.com/) as well as specific \nversions, so you can do something like this:\n```bash\nnpm deprecate my-thing@\"< 0.2.3\" \"critical bug fixed in v0.2.3\"\n```\n\nNote that you must be the package owner to deprecate something.  See the\n`owner` and `adduser` help topics.\n\nTo un-deprecate a package, specify an empty string (`\"\"`) for the `message` \nargument. Note that you must use double quotes with no space between them to \nformat an empty string.\n\n### See Also\n\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm registry](/cli/v6/using-npm/registry)\n"},{"id":"288265f9-aebc-5ec1-bb41-cd8121edff9f","frontmatter":{"title":"npm-dist-tag"},"rawBody":"---\ntitle: npm-dist-tag\nsection: 1\ndescription: Modify package distribution tags\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-dist-tag.md\n---\n\n### Synopsis\n```bash\nnpm dist-tag add <pkg>@<version> [<tag>]\nnpm dist-tag rm <pkg> <tag>\nnpm dist-tag ls [<pkg>]\n\naliases: dist-tags\n```\n\n### Description\n\nAdd, remove, and enumerate distribution tags on a package:\n\n* add:\n  Tags the specified version of the package with the specified tag, or the\n  `--tag` config if not specified. If you have two-factor authentication on\n  auth-and-writes then you’ll need to include a one-time password on the\n  command line with `--otp <one-time password>`.\n\n* rm:\n  Clear a tag that is no longer in use from the package.\n\n* ls:\n  Show all of the dist-tags for a package, defaulting to the package in\n  the current prefix. This is the default action if none is specified.\n\nA tag can be used when installing packages as a reference to a version instead\nof using a specific version number:\n\n```bash\nnpm install <name>@<tag>\n```\n\nWhen installing dependencies, a preferred tagged version may be specified:\n\n```bash\nnpm install --tag <tag>\n```\n\nThis also applies to `npm dedupe`.\n\nPublishing a package sets the `latest` tag to the published version unless the\n`--tag` option is used. For example, `npm publish --tag=beta`.\n\nBy default, `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag.\n\n### Purpose\n\nTags can be used to provide an alias instead of version numbers.\n\nFor example, a project might choose to have multiple streams of development\nand use a different tag for each stream,\ne.g., `stable`, `beta`, `dev`, `canary`.\n\nBy default, the `latest` tag is used by npm to identify the current version of\na package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag. Typically, projects only use the `latest`\ntag for stable release versions, and use other tags for unstable versions such\nas prereleases.\n\nThe `next` tag is used by some projects to identify the upcoming version.\n\nBy default, other than `latest`, no tag has any special significance to npm\nitself.\n\n### Caveats\n\nThis command used to be known as `npm tag`, which only created new tags, and so\nhad a different syntax.\n\nTags must share a namespace with version numbers, because they are specified in\nthe same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`.\n\nTags that can be interpreted as valid semver ranges will be rejected. For\nexample, `v1.4` cannot be used as a tag, because it is interpreted by semver as\n`>=1.4.0 <1.5.0`.  See <https://github.com/npm/npm/issues/6082>.\n\nThe simplest way to avoid semver problems with tags is to use tags that do not\nbegin with a number or the letter `v`.\n\n### See Also\n\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm dedupe](/cli/v6/commands/npm-dedupe)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"fe5d9c8f-e7c5-5811-9fd2-410e277affde","frontmatter":{"title":"npm-docs"},"rawBody":"---\ntitle: npm-docs\nsection: 1\ndescription: Docs for a package in a web browser maybe\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-docs.md\n---\n\n### Synopsis\n\n```bash\nnpm docs [<pkgname> [<pkgname> ...]]\nnpm docs .\nnpm home [<pkgname> [<pkgname> ...]]\nnpm home .\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's\ndocumentation URL, and then tries to open it using the `--browser`\nconfig param. You can pass multiple package names at once. If no\npackage name is provided, it will search for a `package.json` in\nthe current folder and use the `name` property.\n\n### Configuration\n\n#### browser\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: String\n\nThe browser that is called by the `npm docs` command to open websites.\n\n#### registry\n\n* Default: https://registry.npmjs.org/\n* Type: url\n\nThe base URL of the npm package registry.\n\n\n### See Also\n\n* [npm view](/cli/v6/commands/npm-view)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [package.json](/cli/v6/configuring-npm/package-json)\n"},{"id":"b3646d42-771c-5781-8be1-d53d236233a9","frontmatter":{"title":"npm-doctor"},"rawBody":"---\ntitle: npm-doctor\nsection: 1\ndescription: Check your environments\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-doctor.md\n---\n\n### Synopsis\n\n```bash\nnpm doctor\n```\n\n### Description\n\n`npm doctor` runs a set of checks to ensure that your npm installation has\nwhat it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does\nhave some basic requirements that must be met:\n\n+ Node.js and git must be executable by npm.\n+ The primary npm registry, `registry.npmjs.com`, or another service that uses\n  the registry API, is available.\n+ The directories that npm uses, `node_modules` (both locally and globally),\n  exist and can be written by the current user.\n+ The npm cache exists, and the package tarballs within it aren't corrupt.\n\nWithout all of these working properly, npm may not work properly.  Many issues\nare often attributable to things that are outside npm's code base, so `npm\ndoctor` confirms that the npm installation is in a good state.\n\nAlso, in addition to this, there are also very many issue reports due to using\nold versions of npm. Since npm is constantly improving, running `npm@latest` is\nbetter than an old version.\n\n`npm doctor` verifies the following items in your environment, and if there are\nany recommended changes, it will display them.\n\n#### `npm ping`\n\nBy default, npm installs from the primary npm registry, `registry.npmjs.org`.\n`npm doctor` hits a special ping endpoint within the registry. This can also be\nchecked with `npm ping`. If this check fails, you may be using a proxy that\nneeds to be configured, or may need to talk to your IT staff to get access over\nHTTPS to `registry.npmjs.org`.\n\nThis check is done against whichever registry you've configured (you can see\nwhat that is by running `npm config get registry`), and if you're using a\nprivate registry that doesn't support the `/whoami` endpoint supported by the\nprimary registry, this check may fail.\n\n#### `npm -v`\n\nWhile Node.js may come bundled with a particular version of npm, it's the\npolicy of the CLI team that we recommend all users run `npm@latest` if they\ncan. As the CLI is maintained by a small team of contributors, there are only\nresources for a single line of development, so npm's own long-term support\nreleases typically only receive critical security and regression fixes. The\nteam believes that the latest tested version of npm is almost always likely to\nbe the most functional and defect-free version of npm.\n\n#### `node -v`\n\nFor most users, in most circumstances, the best version of Node will be the\nlatest long-term support (LTS) release. Those of you who want access to new\nECMAscript features or bleeding-edge changes to Node's standard library may be\nrunning a newer version, and some of you may be required to run an older\nversion of Node because of enterprise change control policies. That's OK! But\nin general, the npm team recommends that most users run Node.js LTS.\n\n#### `npm config get registry`\n\nSome of you may be installing from private package registries for your project\nor company. That's great! Others of you may be following tutorials or\nStackOverflow questions in an effort to troubleshoot problems you may be\nhaving. Sometimes, this may entail changing the registry you're pointing at.\nThis part of `npm doctor` just lets you, and maybe whoever's helping you with\nsupport, know that you're not using the default registry.\n\n#### `which git`\n\nWhile it's documented in the README, it may not be obvious that npm needs Git\ninstalled to do many of the things that it does. Also, in some cases\n– especially on Windows – you may have Git set up in such a way that it's not\naccessible via your `PATH` so that npm can find it. This check ensures that Git\nis available.\n\n#### Permissions checks\n\n* Your cache must be readable and writable by the user running npm.\n* Global package binaries must be writable by the user running npm.\n* Your local `node_modules` path, if you're running `npm doctor` with a project\n  directory, must be readable and writable by the user running npm.\n\n#### Validate the checksums of cached packages\n\nWhen an npm package is published, the publishing process generates a checksum\nthat npm uses at install time to verify that the package didn't get corrupted\nin transit. `npm doctor` uses these checksums to validate the package tarballs\nin your local cache (you can see where that cache is located with `npm config\nget cache`, and see what's in that cache with `npm cache ls` – probably more\nthan you were expecting!). In the event that there are corrupt packages in your\ncache, you should probably run `npm cache clean` and reset the cache.\n\n### See Also\n\n* [npm bugs](/cli/v6/commands/npm-bugs)\n* [npm help](/cli/v6/commands/npm-help)\n* [npm ping](/cli/v6/commands/npm-ping)\n"},{"id":"af6fd056-420d-53f4-af8e-3e7fb91d1a54","frontmatter":{"title":"npm-edit"},"rawBody":"---\ntitle: npm-edit\nsection: 1\ndescription: Edit an installed package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-edit.md\n---\n\n### Synopsis\n\n```bash\nnpm edit <pkg>[/<subpkg>...]\n```\n\n### Description\n\nSelects a (sub)dependency in the current\nworking directory and opens the package folder in the default editor\n(or whatever you've configured as the npm `editor` config -- see\n[`npm-config`](npm-config).)\n\nAfter it has been edited, the package is rebuilt so as to pick up any\nchanges in compiled packages.\n\nFor instance, you can do `npm install connect` to install connect\ninto your package, and then `npm edit connect` to make a few\nchanges to your locally installed copy.\n\n### Configuration\n\n#### editor\n\n* Default: `EDITOR` environment variable if set, or `\"vi\"` on Posix,\n  or `\"notepad\"` on Windows.\n* Type: path\n\nThe command to run for `npm edit` or `npm config edit`.\n\n### See Also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm explore](/cli/v6/commands/npm-explore)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"0ffc3b3a-0889-58a4-9dcf-ebdb4092ac09","frontmatter":{"title":"npm-explore"},"rawBody":"---\ntitle: npm-explore\nsection: 1\ndescription: Browse an installed package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-explore.md\n---\n\n### Synopsis\n\n```bash\nnpm explore <pkg> [ -- <command>]\n```\n\n### Description\n\nSpawn a subshell in the directory of the installed package specified.\n\nIf a command is specified, then it is run in the subshell, which then\nimmediately terminates.\n\nThis is particularly handy in the case of git submodules in the\n`node_modules` folder:\n\n```bash\nnpm explore some-dependency -- git pull origin master\n```\n\nNote that the package is *not* automatically rebuilt afterwards, so be\nsure to use `npm rebuild <pkg>` if you make any changes.\n\n### Configuration\n\n#### shell\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd\" on\n  Windows\n* Type: path\n\nThe shell to run for the `npm explore` command.\n\n### See Also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm edit](/cli/v6/commands/npm-edit)\n* [npm rebuild](/cli/v6/commands/npm-rebuild)\n* [npm build](/cli/v6/commands/npm-build)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"5a1649c3-6819-5495-8548-7e6ec06e1024","frontmatter":{"title":"npm-fund"},"rawBody":"---\ntitle: npm-fund\nsection: 1\ndescription: Retrieve funding information\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-fund.md\n---\n\n### Synopsis\n\n```bash\n    npm fund [<pkg>]\n```\n\n### Description\n\nThis command retrieves information on how to fund the dependencies of\na given project. If no package name is provided, it will list all\ndependencies that are looking for funding in a tree-structure in which\nare listed the type of funding and the url to visit. If a package name\nis provided then it tries to open its funding url using the `--browser`\nconfig param; if there are multiple funding sources for the package, the\nuser will be instructed to pass the `--which` command to disambiguate.\n\nThe list will avoid duplicated entries and will stack all packages\nthat share the same type/url as a single entry. Given this nature the\nlist is not going to have the same shape of the output from `npm ls`.\n\n### Configuration\n\n#### browser\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: String\n\nThe browser that is called by the `npm fund` command to open websites.\n\n#### json\n\n* Type: Boolean\n* Default: false\n\nShow information in JSON format.\n\n#### unicode\n\n* Type: Boolean\n* Default: true\n\nWhether to represent the tree structure using unicode characters.\nSet it to `false` in order to use all-ansi output.\n\n#### which\n\n* Type: Number\n* Default: undefined\n\nIf there are multiple funding sources, which 1-indexed source URL to open.\n\n## See Also\n\n* [npm docs](/cli/v6/commands/npm-docs)\n* [npm config](/cli/v6/commands/npm-config)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm ls](/cli/v6/commands/npm-ls)\n\n"},{"id":"d6d78c2a-5d49-5b55-86d1-c413aa42af84","frontmatter":{"title":"npm-help-search"},"rawBody":"---\ntitle: npm-help-search\nsection: 1\ndescription: Search npm help documentation\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-help-search.md\n---\n\n### Synopsis\n\n```bash\nnpm help-search <text>\n```\n\n### Description\n\nThis command will search the npm markdown documentation files for the\nterms provided, and then list the results, sorted by relevance.\n\nIf only one result is found, then it will show that help topic.\n\nIf the argument to `npm help` is not a known help topic, then it will\ncall `help-search`.  It is rarely if ever necessary to call this\ncommand directly.\n\n### Configuration\n\n#### long\n\n* Type: Boolean\n* Default: false\n\nIf true, the \"long\" flag will cause help-search to output context around\nwhere the terms were found in the documentation.\n\nIf false, then help-search will just list out the help topics found.\n\n### See Also\n\n* [npm](/cli/v6/commands/npm)\n* [npm help](/cli/v6/commands/npm-help)\n"},{"id":"1270eeff-8112-5ea4-8e99-789b5bca14d5","frontmatter":{"title":"npm-help"},"rawBody":"---\ntitle: npm-help\nsection: 1\ndescription: Get help on npm\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-help.md\n---\n\n### Synopsis\n\n```bash\nnpm help <term> [<terms..>]\n```\n\n### Description\n\nIf supplied a topic, then show the appropriate documentation page.\n\nIf the topic does not exist, or if multiple terms are provided, then run\nthe `help-search` command to find a match.  Note that, if `help-search`\nfinds a single subject, then it will run `help` on that topic, so unique\nmatches are equivalent to specifying a topic name.\n\n### Configuration\n\n#### viewer\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: path\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n### See Also\n\n* [npm](/cli/v6/commands/npm)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm help-search](/cli/v6/commands/npm-help-search)\n"},{"id":"06052cc6-757b-5f1f-8c99-ceace6591a1c","frontmatter":{"title":"npm-hook"},"rawBody":"---\ntitle: npm-hook\nsection: 1\ndescription: Manage registry hooks\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-hook.md\n---\n\n### Synopsis\n\n```bash\nnpm hook ls [pkg]\nnpm hook add <entity> <url> <secret>\nnpm hook update <id> <url> [secret]\nnpm hook rm <id>\n```\n\n### Example\n\nAdd a hook to watch a package for changes:\n```bash\n$ npm hook add lodash https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages belonging to the user `substack`:\n```bash\n$ npm hook add ~substack https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages in the scope `@npm`\n```bash\n$ npm hook add @npm https://example.com/ my-shared-secret\n```\n\nList all your active hooks:\n```bash\n$ npm hook ls\n```\n\nList your active hooks for the `lodash` package:\n```bash\n$ npm hook ls lodash\n```\n\nUpdate an existing hook's url:\n```bash\n$ npm hook update id-deadbeef https://my-new-website.here/\n```\n\nRemove a hook:\n```bash\n$ npm hook rm id-deadbeef\n```\n\n### Description\n\nAllows you to manage [npm hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),\nincluding adding, removing, listing, and updating.\n\nHooks allow you to configure URL endpoints that will be notified whenever a\nchange happens to any of the supported entity types. Three different types of\nentities can be watched by hooks: packages, owners, and scopes.\n\nTo create a package hook, simply reference the package name.\n\nTo create an owner hook, prefix the owner name with `~` (as in, `~youruser`).\n\nTo create a scope hook, prefix the scope name with `@` (as in, `@yourscope`).\n\nThe hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` for\nthat particular hook.\n\nThe shared secret will be sent along to the URL endpoint so you can verify the\nrequest came from your own configured hook.\n\n### See Also\n\n* [\"Introducing Hooks\" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)\n"},{"id":"5cfa054f-6585-5be3-8a46-1263832cdbb9","frontmatter":{"title":"npm-init"},"rawBody":"---\ntitle: npm-init\nsection: 1\ndescription: create a package.json file\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-init.md\n---\n\n### Synopsis\n```bash\nnpm init [--force|-f|--yes|-y|--scope]\nnpm init <@scope> (same as `npx <@scope>/create`)\nnpm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)\n```\n\n### Examples\n\nCreate a new React-based project using [`create-react-app`](https://npm.im/create-react-app):\n```bash\n$ npm init react-app ./my-react-app\n```\n\nCreate a new `esm`-compatible package using [`create-esm`](https://npm.im/create-esm):\n```bash\n$ mkdir my-esm-lib && cd my-esm-lib\n$ npm init esm --yes\n```\n\nGenerate a plain old package.json using legacy init:\n```bash\n$ mkdir my-npm-pkg && cd my-npm-pkg\n$ git init\n$ npm init\n```\n\nGenerate it without having it ask any questions:\n```bash\n$ npm init -y\n```\n\n### Description\n\n`npm init <initializer>` can be used to set up a new or existing npm package.\n\n`initializer` in this case is an npm package named `create-<initializer>`, which\nwill be installed by [`npx`](https://npm.im/npx), and then have its main bin\nexecuted -- presumably creating or updating `package.json` and running any other\ninitialization-related operations.\n\nThe init command is transformed to a corresponding `npx` operation as follows:\n\n* `npm init foo` -> `npx create-foo`\n* `npm init @usr/foo` -> `npx @usr/create-foo`\n* `npm init @usr` -> `npx @usr/create`\n\nAny additional options will be passed directly to the command, so `npm init foo\n--hello` will map to `npx create-foo --hello`.\n\nIf the initializer is omitted (by just calling `npm init`), init will fall back\nto legacy init behavior. It will ask you a bunch of questions, and then write a\npackage.json for you. It will attempt to make reasonable guesses based on\nexisting fields, dependencies, and options selected. It is strictly additive, so\nit will keep any fields and values that were already set. You can also use\n`-y`/`--yes` to skip the questionnaire altogether. If you pass `--scope`, it\nwill create a scoped package.\n\n### See Also\n\n* <https://github.com/isaacs/init-package-json>\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm version](/cli/v6/commands/npm-version)\n* [npm scope](/cli/v6/using-npm/scope)\n"},{"id":"bf34eb7d-55a3-53d7-a9f8-54e074fd85db","frontmatter":{"title":"npm-install-ci-test"},"rawBody":"---\ntitle: npm-install-ci-test\nsection: 1\ndescription: Install a project with a clean slate and run tests\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-install-ci-test.md\n---\n\n### Synopsis\n\n```bash\nnpm install-ci-test\n\nalias: npm cit\n```\n\n### Description\n\nThis command runs an `npm ci` followed immediately by an `npm test`.\n\n### See Also\n\n* [npm ci](/cli/v6/commands/npm-ci)\n* [npm test](/cli/v6/commands/npm-test)\n"},{"id":"8216c32a-ac02-5fa8-b76c-9afe9950119e","frontmatter":{"title":"npm-install-test"},"rawBody":"---\ntitle: npm-install-test\nsection: 1\ndescription: Install package(s) and run tests\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-install-test.md\n---\n\n### Synopsis\n\n```bash\nnpm install-test (with no args, in package dir)\nnpm install-test [<@scope>/]<name>\nnpm install-test [<@scope>/]<name>@<tag>\nnpm install-test [<@scope>/]<name>@<version>\nnpm install-test [<@scope>/]<name>@<version range>\nnpm install-test <tarball file>\nnpm install-test <tarball url>\nnpm install-test <folder>\n\nalias: npm it\ncommon options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]\n```\n\n### Description\n\nThis command runs an `npm install` followed immediately by an `npm test`. It\ntakes exactly the same arguments as `npm install`.\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [npm test](/cli/v6/commands/npm-test)\n"},{"id":"a378dccc-31e1-5f0e-9857-b4cf1261f588","frontmatter":{"title":"npm-install"},"rawBody":"---\ntitle: npm-install\nsection: 1\ndescription: Install a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-install.md\n---\n\n### Synopsis\n\n```bash\nnpm install (with no args, in package dir)\nnpm install [<@scope>/]<name>\nnpm install [<@scope>/]<name>@<tag>\nnpm install [<@scope>/]<name>@<version>\nnpm install [<@scope>/]<name>@<version range>\nnpm install <alias>@npm:<name>\nnpm install <git-host>:<git-user>/<repo-name>\nnpm install <git repo url>\nnpm install <tarball file>\nnpm install <tarball url>\nnpm install <folder>\n\naliases: npm i, npm add\ncommon options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]\n```\n\n### Description\n\nThis command installs a package, and any packages that it depends on. If the\npackage has a package-lock or shrinkwrap file, the installation of dependencies\nwill be driven by that, with an `npm-shrinkwrap.json` taking precedence if both\nfiles exist. See [package-lock.json](/cli/v6/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli/v6/commands/npm-shrinkwrap).\n\nA `package` is:\n\n* a) a folder containing a program described by a [`package.json`](/cli/v6/configuring-npm/package-json) file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry (see [`registry`](/cli/v6/using-npm/registry)) with (c)\n* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v6/commands/npm-dist-tag)) that points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `<git remote url>` that resolves to (a)\n\nEven if you never publish your package, you can still get a lot of\nbenefits of using npm if you just want to write a node program (a), and\nperhaps if you also want to be able to easily install it elsewhere\nafter packing it up into a tarball (b).\n\n\n* `npm install` (in package directory, no arguments):\n\n    Install the dependencies in the local node_modules folder.\n\n    In global mode (ie, with `-g` or `--global` appended to the command),\n    it installs the current package context (ie, the current working\n    directory) as a global package.\n\n    By default, `npm install` will install all modules listed as dependencies\n    in [`package.json`](/cli/v6/configuring-npm/package-json).\n\n    With the `--production` flag (or when the `NODE_ENV` environment variable\n    is set to `production`), npm will not install modules listed in\n    `devDependencies`. To install all modules listed in both `dependencies` \n    and `devDependencies` when `NODE_ENV` environment variable is set to `production`, \n    you can use `--production=false`.\n\n    > NOTE: The `--production` flag has no particular meaning when adding a\n    dependency to a project.\n\n* `npm install <folder>`:\n\n    Install the package in the directory as a symlink in the current project.\n    Its dependencies will be installed before it's linked. If `<folder>` sits\n    inside the root of your project, its dependencies may be hoisted to the\n    toplevel `node_modules` as they would for other types of dependencies.\n\n* `npm install <tarball file>`:\n\n    Install a package that is sitting on the filesystem.  Note: if you just want\n    to link a dev directory into your npm root, you can do this more easily by\n    using `npm link`.\n\n    Tarball requirements:\n    * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as\n    the extension.\n    * The package contents should reside in a subfolder inside the tarball (usually it is called `package/`). npm strips one directory layer when installing the package (an equivalent of `tar x --strip-components=1` is run).\n    * The package must contain a `package.json` file with `name` and `version` properties.\n\n    Example:\n\n          npm install ./package.tgz\n\n* `npm install <tarball url>`:\n\n    Fetch the tarball url, and then install it.  In order to distinguish between\n    this and other options, the argument must start with \"http://\" or \"https://\"\n\n    Example:\n\n          npm install https://github.com/indexzero/forever/tarball/v0.5.6\n\n* `npm install [<@scope>/]<name>`:\n\n    Do a `<name>@<tag>` install, where `<tag>` is the \"tag\" config. (See\n    [`config`](/cli/v6/using-npm/config). The config's default value is `latest`.)\n\n    In most cases, this will install the version of the modules tagged as\n    `latest` on the npm registry.\n\n    Example:\n\n          npm install sax\n\n* `npm install <alias>@npm:<name>`:\n\n    Install a package under a custom alias. Allows multiple versions of\n    a same-name package side-by-side, more convenient import names for\n    packages with otherwise long ones and using git forks replacements\n    or forked npm packages as replacements. Aliasing works only on your\n    project and does not rename packages in transitive dependencies.\n    Aliases should follow the naming conventions stated in\n    [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).\n\n    Examples:\n\n          npm install my-react@npm:react\n          npm install jquery2@npm:jquery@2\n          npm install jquery3@npm:jquery@3\n          npm install npa@npm:npm-package-arg\n\n\n    `npm install` saves any specified packages into `dependencies` by default.\n    Additionally, you can control where and how they get saved with some\n    additional flags:\n\n    * `-P, --save-prod`: Package will appear in your `dependencies`. This is the\n                         default unless `-D` or `-O` are present.\n\n    * `-D, --save-dev`: Package will appear in your `devDependencies`.\n\n    * `-O, --save-optional`: Package will appear in your `optionalDependencies`.\n\n    * `--no-save`: Prevents saving to `dependencies`.\n\n    When using any of the above options to save dependencies to your\n    package.json, there are two additional, optional flags:\n\n    * `-E, --save-exact`: Saved dependencies will be configured with an\n      exact version rather than using npm's default semver range\n      operator.\n\n    * `-B, --save-bundle`: Saved dependencies will also be added to your `bundleDependencies` list.\n\n    Further, if you have an `npm-shrinkwrap.json` or `package-lock.json` then it\n    will be updated as well.\n\n    `<scope>` is optional. The package will be downloaded from the registry\n    associated with the specified scope. If no registry is associated with\n    the given scope the default registry is assumed. See [`scope`](/cli/v6/using-npm/scope).\n\n    Note: if you do not include the @-symbol on your scope name, npm will\n    interpret this as a GitHub repository instead, see below. Scopes names\n    must also be followed by a slash.\n\n    Examples:\n\n    ```bash\n    npm install sax\n    npm install githubname/reponame\n    npm install @myorg/privatepackage\n    npm install node-tap --save-dev\n    npm install dtrace-provider --save-optional\n    npm install readable-stream --save-exact\n    npm install ansi-regex --save-bundle\n    ```\n\n    **Note**: If there is a file or folder named `<name>` in the current\n    working directory, then it will try to install that, and only try to\n    fetch the package by name if it is not valid.\n\n* `npm install [<@scope>/]<name>@<tag>`:\n\n    Install the version of the package that is referenced by the specified tag.\n    If the tag does not exist in the registry data for that package, then this\n    will fail.\n\n    Example:\n\n    ```bash\n    npm install sax@latest\n    npm install @myorg/mypackage@latest\n    ```\n\n* `npm install [<@scope>/]<name>@<version>`:\n\n    Install the specified version of the package.  This will fail if the\n    version has not been published to the registry.\n\n    Example:\n\n    ```bash\n    npm install sax@0.1.1\n    npm install @myorg/privatepackage@1.5.0\n    ```\n\n* `npm install [<@scope>/]<name>@<version range>`:\n\n    Install a version of the package matching the specified version range.  This\n    will follow the same rules for resolving dependencies described in [`package.json`](/cli/v6/configuring-npm/package-json).\n\n    Note that most version ranges must be put in quotes so that your shell will\n    treat it as a single argument.\n\n    Example:\n    ```bash\n    npm install sax@\">=0.1.0 <0.2.0\"\n    npm install @myorg/privatepackage@\">=0.1.0 <0.2.0\"\n    ```\n\n* `npm install <git remote url>`:\n\n    Installs the package from the hosted git provider, cloning it with `git`.\n    For a full git remote url, only that URL will be attempted.\n\n    ```bash\n      <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n    ```\n\n    `<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n    `git+file`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then the default branch of the repository is used.\n\n    If the repository makes use of submodules, those submodules will be cloned\n    as well.\n\n    If the package being installed contains a `prepare` script, its\n    `dependencies` and `devDependencies` will be installed, and the prepare\n    script will be run, before the package is packaged and installed.\n\n    The following git environment variables are recognized by npm and will be\n    added to the environment when running git:\n\n    * `GIT_ASKPASS`\n    * `GIT_EXEC_PATH`\n    * `GIT_PROXY_COMMAND`\n    * `GIT_SSH`\n    * `GIT_SSH_COMMAND`\n    * `GIT_SSL_CAINFO`\n    * `GIT_SSL_NO_VERIFY`\n\n    See the git man page for details.\n\n    Examples:\n\n    ```bash\n    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27\n    npm install git+ssh://git@github.com:npm/cli#semver:^5.0\n    npm install git+https://isaacs@github.com/npm/cli.git\n    npm install git://github.com/npm/cli.git#v1.0.27\n    GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git\n    ```\n\n* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:\n* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:\n\n    Install the package at `https://github.com/githubname/githubrepo` by\n    attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script, before the package is\n    done installing.\n\n    Examples:\n    \n    ```bash\n    npm install mygithubuser/myproject\n    npm install github:mygithubuser/myproject\n   ```\n\n* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:\n\n    Install the package at `https://gist.github.com/gistID` by attempting to\n    clone it using `git`. The GitHub username associated with the gist is\n    optional and will not be saved in `package.json`.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script, before the package is\n    done installing.\n\n    Example:\n    \n    ```bash\n    npm install gist:101a11beef\n    ```\n\n* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:\n\n    Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script, before the package is\n    done installing.\n\n    Example:\n    \n    ```bash\n    npm install bitbucket:mybitbucketuser/myproject\n    ```\n\n* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:\n\n    Install the package at `https://gitlab.com/gitlabname/gitlabrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script, before the package is\n    done installing.\n\n    Example:\n    \n    ```bash\n    npm install gitlab:mygitlabuser/myproject\n    npm install gitlab:myusr/myproj#semver:^5.0\n    ```\n\nYou may combine multiple arguments, and even multiple types of arguments.\nFor example:\n\n```bash\nnpm install sax@\">=0.1.0 <0.2.0\" bench supervisor\n```\n\nThe `--tag` argument will apply to all of the specified install targets. If a\ntag with the given name exists, the tagged version is preferred over newer\nversions.\n\nThe `--dry-run` argument will report in the usual way what the install would\nhave done without actually installing anything.\n\nThe `--package-lock-only` argument will only update the `package-lock.json`,\ninstead of checking `node_modules` and downloading dependencies.\n\nThe `-f` or `--force` argument will force npm to fetch remote resources even if a\nlocal copy exists on disk.\n\n```bash\nnpm install sax --force\n```\n\nThe `--no-fund` argument will hide the message displayed at the end of each\ninstall that acknowledges the number of dependencies looking for funding.\nSee `npm-fund(1)`\n\nThe `-g` or `--global` argument will cause npm to install the package globally\nrather than locally.  See [folders](/cli/v6/configuring-npm/folders).\n\nThe `--global-style` argument will cause npm to install the package into\nyour local `node_modules` folder with the same layout it uses with the\nglobal `node_modules` folder. Only your direct dependencies will show in\n`node_modules` and everything they depend on will be flattened in their\n`node_modules` folders. This obviously will eliminate some deduping.\n\nThe `--ignore-scripts` argument will cause npm to not execute any\nscripts defined in the package.json. See [`scripts`](/cli/v6/using-npm/scripts).\n\nThe `--legacy-bundling` argument will cause npm to install the package such\nthat versions of npm prior to 1.4, such as the one included with node 0.8,\ncan install the package. This eliminates all automatic deduping.\n\nThe `--link` argument will cause npm to link global installs into the\nlocal space in some cases.\n\nThe `--no-bin-links` argument will prevent npm from creating symlinks for\nany binaries the package might contain.\n\nThe `--no-optional` argument will prevent optional dependencies from\nbeing installed.\n\nThe `--no-shrinkwrap` argument, which will ignore an available\npackage lock or shrinkwrap file and use the package.json instead.\n\nThe `--no-package-lock` argument will prevent npm from creating a\n`package-lock.json` file.  When running with package-lock's disabled npm\nwill not automatically prune your node modules when installing.\n\nThe `--nodedir=/path/to/node/source` argument will allow npm to find the\nnode source code so that npm can compile native modules.\n\nThe `--only={prod[uction]|dev[elopment]}` argument will cause either only\n`devDependencies` or only non-`devDependencies` to be installed regardless of the `NODE_ENV`.\n\nThe `--no-audit` argument can be used to disable sending of audit reports to\nthe configured registries.  See [`npm-audit`](npm-audit) for details on what is sent.\n\nSee [`config`](/cli/v6/using-npm/config).  Many of the configuration params have some\neffect on installation, since that's most of what npm does.\n\n#### Algorithm\n\nTo install a package, npm uses the following algorithm:\n```bash\nload the existing node_modules tree from disk\nclone the tree\nfetch the package.json and assorted metadata and add it to the clone\nwalk the clone and add any missing dependencies\n  dependencies will be added as close to the top as is possible\n  without breaking any other modules\ncompare the original tree with the cloned tree and make a list of\nactions to take to convert one to the other\nexecute all of the actions, deepest first\n  kinds of actions are install, update, remove and move\n```\n\nFor this `package{dep}` structure: `A{B,C}, B{C}, C{D}`,\nthis algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n+-- D\n```\n\nThat is, the dependency from B to C is satisfied by the fact that A\nalready caused C to be installed at a higher level. D is still installed\nat the top level because nothing conflicts with it.\n\nFor `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n   `-- D@2\n+-- D@1\n```\n\nBecause B's D@1 will be installed in the top level, C now has to install D@2\nprivately for itself. This algorithm is deterministic, but different trees may\nbe produced if two dependencies are requested for installation in a different\norder.\n\nSee [folders](/cli/v6/configuring-npm/folders) for a more detailed description of the specific folder structures that npm creates.\n\n### Limitations of npm's Install Algorithm\n\nnpm will refuse to install any package with an identical name to the\ncurrent package. This can be overridden with the `--force` flag, but in\nmost cases can simply be addressed by changing the local package name.\n\nThere are some very rare and pathological edge-cases where a cycle can\ncause npm to try to install a never-ending tree of packages.  Here is\nthe simplest case:\n\n```bash\nA -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...\n```\n\nwhere `A` is some version of a package, and `A'` is a different version\nof the same package.  Because `B` depends on a different version of `A`\nthan the one that is already in the tree, it must install a separate\ncopy.  The same is true of `A'`, which must install `B'`.  Because `B'`\ndepends on the original version of `A`, which has been overridden, the\ncycle falls into infinite regress.\n\nTo avoid this situation, npm flat-out refuses to install any\n`name@version` that is already present anywhere in the tree of package\nfolder ancestors.  A more correct, but more complex, solution would be\nto symlink the existing version into the new location.  If this ever\naffects a real use-case, it will be investigated.\n\n### See Also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm update](/cli/v6/commands/npm-update)\n* [npm audit](/cli/v6/commands/npm-audit)\n* [npm fund](/cli/v6/commands/npm-fund)\n* [npm link](/cli/v6/commands/npm-link)\n* [npm rebuild](/cli/v6/commands/npm-rebuild)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm build](/cli/v6/commands/npm-build)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm dist-tag](/cli/v6/commands/npm-dist-tag)\n* [npm uninstall](/cli/v6/commands/npm-uninstall)\n* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)\n* [package.json](/cli/v6/configuring-npm/package-json)\n"},{"id":"57053709-f65f-5087-83bf-3443b5393051","frontmatter":{"title":"npm-link"},"rawBody":"---\ntitle: npm-link\nsection: 1\ndescription: Symlink a package folder\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-link.md\n---\n\n### Synopsis\n\n```bash\nnpm link (in package dir)\nnpm link [<@scope>/]<pkg>[@<version>]\n\nalias: npm ln\n```\n\n### Description\n\nPackage linking is a two-step process.\n\nFirst, `npm link` in a package folder will create a symlink in the global folder\n`{prefix}/lib/node_modules/<package>` that links to the package where the `npm\nlink` command was executed. It will also link any bins in the package to `{prefix}/bin/{name}`.\nNote that `npm link` uses the global prefix (see `npm prefix -g` for its value).\n\nNext, in some other location, `npm link package-name` will create a\nsymbolic link from globally-installed `package-name` to `node_modules/`\nof the current folder.\n\nNote that `package-name` is taken from `package.json`,\nnot from directory name.\n\nThe package name can be optionally prefixed with a scope. See [`scope`](/cli/v6/using-npm/scope).\nThe scope must be preceded by an @-symbol and followed by a slash.\n\nWhen creating tarballs for `npm publish`, the linked packages are\n\"snapshotted\" to their current state by resolving the symbolic links.\n\nThis is handy for installing your own stuff, so that you can work on it and\ntest it iteratively without having to continually rebuild.\n\nFor example:\n\n```bash\n    cd ~/projects/node-redis    # go into the package directory\n    npm link                    # creates global link\n    cd ~/projects/node-bloggy   # go into some other package directory.\n    npm link redis              # link-install the package\n```\n\nNow, any changes to ~/projects/node-redis will be reflected in\n~/projects/node-bloggy/node_modules/node-redis/. Note that the link should\nbe to the package name, not the directory name for that package.\n\nYou may also shortcut the two steps in one.  For example, to do the\nabove use-case in a shorter way:\n\n```bash\ncd ~/projects/node-bloggy  # go into the dir of your main project\nnpm link ../node-redis     # link the dir of your dependency\n```\n\nThe second line is the equivalent of doing:\n\n```bash\n(cd ../node-redis; npm link)\nnpm link redis\n```\n\nThat is, it first creates a global link, and then links the global\ninstallation target into your project's `node_modules` folder.\n\nNote that in this case, you are referring to the directory name, `node-redis`,\nrather than the package name `redis`.\n\nIf your linked package is scoped (see [`scope`](/cli/v6/using-npm/scope)) your link command must include that scope, e.g.\n\n```bash\nnpm link @myorg/privatepackage\n```\n\n### See Also\n\n* [npm developers](/cli/v6/using-npm/developers)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"ec8a7031-474f-5f89-9b10-95183c10cae6","frontmatter":{"title":"npm-logout"},"rawBody":"---\ntitle: npm-logout\nsection: 1\ndescription: Log out of the registry\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-logout.md\n---\n\n### Synopsis\n\n```bash\nnpm logout [--registry=<url>] [--scope=<@scope>]\n```\n\n### Description\n\nWhen logged into a registry that supports token-based authentication, tell the\nserver to end this token's session. This will invalidate the token everywhere\nyou're using it, not just for the current environment.\n\nWhen logged into a legacy registry that uses username and password authentication, this will\nclear the credentials in your user configuration. In this case, it will _only_ affect\nthe current environment.\n\nIf `--scope` is provided, this will find the credentials for the registry\nconnected to that scope, if set.\n\n### Configuration\n\n#### registry\n\nDefault: https://registry.npmjs.org/\n\nThe base URL of the npm package registry. If `scope` is also specified,\nit takes precedence.\n\n#### scope\n\nDefault: The scope of your current project, if any, otherwise none.\n\nIf specified, you will be logged out of the specified scope. See [`scope`](/cli/v6/using-npm/scope).\n\n```bash\nnpm logout --scope=@myco\n```\n\n### See Also\n\n* [npm adduser](/cli/v6/commands/npm-adduser)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npm whoami](/cli/v6/commands/npm-whoami)\n"},{"id":"a2a0f1ed-134e-5d4c-8d19-aa3f690a9800","frontmatter":{"title":"npm-ls"},"rawBody":"---\ntitle: npm-ls\nsection: 1\ndescription: List installed packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-ls.md\n---\n\n### Synopsis\n\n```bash\nnpm ls [[<@scope>/]<pkg> ...]\n\naliases: list, la, ll\n```\n\n### Description\n\nThis command will print to stdout all the versions of packages that are\ninstalled, as well as their dependencies, in a tree-structure.\n\nPositional arguments are `name@version-range` identifiers, which will\nlimit the results to only the paths to the packages named.  Note that\nnested packages will *also* show the paths to the specified packages.\nFor example, running `npm ls promzard` in npm's source tree will show:\n\n```bash\n    npm@6.14.17 /path/to/npm\n    └─┬ init-package-json@0.0.4\n      └── promzard@0.1.5\n```\n\nIt will print out extraneous, missing, and invalid packages.\n\nIf a project specifies git urls for dependencies these are shown\nin parentheses after the name@version to make it easier for users to\nrecognize potential forks of a project.\n\nThe tree shown is the logical dependency tree, based on package\ndependencies, not the physical layout of your node_modules folder.\n\nWhen run as `ll` or `la`, it shows extended information by default.\n\n### Configuration\n\n#### json\n\n* Default: false\n* Type: Boolean\n\nShow information in JSON format.\n\n#### long\n\n* Default: false\n* Type: Boolean\n\nShow extended information.\n\n#### parseable\n\n* Default: false\n* Type: Boolean\n\nShow parseable output instead of tree view.\n\n#### global\n\n* Default: false\n* Type: Boolean\n\nList packages in the global install prefix instead of in the current\nproject.\n\n#### depth\n\n* Type: Int\n\nMax display depth of the dependency tree.\n\n#### prod / production\n\n* Type: Boolean\n* Default: false\n\nDisplay only the dependency tree for packages in `dependencies`.\n\n#### dev / development\n\n* Type: Boolean\n* Default: false\n\nDisplay only the dependency tree for packages in `devDependencies`.\n\n#### only\n\n* Type: String\n\nWhen \"dev\" or \"development\", is an alias to `dev`.\n\nWhen \"prod\" or \"production\", is an alias to `production`.\n\n#### link\n\n* Type: Boolean\n* Default: false\n\nDisplay only dependencies which are linked\n\n#### unicode\n\n* Type: Boolean\n* Default: true\n\nWhether to represent the tree structure using unicode characters.\nSet it to false in order to use all-ansi output.\n\n### See Also\n\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm link](/cli/v6/commands/npm-link)\n* [npm prune](/cli/v6/commands/npm-prune)\n* [npm outdated](/cli/v6/commands/npm-outdated)\n* [npm update](/cli/v6/commands/npm-update)\n"},{"id":"7245ecf4-c02e-546f-bd49-cd8ceb106be1","frontmatter":{"title":"npm-org"},"rawBody":"---\ntitle: npm-org\nsection: 1\ndescription: Manage orgs\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-org.md\n---\n\n### Synopsis\n\n```bash\nnpm org set <orgname> <username> [developer | admin | owner]\nnpm org rm <orgname> <username>\nnpm org ls <orgname> [<username>]\n```\n\n### Example\n\nAdd a new developer to an org:\n\n```bash\n$ npm org set my-org @mx-smith\n```\n\nAdd a new admin to an org (or change a developer to an admin):\n\n```bash\n$ npm org set my-org @mx-santos admin\n```\n\nRemove a user from an org:\n\n```bash\n$ npm org rm my-org mx-santos\n```\n\nList all users in an org:\n\n```bash\n$ npm org ls my-org\n```\n\nList all users in JSON format:\n\n```bash\n$ npm org ls my-org --json\n```\n\nSee what role a user has in an org:\n\n```bash\n$ npm org ls my-org @mx-santos\n```\n\n### Description\n\nYou can use the `npm org` commands to manage and view users of an organization.\nIt supports adding and removing users, changing their roles, listing them, and\nfinding specific ones and their roles.\n\n### See Also\n\n* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)\n"},{"id":"637f8b33-2498-5d4c-a2e9-2430efb92643","frontmatter":{"title":"npm-outdated"},"rawBody":"---\ntitle: npm-outdated\nsection: 1\ndescription: Check for outdated packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-outdated.md\n---\n\n### Synopsis\n\n```bash\nnpm outdated [[<@scope>/]<pkg> ...]\n```\n\n### Description\n\nThis command will check the registry to see if any (or, specific) installed\npackages are currently outdated.\n\nIn the output:\n\n* `wanted` is the maximum version of the package that satisfies the semver\n  range specified in `package.json`. If there's no available semver range (i.e.\n  you're running `npm outdated --global`, or the package isn't included in\n  `package.json`), then `wanted` shows the currently-installed version.\n* `latest` is the version of the package tagged as latest in the registry.\n  Running `npm publish` with no special configuration will publish the package\n  with a dist-tag of `latest`. This may or may not be the maximum version of\n  the package, or the most-recently published version of the package, depending\n  on how the package's developer manages the latest [dist-tag](npm-dist-tag).\n* `location` is where in the dependency tree the package is located. Note that\n  `npm outdated` defaults to a depth of 0, so unless you override that, you'll\n  always be seeing only top-level dependencies that are outdated.\n* `package type` (when using `--long` / `-l`) tells you whether this package is\n  a `dependency` or a `devDependency`. Packages not included in `package.json`\n  are always marked `dependencies`.\n* `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's `package.json`\n* Red means there's a newer version matching your semver requirements, so you should update now.\n* Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.\n\n### An example\n\n```bash\n$ npm outdated\nPackage      Current   Wanted   Latest  Location\nglob          5.0.15   5.0.15    6.0.1  test-outdated-output\nnothingness    0.0.3      git      git  test-outdated-output\nnpm            3.5.1    3.5.2    3.5.1  test-outdated-output\nlocal-dev      0.0.3   linked   linked  test-outdated-output\nonce           1.3.2    1.3.3    1.3.3  test-outdated-output\n```\n\nWith these `dependencies`:\n```json\n{\n  \"glob\": \"^5.0.15\",\n  \"nothingness\": \"github:othiym23/nothingness#master\",\n  \"npm\": \"^3.5.1\",\n  \"once\": \"^1.3.1\"\n}\n```\n\nA few things to note:\n\n* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is\n  outside the semver range.\n* Git dependencies will always be reinstalled, because of how they're specified.\n  The installed committish might satisfy the dependency specifier (if it's\n  something immutable, like a commit SHA), or it might not, so `npm outdated` and\n  `npm update` have to fetch Git repos to check. This is why currently doing a\n  reinstall of a Git dependency always forces a new clone and install.\n* `npm@3.5.2` is marked as \"wanted\", but \"latest\" is `npm@3.5.1` because npm\n  uses dist-tags to manage its `latest` and `next` release channels. `npm update`\n  will install the _newest_ version, but `npm install npm` (with no semver range)\n  will install whatever's tagged as `latest`.\n* `once` is just plain out of date. Reinstalling `node_modules` from scratch or\n  running `npm update` will bring it up to spec.\n\n### Configuration\n\n#### json\n\n* Default: false\n* Type: Boolean\n\nShow information in JSON format.\n\n#### long\n\n* Default: false\n* Type: Boolean\n\nShow extended information.\n\n#### parseable\n\n* Default: false\n* Type: Boolean\n\nShow parseable output instead of tree view.\n\n#### global\n\n* Default: false\n* Type: Boolean\n\nCheck packages in the global install prefix instead of in the current\nproject.\n\n#### depth\n\n* Default: 0\n* Type: Int\n\nMax depth for checking dependency tree.\n\n### See Also\n\n* [npm update](/cli/v6/commands/npm-update)\n* [npm dist-tag](/cli/v6/commands/npm-dist-tag)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm folders](/cli/v6/configuring-npm/folders)\n"},{"id":"0294d076-5dce-5e94-a194-f4b968bc74a3","frontmatter":{"title":"npm-owner"},"rawBody":"---\ntitle: npm-owner\nsection: 1\ndescription: Manage package owners\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-owner.md\n---\n\n### Synopsis\n\n```bash\nnpm owner add <user> [<@scope>/]<pkg>\nnpm owner rm <user> [<@scope>/]<pkg>\nnpm owner ls [<@scope>/]<pkg>\n\naliases: author\n```\n\n### Description\n\nManage ownership of published packages.\n\n* ls:\n  List all the users who have access to modify a package and push new versions.\n  Handy when you need to know who to bug for help.\n* add:\n  Add a new user as a maintainer of a package.  This user is enabled to modify\n  metadata, publish new versions, and add other owners.\n* rm:\n  Remove a user from the package owner list.  This immediately revokes their\n  privileges.\n\nNote that there is only one level of access.  Either you can modify a package,\nor you can't.  Future versions may contain more fine-grained access levels, but\nthat is not implemented at this time.\n\nIf you have two-factor authentication enabled with `auth-and-writes` then\nyou'll need to include an otp on the command line when changing ownership\nwith `--otp`.\n\n### See Also\n\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n"},{"id":"17bb6002-5dfc-5b11-959f-e7d2130888c4","frontmatter":{"title":"npm-pack"},"rawBody":"---\ntitle: npm-pack\nsection: 1\ndescription: Create a tarball from a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-pack.md\n---\n\n### Synopsis\n\n```bash\nnpm pack [[<@scope>/]<pkg>...] [--dry-run]\n```\n\n### Description\n\nFor anything that's installable (that is, a package folder, tarball,\ntarball url, name@tag, name@version, name, or scoped name), this\ncommand will fetch it to the cache, and then copy the tarball to the\ncurrent working directory as `<name>-<version>.tgz`, and then write\nthe filenames out to stdout.\n\nIf the same package is specified multiple times, then the file will be\noverwritten the second time.\n\nIf no arguments are supplied, then npm packs the current package folder.\n\nThe `--dry-run` argument will do everything that pack usually does without\nactually packing anything. Reports on what would have gone into the tarball.\n\n### See Also\n\n* [npm cache](/cli/v6/commands/npm-cache)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"7e64f0c2-7987-50a4-b5c9-c06836b448de","frontmatter":{"title":"npm-ping"},"rawBody":"---\ntitle: npm-ping\nsection: 1\ndescription: Ping npm registry\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-ping.md\n---\n\n### Synopsis\n\n```bash\nnpm ping [--registry <registry>]\n```\n\n### Description\n\nPing the configured or given npm registry and verify authentication.\nIf it works it will output something like:\n\n```bash\nPing success: {*Details about registry*}\n```\notherwise you will get:\n```bash\nPing error: {*Detail about error}\n```\n\n### See Also\n\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"9cd88fad-47fb-5196-8690-2c60865a65e0","frontmatter":{"title":"npm-prefix"},"rawBody":"---\ntitle: npm-prefix\nsection: 1\ndescription: Display prefix\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-prefix.md\n---\n\n### Synopsis\n\n```bash\nnpm prefix [-g]\n```\n\n### Description\n\nPrint the local prefix to standard out. This is the closest parent directory\nto contain a `package.json` file or `node_modules` directory, unless `-g` is\nalso specified.\n\nIf `-g` is specified, this will be the value of the global prefix. See\n[`npm config`](/cli/v6/commands/npm-config) for more detail.\n\n### See Also\n\n* [npm root](/cli/v6/commands/npm-root)\n* [npm bin](/cli/v6/commands/npm-bin)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"24128289-0ed1-5e42-b9dc-01e90fe59769","frontmatter":{"title":"npm-profile"},"rawBody":"---\ntitle: npm-profile\nsection: 1\ndescription: Change settings on your registry profile\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-profile.md\n---\n\n### Synopsis\n\n```bash\nnpm profile get [--json|--parseable] [<property>]\nnpm profile set [--json|--parseable] <property> <value>\nnpm profile set password\nnpm profile enable-2fa [auth-and-writes|auth-only]\nnpm profile disable-2fa\n```\n\n### Description\n\nChange your profile information on the registry.  This not be available if\nyou're using a non-npmjs registry.\n\n* `npm profile get [<property>]`:\n  Display all of the properties of your profile, or one or more specific\n  properties.  It looks like:\n\n```bash\n+-----------------+---------------------------+\n| name            | example                   |\n+-----------------+---------------------------+\n| email           | me@example.com (verified) |\n+-----------------+---------------------------+\n| two factor auth | auth-and-writes           |\n+-----------------+---------------------------+\n| fullname        | Example User              |\n+-----------------+---------------------------+\n| homepage        |                           |\n+-----------------+---------------------------+\n| freenode        |                           |\n+-----------------+---------------------------+\n| twitter         |                           |\n+-----------------+---------------------------+\n| github          |                           |\n+-----------------+---------------------------+\n| created         | 2015-02-26T01:38:35.892Z  |\n+-----------------+---------------------------+\n| updated         | 2017-10-02T21:29:45.922Z  |\n+-----------------+---------------------------+\n```\n  \n* `npm profile set <property> <value>`:\n  Set the value of a profile property. You can set the following properties this way:\n    email, fullname, homepage, freenode, twitter, github\n\n* `npm profile set password`:\n  Change your password.  This is interactive, you'll be prompted for your\n  current password and a new password.  You'll also be prompted for an OTP\n  if you have two-factor authentication enabled.\n\n* `npm profile enable-2fa [auth-and-writes|auth-only]`:\n  Enables two-factor authentication. Defaults to `auth-and-writes` mode. Modes are:\n  * `auth-only`: Require an OTP when logging in or making changes to your\n    account's authentication.  The OTP will be required on both the website\n    and the command line.\n  * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when\n    publishing a module, setting the `latest` dist-tag, or changing access\n    via `npm access` and `npm owner`.\n\n* `npm profile disable-2fa`:\n  Disables two-factor authentication.\n\n### Details\n\nAll of the `npm profile` subcommands accept `--json` and `--parseable` and\nwill tailor their output based on those.  Some of these commands may not be\navailable on non npmjs.com registries.\n\n### See Also\n\n* [npm config](/cli/v6/commands/npm-config)\n"},{"id":"9a2f0496-4fae-53c5-8420-831106edf963","frontmatter":{"title":"npm-prune"},"rawBody":"---\ntitle: npm-prune\nsection: 1\ndescription: Remove extraneous packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-prune.md\n---\n\n### Synopsis\n\n```bash\nnpm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]\n```\n\n### Description\n\nThis command removes \"extraneous\" packages.  If a package name is\nprovided, then only packages matching one of the supplied names are\nremoved.\n\nExtraneous packages are packages that are not listed on the parent\npackage's dependencies list.\n\nIf the `--production` flag is specified or the `NODE_ENV` environment\nvariable is set to `production`, this command will remove the packages\nspecified in your `devDependencies`. Setting `--no-production` will\nnegate `NODE_ENV` being set to `production`.\n\nIf the `--dry-run` flag is used then no changes will actually be made.\n\nIf the `--json` flag is used then the changes `npm prune` made (or would\nhave made with `--dry-run`) are printed as a JSON object.\n\nIn normal operation with package-locks enabled, extraneous modules are\npruned automatically when modules are installed and you'll only need\nthis command with the `--production` flag.\n\nIf you've disabled package-locks then extraneous modules will not be removed\nand it's up to you to run `npm prune` from time-to-time to remove them.\n\n### See Also\n\n* [npm uninstall](/cli/v6/commands/npm-uninstall)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm ls](/cli/v6/commands/npm-ls)\n"},{"id":"8afb49dc-0d92-5acb-b8c6-4310c9726c7d","frontmatter":{"title":"npm-publish"},"rawBody":"---\ntitle: npm-publish\nsection: 1\ndescription: Publish a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-publish.md\n---\n\n### Synopsis\n\n```bash\nnpm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]\n\nPublishes '.' if no argument supplied\nSets tag 'latest' if no --tag specified\n```\n\n### Description\n\nPublishes a package to the registry so that it can be installed by name. All\nfiles in the package directory are included if no local `.gitignore` or\n`.npmignore` file exists. If both files exist and a file is ignored by\n`.gitignore` but not by `.npmignore` then it will be included.  See\n[`developers`](/cli/v6/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built.\n\nBy default npm will publish to the public registry. This can be overridden by\nspecifying a different default registry or using a [`scope`](/cli/v6/using-npm/scope) in the name (see [`package.json`](/cli/v6/configuring-npm/package-json)).\n\n* `<folder>`:\n  A folder containing a package.json file\n\n* `<tarball>`:\n  A url or file path to a gzipped tar archive containing a single folder\n  with a package.json file inside.\n\n* `[--tag <tag>]`\n  Registers the published package with the given tag, such that\n  `npm install <name>@<tag>` will install this version.  By default,\n  `npm publish` updates and `npm install` installs the `latest` tag. See\n  [`npm-dist-tag`](npm-dist-tag) for details about tags.\n\n* `[--access <public|restricted>]`\n  Tells the registry whether this package should be published as public or\n  restricted. Only applies to scoped packages, which default to `restricted`.\n  If you don't have a paid account, you must publish with `--access public`\n  to publish scoped packages.\n\n* `[--otp <otpcode>]`\n  If you have two-factor authentication enabled in `auth-and-writes` mode\n  then you can provide a code from your authenticator with this. If you\n  don't include this and you're running from a TTY then you'll be prompted.\n\n* `[--dry-run]`\n  As of `npm@6`, does everything publish would do except actually publishing\n  to the registry. Reports the details of what would have been published.\n\nFails if the package name and version combination already exists in\nthe specified registry.\n\nOnce a package is published with a given name and version, that\nspecific name and version combination can never be used again, even if\nit is removed with [`npm unpublish`](/cli/v6/commands/npm-unpublish).\n\nAs of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the\ntarball will be submitted to the registry during publication. Subsequent\ninstalls will use the strongest supported algorithm to verify downloads.\n\nSimilar to `--dry-run` see [`npm pack`](/cli/v6/commands/npm-pack), which figures out the files to be\nincluded and packs them into a tarball to be uploaded to the registry.\n\n### See Also\n\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm scope](/cli/v6/using-npm/scope)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n* [npm owner](/cli/v6/commands/npm-owner)\n* [npm deprecate](/cli/v6/commands/npm-deprecate)\n* [npm dist-tag](/cli/v6/commands/npm-dist-tag)\n* [npm pack](/cli/v6/commands/npm-pack)\n* [npm profile](/cli/v6/commands/npm-profile)\n"},{"id":"4a8c15d0-dccb-5730-90f3-a5cb22dba3e1","frontmatter":{"title":"npm-rebuild"},"rawBody":"---\ntitle: npm-rebuild\nsection: 1\ndescription: Rebuild a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-rebuild.md\n---\n\n### Synopsis\n\n```bash\nnpm rebuild [[<@scope>/<name>]...]\n\nalias: npm rb\n```\n\n### Description\n\nThis command runs the `npm build` command on the matched folders.  This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.\n\n### See Also\n\n* [npm build](/cli/v6/commands/npm-build)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"840db68c-c9c6-5e32-8954-7344d64fe0b8","frontmatter":{"title":"npm-repo"},"rawBody":"---\ntitle: npm-repo\nsection: 1\ndescription: Open package repository page in the browser\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-repo.md\n---\n\n### Synopsis\n\n```bash\nnpm repo [<pkg>]\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's\nrepository URL, and then tries to open it using the `--browser`\nconfig param. If no package name is provided, it will search for\na `package.json` in the current folder and use the `name` property.\n\n### Configuration\n\n#### browser\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: String\n\nThe browser that is called by the `npm repo` command to open websites.\n\n### See Also\n\n* [npm docs](/cli/v6/commands/npm-docs)\n* [npm config](/cli/v6/commands/npm-config)\n"},{"id":"0daa3321-8d5d-5da2-8780-7ad105aef4fe","frontmatter":{"title":"npm-restart"},"rawBody":"---\ntitle: npm-restart\nsection: 1\ndescription: Restart a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-restart.md\n---\n\n### Synopsis\n\n```bash\nnpm restart [-- <args>]\n```\n\n### Description\n\nThis restarts a package.\n\nThis runs a package's \"stop\", \"restart\", and \"start\" scripts, and associated\npre- and post- scripts, in the order given below:\n\n1. prerestart\n2. prestop\n3. stop\n4. poststop\n5. restart\n6. prestart\n7. start\n8. poststart\n9. postrestart\n\n### Note\n\nNote that the \"restart\" script is run **in addition to** the \"stop\"\nand \"start\" scripts, not instead of them.\n\nThis is the behavior as of `npm` major version 2.  A change in this\nbehavior will be accompanied by an increase in major version number\n\n### See Also\n\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm test](/cli/v6/commands/npm-test)\n* [npm start](/cli/v6/commands/npm-start)\n* [npm stop](/cli/v6/commands/npm-stop)\n* [npm restart](/cli/v6/commands/npm-restart)\n"},{"id":"b968b4f2-5fcb-572a-8c77-5bc352403476","frontmatter":{"title":"npm-root"},"rawBody":"---\ntitle: npm-root\nsection: 1\ndescription: Display npm root\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-root.md\n---\n\n### Synopsis\n```bash\nnpm root [-g]\n```\n\n### Description\n\nPrint the effective `node_modules` folder to standard out.\n\n### See Also\n\n* [npm prefix](/cli/v6/commands/npm-prefix)\n* [npm bin](/cli/v6/commands/npm-bin)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"b063697b-6a4b-5d72-90b7-4d18eff43f77","frontmatter":{"title":"npm-run-script"},"rawBody":"---\ntitle: npm-run-script\nsection: 1\ndescription: Run arbitrary package scripts\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-run-script.md\n---\n\n### Synopsis\n\n```bash\nnpm run-script <command> [--silent] [-- <args>...]\n\nalias: npm run\n```\n\n### Description\n\nThis runs an arbitrary command from a package's `\"scripts\"` object.  If no\n`\"command\"` is provided, it will list the available scripts.  `run[-script]` is\nused by the test, start, restart, and stop commands, but can be called\ndirectly, as well. When the scripts in the package are printed out, they're\nseparated into lifecycle (test, start, restart) and directly-run scripts.\n\nAs of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can\nuse custom arguments when executing scripts. The special option `--` is used by\n[getopt](https://goo.gl/KxMmtG) to delimit the end of the options. npm will pass\nall the arguments after the `--` directly to your script:\n\n```bash\nnpm run test -- --grep=\"pattern\"\n```\n\nThe arguments will only be passed to the script specified after ```npm run```\nand not to any pre or post script.\n\nThe `env` script is a special built-in command that can be used to list\nenvironment variables that will be available to the script at runtime. If an\n\"env\" command is defined in your package, it will take precedence over the\nbuilt-in.\n\nIn addition to the shell's pre-existing `PATH`, `npm run` adds\n`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by\nlocally-installed dependencies can be used without the `node_modules/.bin`\nprefix. For example, if there is a `devDependency` on `tap` in your package,\nyou should write:\n\n```bash\n\"scripts\": {\"test\": \"tap test/\\*.js\"}\n```\n\ninstead of\n\n```bash\n\"scripts\": {\"test\": \"node_modules/.bin/tap test/\\*.js\"}\n```\n\nto run your tests.\n\nThe actual shell your script is run within is platform dependent. By default,\non Unix-like systems it is the `/bin/sh` command, on Windows it is the `cmd.exe`.\nThe actual shell referred to by `/bin/sh` also depends on the system.\nAs of [`npm@5.1.0`](https://github.com/npm/npm/releases/tag/v5.1.0) you can\ncustomize the shell with the `script-shell` configuration.\n\nScripts are run from the root of the module, regardless of what your current\nworking directory is when you call `npm run`. If you want your script to\nuse different behavior based on what subdirectory you're in, you can use the\n`INIT_CWD` environment variable, which holds the full path you were in when\nyou ran `npm run`.\n\n`npm run` sets the `NODE` environment variable to the `node` executable with\nwhich `npm` is executed. Also, if the `--scripts-prepend-node-path` is passed,\nthe directory within which `node` resides is added to the\n`PATH`. If `--scripts-prepend-node-path=auto` is passed (which has been the\ndefault in `npm` v3), this is only performed when that `node` executable is\nnot found in the `PATH`.\n\nIf you try to run a script without having a `node_modules` directory and it fails,\nyou will be given a warning to run `npm install`, just in case you've forgotten.\n\nYou can use the `--silent` flag to prevent showing `npm ERR!` output on error.\n\nYou can use the `--if-present` flag to avoid exiting with a non-zero exit code\nwhen the script is undefined. This lets you run potentially undefined scripts\nwithout breaking the execution chain.\n\n### See Also\n\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm test](/cli/v6/commands/npm-test)\n* [npm start](/cli/v6/commands/npm-start)\n* [npm restart](/cli/v6/commands/npm-restart)\n* [npm stop](/cli/v6/commands/npm-stop)\n* [npm config](/cli/v6/commands/npm-config)\n"},{"id":"e79bbd7e-191b-5c47-875b-5ca3af28cdc4","frontmatter":{"title":"npm-search"},"rawBody":"---\ntitle: npm-search\nsection: 1\ndescription: Search for packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-search.md\n---\n\n### Synopsis\n\n```bash\nnpm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]\n\naliases: s, se, find\n```\n\n### Description\n\nSearch the registry for packages matching the search terms. `npm search`\nperforms a linear, incremental, lexically-ordered search through package\nmetadata for all files in the registry. If color is enabled, it will further\nhighlight the matches in the results.\n\nAdditionally, using the `--searchopts` and `--searchexclude` options paired with\nmore search terms will respectively include and exclude further patterns. The\nmain difference between `--searchopts` and the standard search terms is that the\nformer does not highlight results in the output and can be used for more\nfine-grained filtering. Additionally, both of these can be added to `.npmrc` for\ndefault search filtering behavior.\n\nSearch also allows targeting of maintainers in search results, by prefixing\ntheir npm username with `=`.\n\nIf a term starts with `/`, then it's interpreted as a regular expression and\nsupports standard JavaScript RegExp syntax. A trailing `/` will be ignored in\nthis case. (Note that many regular expression characters must be escaped or\nquoted in most shells.)\n\n### A Note on caching\n\n### Configuration\n\n#### description\n\n* Default: true\n* Type: Boolean\n\nUsed as `--no-description`, disables search matching in package descriptions and\nsuppresses display of that field in results.\n\n#### json\n\n* Default: false\n* Type: Boolean\n\nOutput search results as a JSON array.\n\n#### parseable\n\n* Default: false\n* Type: Boolean\n\nOutput search results as lines with tab-separated columns.\n\n#### long\n\n* Default: false\n* Type: Boolean\n\nDisplay full package descriptions and other long text across multiple\nlines. When disabled (default) search results are truncated to fit\nneatly on a single line. Modules with extremely long names will\nfall on multiple lines.\n\n#### searchopts\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n#### searchexclude\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n#### searchstaleness\n\n* Default: 900 (15 minutes)\n* Type: Number\n\nThe age of the cache, in seconds, before another registry request is made.\n\n#### registry\n\n * Default: https://registry.npmjs.org/\n * Type: url\n\nSearch the specified registry for modules. If you have configured npm to point\nto a different default registry, such as your internal private module\nrepository, `npm search` will default to that registry when searching. Pass a\ndifferent registry url such as the default above in order to override this\nsetting.\n\n### See Also\n\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm view](/cli/v6/commands/npm-view)\n"},{"id":"633fd5e1-e70b-52ca-8375-efa184a06714","frontmatter":{"title":"npm-shrinkwrap"},"rawBody":"---\ntitle: npm-shrinkwrap\nsection: 1\ndescription: Lock down dependency versions for publication\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-shrinkwrap.md\n---\n\n### Synopsis\n\n```bash\nnpm shrinkwrap\n```\n\n### Description\n\nThis command repurposes `package-lock.json` into a publishable\n`npm-shrinkwrap.json` or simply creates a new one. The file created and updated\nby this command will then take precedence over any other existing or future\n`package-lock.json` files. For a detailed explanation of the design and purpose\nof package locks in npm, see [package-locks](/cli/v6/configuring-npm/package-locks).\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [package.js](/cli/v6/configuring-npm/package-json)\n* [package-locks](/cli/v6/configuring-npm/package-locks)\n* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)\n* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)\n* [npm ls](/cli/v6/commands/npm-ls)\n"},{"id":"3619520d-6774-5055-89fc-8e41110d643a","frontmatter":{"title":"npm-star"},"rawBody":"---\ntitle: npm-star\nsection: 1\ndescription: Mark your favorite packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-star.md\n---\n\n### Synopsis\n\n```bash\nnpm star [<pkg>...]\nnpm unstar [<pkg>...]\n```\n\n### Description\n\n\"Starring\" a package means that you have some interest in it.  It's\na vaguely positive way to show that you care.\n\n\"Unstarring\" is the same thing, but in reverse.\n\nIt's a boolean thing.  Starring repeatedly has no additional effect.\n\n### See Also\n\n* [npm view](/cli/v6/commands/npm-view)\n* [npm whoami](/cli/v6/commands/npm-whoami)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n"},{"id":"4098b30d-0d4a-55b9-9ba5-eb7e0aade040","frontmatter":{"title":"npm-stars"},"rawBody":"---\ntitle: npm-stars\nsection: 1\ndescription: View packages marked as favorites\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-stars.md\n---\n\n### Synopsis\n```bash\nnpm stars [<user>]\n```\n\n### Description\n\nIf you have starred a lot of neat things and want to find them again\nquickly this command lets you do just that.\n\nYou may also want to see your friend's favorite packages, in this case\nyou will most certainly enjoy this command.\n\n### See Also\n\n* [npm star](/cli/v6/commands/npm-star)\n* [npm view](/cli/v6/commands/npm-view)\n* [npm whoami](/cli/v6/commands/npm-whoami)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n"},{"id":"26cb4d18-2f3e-5d48-85b6-271fa5894a1c","frontmatter":{"title":"npm-start"},"rawBody":"---\ntitle: npm-start\nsection: 1\ndescription: Start a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-start.md\n---\n\n### Synopsis\n\n```bash\nnpm start [-- <args>]\n```\n\n### Description\n\nThis runs an arbitrary command specified in the package's `\"start\"` property of\nits `\"scripts\"` object. If no `\"start\"` property is specified on the\n`\"scripts\"` object, it will run `node server.js`.\n\nAs of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can\nuse custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v6/commands/npm-run-script) for more details.\n\n### See Also\n\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm test](/cli/v6/commands/npm-test)\n* [npm restart](/cli/v6/commands/npm-restart)\n* [npm stop](/cli/v6/commands/npm-stop)\n"},{"id":"3cf224b5-f524-5dac-aba3-bfecc11b6f0c","frontmatter":{"title":"npm-stop"},"rawBody":"---\ntitle: npm-stop\nsection: 1\ndescription: Stop a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-stop.md\n---\n\n### Synopsis\n\n```bash\nnpm stop [-- <args>]\n```\n\n### Description\n\nThis runs a package's \"stop\" script, if one was provided.\n\n### See Also\n\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm test](/cli/v6/commands/npm-test)\n* [npm start](/cli/v6/commands/npm-start)\n* [npm restart](/cli/v6/commands/npm-restart)\n"},{"id":"0b327ca1-dada-5201-806e-64dd01ea9fdb","frontmatter":{"title":"npm-team"},"rawBody":"---\ntitle: npm-team\nsection: 1\ndescription: Manage organization teams and team memberships\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-team.md\n---\n\n### Synopsis\n\n```bash\nnpm team create <scope:team>\nnpm team destroy <scope:team>\n\nnpm team add <scope:team> <user>\nnpm team rm <scope:team> <user>\n\nnpm team ls <scope>|<scope:team>\n\nnpm team edit <scope:team>\n```\n\n### Description\n\nUsed to manage teams in organizations, and change team memberships. Does not\nhandle permissions for packages.\n\nTeams must always be fully qualified with the organization/scope they belong to\nwhen operating on them, separated by a colon (`:`). That is, if you have a `wombats` team in a `wisdom` organization, you must always refer to that team as `wisdom:wombats` in these commands.\n\nIf you have two-factor authentication enabled in `auth-and-writes` mode, then you can provide a code from your authenticator with `[--otp <otpcode>]`. If you don't include this then you will be prompted.\n\n* create / destroy:\n  Create a new team, or destroy an existing one. Note: You cannot remove the `developers` team, <a href=\"https://docs.npmjs.com/about-developers-team\" target=\"_blank\">learn more.</a>\n* add / rm:\n  Add a user to an existing team, or remove a user from a team they belong to.\n\n* ls:\n  If performed on an organization name, will return a list of existing teams\n  under that organization. If performed on a team, it will instead return a list\n  of all users belonging to that particular team.\n\n* edit:\n  Edit a current team.\n\n### Details\n\n`npm team` always operates directly on the current registry, configurable from\nthe command line using `--registry=<registry url>`.\n\nIn order to create teams and manage team membership, you must be a *team admin*\nunder the given organization. Listing teams and team memberships may be done by\nany member of the organizations.\n\nOrganization creation and management of team admins and *organization* members\nis done through the website, not the npm CLI.\n\nTo use teams to manage permissions on packages belonging to your organization,\nuse the `npm access` command to grant or revoke the appropriate permissions.\n\n### See Also\n\n* [npm access](/cli/v6/commands/npm-access)\n* [npm registry](/cli/v6/using-npm/registry)\n"},{"id":"021e7073-2dd1-512c-a5a6-cc9571d5bee9","frontmatter":{"title":"npm-test"},"rawBody":"---\ntitle: npm-test\nsection: 1\ndescription: Test a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-test.md\n---\n\n### Synopsis\n\n```bash\nnpm test [-- <args>]\n\naliases: t, tst\n```\n\n### Description\n\nThis runs a package's \"test\" script, if one was provided.\n\n### See Also\n\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm start](/cli/v6/commands/npm-start)\n* [npm restart](/cli/v6/commands/npm-restart)\n* [npm stop](/cli/v6/commands/npm-stop)\n"},{"id":"e44e5acb-ee4f-5c38-a922-31f086d35008","frontmatter":{"title":"npm-token"},"rawBody":"---\ntitle: npm-token\nsection: 1\ndescription: Manage your authentication tokens\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-token.md\n---\n\n### Synopsis\n```bash\n  npm token list [--json|--parseable]\n  npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]\n  npm token revoke <id|token>\n  ```\n\n### Description\n\nThis lets you list, create and revoke authentication tokens.\n\n* `npm token list`:\n  Shows a table of all active authentication tokens. You can request this as\n  JSON with `--json` or tab-separated values with `--parseable`.\n\n```bash\n+--------+---------+------------+----------+----------------+\n| id     | token   | created    | read-only | CIDR whitelist |\n+--------+---------+------------+----------+----------------+\n| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |\n+--------+---------+------------+----------+----------------+\n| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |\n+--------+---------+------------+----------+----------------+\n| e0cf92 | 3a436a… | 2017-10-02 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 63eb9d | 74ef35… | 2017-09-28 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 68c2fe | 127e51… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n```\n\n* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:\n  Create a new authentication token. It can be `--read-only` or accept a list of\n  [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) ranges to\n  limit use of this token to. This will prompt you for your password, and, if you have\n  two-factor authentication enabled, an otp.\n\n```bash\n+----------------+--------------------------------------+\n| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |\n+----------------+--------------------------------------+\n| cidr_whitelist |                                      |\n+----------------+--------------------------------------+\n| readonly       | false                                |\n+----------------+--------------------------------------+\n| created        | 2017-10-02T07:52:24.838Z             |\n+----------------+--------------------------------------+\n```\n\n* `npm token revoke <token|id>`:\n  This removes an authentication token, making it immediately unusable. This can accept\n  both complete tokens (as you get back from `npm token create` and will\n  find in your `.npmrc`) and ids as seen in the `npm token list` output. \n  This will NOT accept the truncated token found in `npm token list` output.\n"},{"id":"ba9e47c4-ad68-5b3a-b518-ff375548c7d4","frontmatter":{"title":"npm-uninstall"},"rawBody":"---\ntitle: npm-uninstall\nsection: 1\ndescription: Remove a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-uninstall.md\n---\n\n### Synopsis\n\n```bash\nnpm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]\n\naliases: remove, rm, r, un, unlink\n```\n\n### Description\n\nThis uninstalls a package, completely removing everything npm installed\non its behalf.\n\nExample:\n\n```bash\nnpm uninstall sax\n```\n\nIn global mode (ie, with `-g` or `--global` appended to the command),\nit uninstalls the current package context as a global package.\n\n`npm uninstall` takes 3 exclusive, optional flags which save or update\nthe package version in your main package.json:\n\n* `-S, --save`: Package will be removed from your `dependencies`.\n\n* `-D, --save-dev`: Package will be removed from your `devDependencies`.\n\n* `-O, --save-optional`: Package will be removed from your `optionalDependencies`.\n\n* `--no-save`: Package will not be removed from your `package.json` file.\n\nFurther, if you have an `npm-shrinkwrap.json` then it will be updated as\nwell.\n\nScope is optional and follows the usual rules for [`scope`](/cli/v6/using-npm/scope).\n\nExamples:\n```bash\nnpm uninstall sax --save\nnpm uninstall @myorg/privatepackage --save\nnpm uninstall node-tap --save-dev\nnpm uninstall dtrace-provider --save-optional\nnpm uninstall lodash --no-save\n```\n\n### See Also\n\n* [npm prune](/cli/v6/commands/npm-prune)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"5b2f6aef-4e61-5491-96cb-3e9a54f4e0b5","frontmatter":{"title":"npm-unpublish"},"rawBody":"---\ntitle: npm-unpublish\nsection: 1\ndescription: Remove a package from the registry\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-unpublish.md\n---\n\n### Synopsis\n\n#### Unpublishing a single version of a package\n\n```bash\nnpm unpublish [<@scope>/]<pkg>@<version>\n```\n\n#### Unpublishing an entire package\n\n```bash\nnpm unpublish [<@scope>/]<pkg> --force\n```\n\n### Warning\n\nConsider using the `deprecate` command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package.\n\n### Description\n\nThis removes a package version from the registry, deleting its\nentry and removing the tarball.\n\nIf no version is specified, or if all versions are removed then\nthe root package entry is removed from the registry entirely.\n\nEven if a package version is unpublished, that specific name and\nversion combination can never be reused. In order to publish the\npackage again, a new version number must be used. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed.\n\nTo learn more about how unpublish is treated on the npm registry, see our <a href=\"https://www.npmjs.com/policies/unpublish\" target=\"_blank\" rel=\"noopener noreferrer\"> unpublish policies</a>. \n\n\n### See Also\n\n* [npm deprecate](/cli/v6/commands/npm-deprecate)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n* [npm owner](/cli/v6/commands/npm-owner)\n"},{"id":"a9c99e3c-9a93-52ea-9525-8a54fbebd786","frontmatter":{"title":"npm-update"},"rawBody":"---\ntitle: npm-update\nsection: 1\ndescription: Update a package\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-update.md\n---\n\n### Synopsis\n\n```bash\nnpm update [-g] [<pkg>...]\n\naliases: up, upgrade\n```\n\n### Description\n\nThis command will update all the packages listed to the latest version\n(specified by the `tag` config), respecting semver.\n\nIt will also install missing packages. As with all commands that install\npackages, the `--dev` flag will cause `devDependencies` to be processed\nas well.\n\nIf the `-g` flag is specified, this command will update globally installed\npackages.\n\nIf no package name is specified, all packages in the specified location (global\nor local) will be updated.\n\nAs of `npm@2.6.1`, the `npm update` will only inspect top-level packages.\nPrior versions of `npm` would also recursively inspect all dependencies.\nTo get the old behavior, use `npm --depth 9999 update`.\n\nAs of `npm@5.0.0`, the `npm update` will change `package.json` to save the \nnew version as the minimum required dependency. To get the old behavior, \nuse `npm update --no-save`.\n\n### Example\n\nIMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later.  For\nolder versions of `npm`, you must specify `--depth 0` to get the behavior\ndescribed below.\n\nFor the examples below, assume that the current package is `app` and it depends\non dependencies, `dep1` (`dep2`, .. etc.).  The published versions of `dep1` are:\n\n```json\n{\n  \"dist-tags\": { \"latest\": \"1.2.2\" },\n  \"versions\": [\n    \"1.2.2\",\n    \"1.2.1\",\n    \"1.2.0\",\n    \"1.1.2\",\n    \"1.1.1\",\n    \"1.0.0\",\n    \"0.4.1\",\n    \"0.4.0\",\n    \"0.2.0\"\n  ]\n}\n```\n\n#### Caret Dependencies\n\nIf `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^1.1.1\"\n}\n```\n\nThen `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and\n`1.2.2` satisfies `^1.1.1`.\n\n#### Tilde Dependencies\n\nHowever, if `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"~1.1.1\"\n}\n```\n\nIn this case, running `npm update` will install `dep1@1.1.2`.  Even though the `latest`\ntag points to `1.2.2`, this version does not satisfy `~1.1.1`, which is equivalent\nto `>=1.1.1 <1.2.0`.  So the highest-sorting version that satisfies `~1.1.1` is used,\nwhich is `1.1.2`.\n\n#### Caret Dependencies below 1.0.0\n\nSuppose `app` has a caret dependency on a version below `1.0.0`, for example:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.2.0\"\n}\n```\n\n`npm update` will install `dep1@0.2.0`, because there are no other\nversions which satisfy `^0.2.0`.\n\nIf the dependence were on `^0.4.0`:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.4.0\"\n}\n```\n\nThen `npm update` will install `dep1@0.4.1`, because that is the highest-sorting\nversion that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)\n\n\n#### Updating Globally-Installed Packages\n\n`npm update -g` will apply the `update` action to each globally installed\npackage that is `outdated` -- that is, has a version that is different from\n`wanted`.\n\nNote: Globally installed packages are treated as if they are installed with a caret semver range specified. So if you require to update to `latest` you may need to run `npm install -g [<pkg>...]`\n\nNOTE: If a package has been upgraded to a version newer than `latest`, it will\nbe _downgraded_.\n\n\n### See Also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [npm outdated](/cli/v6/commands/npm-outdated)\n* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm ls](/cli/v6/commands/npm-ls)\n"},{"id":"13138266-9a85-55ce-ae81-b3b00eff4d85","frontmatter":{"title":"npm-version"},"rawBody":"---\ntitle: npm-version\nsection: 1\ndescription: Bump a package version\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-version.md\n---\n\n### Synopsis\n\n```bash\nnpm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]\n\n'npm [-v | --version]' to print npm version\n'npm view <pkg> version' to view a package's published version\n'npm ls' to inspect current package/dependency versions\n```\n\n### Description\n\nRun this in a package directory to bump the version and write the new\ndata back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.\n\nThe `newversion` argument should be a valid semver string, a\nvalid second argument to [semver.inc](https://github.com/npm/node-semver#functions) (one of `patch`, `minor`, `major`,\n`prepatch`, `preminor`, `premajor`, `prerelease`), or `from-git`. In the second case,\nthe existing version will be incremented by 1 in the specified field.\n`from-git` will try to read the latest git tag, and use that as the new npm version.\n\nIf run in a git repo, it will also create a version commit and tag.\nThis behavior is controlled by `git-tag-version` (see below), and can\nbe disabled on the command line by running `npm --no-git-tag-version version`.\nIt will fail if the working directory is not clean, unless the `-f` or\n`--force` flag is set.\n\nIf supplied with `-m` or `--message` config option, npm will\nuse it as a commit message when creating a version commit.  If the\n`message` config contains `%s` then that will be replaced with the\nresulting version number.  For example:\n\n```bash\nnpm version patch -m \"Upgrade to %s for reasons\"\n```\n\nIf the `sign-git-tag` config is set, then the tag will be signed using\nthe `-s` flag to git.  Note that you must have a default GPG key set up\nin your git config for this to work properly.  For example:\n\n```bash\n$ npm config set sign-git-tag true\n$ npm version patch\n\nYou need a passphrase to unlock the secret key for\nuser: \"isaacs (http://blog.izs.me/) <i@izs.me>\"\n2048-bit RSA key, ID 6C481CF6, created 2010-08-31\n\nEnter passphrase:\n```\n\nIf `preversion`, `version`, or `postversion` are in the `scripts` property of\nthe package.json, they will be executed as part of running `npm version`.\n\nThe exact order of execution is as follows:\n  1. Check to make sure the git working directory is clean before we get started.\n     Your scripts may add files to the commit in future steps.\n     This step is skipped if the `--force` flag is set.\n  2. Run the `preversion` script. These scripts have access to the old `version` in package.json.\n     A typical use would be running your full test suite before deploying.\n     Any files you want added to the commit should be explicitly added using `git add`.\n  3. Bump `version` in `package.json` as requested (`patch`, `minor`, `major`, etc).\n  4. Run the `version` script. These scripts have access to the new `version` in package.json\n     (so they can incorporate it into file headers in generated files for example).\n     Again, scripts should explicitly add generated files to the commit using `git add`.\n  5. Commit and tag.\n  6. Run the `postversion` script. Use it to clean up the file system or automatically push\n     the commit and/or tag.\n\nTake the following example:\n\n```json\n    \"scripts\": {\n      \"preversion\": \"npm test\",\n      \"version\": \"npm run build && git add -A dist\",\n      \"postversion\": \"git push && git push --tags && rm -rf build/temp\"\n    }\n```\n\nThis runs all your tests, and proceeds only if they pass. Then runs your `build` script, and\nadds everything in the `dist` directory to the commit. After the commit, it pushes the new commit\nand tag up to the server, and deletes the `build/temp` directory.\n\n### Configuration\n\n#### allow-same-version\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version \nto the same value as the current version.\n\n#### git-tag-version\n\n* Default: true\n* Type: Boolean\n\nCommit and tag the version change.\n\n#### commit-hooks\n\n* Default: true\n* Type: Boolean\n\nRun git commit hooks when committing the version change.\n\n#### sign-git-tag\n\n* Default: false\n* Type: Boolean\n\nPass the `-s` flag to git to sign the tag.\n\nNote that you must have a default GPG key set up in your git config for this to work properly.\n\n### See Also\n\n* [npm init](/cli/v6/commands/npm-init)\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [semver](/cli/v6/using-npm/semver)\n* [config](/cli/v6/using-npm/config)\n"},{"id":"acd08402-c0e8-5aea-8655-ffd66d670b8c","frontmatter":{"title":"npm-view"},"rawBody":"---\ntitle: npm-view\nsection: 1\ndescription: View registry info\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-view.md\n---\n\n### Synopsis\n\n```bash\nnpm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]\n\naliases: info, show, v\n```\n\n### Description\n\nThis command shows data about a package and prints it to the stream\nreferenced by the `outfd` config, which defaults to stdout.\n\nTo show the package registry entry for the `connect` package, you can do\nthis:\n\n```bash\nnpm view connect\n```\n\nThe default version is \"latest\" if unspecified.\n\nField names can be specified after the package descriptor.\nFor example, to show the dependencies of the `ronn` package at version\n0.3.5, you could do the following:\n\n```bash\nnpm view ronn@0.3.5 dependencies\n```\n\nYou can view child fields by separating them with a period.\nTo view the git repository URL for the latest version of npm, you could\ndo this:\n\n```bash\nnpm view npm repository.url\n```\n\nThis makes it easy to view information about a dependency with a bit of\nshell scripting.  For example, to view all the data about the version of\nopts that ronn depends on, you can do this:\n\n```bash\nnpm view opts@$(npm view ronn dependencies.opts)\n```\n\nFor fields that are arrays, requesting a non-numeric field will return\nall of the values from the objects in the list.  For example, to get all\nthe contributor names for the \"express\" project, you can do this:\n\n```bash\nnpm view express contributors.email\n```\n\nYou may also use numeric indices in square braces to specifically select\nan item in an array field.  To just get the email address of the first\ncontributor in the list, you can do this:\n\n```bash\nnpm view express contributors[0].email\n```\n\nMultiple fields may be specified, and will be printed one after another.\nFor example, to get all the contributor names and email addresses, you\ncan do this:\n\n```bash\nnpm view express contributors.name contributors.email\n```\n\n\"Person\" fields are shown as a string if they would be shown as an\nobject.  So, for example, this will show the list of npm contributors in\nthe shortened string format.  (See [`package.json`](/cli/v6/configuring-npm/package-json) for more on this.)\n\n```bash\nnpm view npm contributors\n```\n\nIf a version range is provided, then data will be printed for every\nmatching version of the package.  This will show which version of jsdom\nwas required by each matching version of yui3:\n\n```bash\nnpm view yui3@'>0.5.4' dependencies.jsdom\n```    \n\nTo show the `connect` package version history, you can do\nthis:\n\n```bash\nnpm view connect versions\n```\n\n### Output\n\nIf only a single string field for a single version is output, then it\nwill not be colorized or quoted, so as to enable piping the output to\nanother command. If the field is an object, it will be output as a JavaScript object literal.\n\nIf the --json flag is given, the outputted fields will be JSON.\n\nIf the version range matches multiple versions, than each printed value\nwill be prefixed with the version it applies to.\n\nIf multiple fields are requested, than each of them are prefixed with\nthe field name.\n\n### See Also\n\n* [npm search](/cli/v6/commands/npm-search)\n* [npm registry](/cli/v6/using-npm/registry)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm docs](/cli/v6/commands/npm-docs)\n"},{"id":"fbf976e5-8765-596a-9b9a-28f2efd4acd3","frontmatter":{"title":"npm-whoami"},"rawBody":"---\ntitle: npm-whoami\nsection: 1\ndescription: Display npm username\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm-whoami.md\n---\n\n### Synopsis\n\n```bash\nnpm whoami [--registry <registry>]\n```\n\n### Description\n\nPrint the `username` config to standard output.\n\n### See Also\n\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n"},{"id":"cd1669d9-2598-5763-861f-0fce7ba1b4c1","frontmatter":{"title":"npm"},"rawBody":"---\ntitle: npm\nsection: 1\ndescription: javascript package manager\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/commands/npm.md\n---\n\n### Synopsis\n\n```bash\nnpm <command> [args]\n```\n\n### Version\n\n6.14.17\n\n### Description\n\nnpm is the package manager for the Node JavaScript platform.  It puts\nmodules in place so that node can find them, and manages dependency\nconflicts intelligently.\n\nIt is extremely configurable to support a wide variety of use cases.\nMost commonly, it is used to publish, discover, install, and develop node\nprograms.\n\nRun `npm help` to get a list of available commands.\n\n### Important\n\nnpm is configured to use npm, Inc.'s public registry at\nhttps://registry.npmjs.org by default. Use of the npm public registry is\nsubject to terms of use available at https://www.npmjs.com/policies/terms.\n\nYou can configure npm to use any compatible registry you like, and even run\nyour own registry. Use of someone else's registry may be governed by their\nterms of use.\n\n### Introduction\n\nYou probably got npm because you want to install stuff.\n\nUse `npm install blerg` to install the latest version of \"blerg\".  Check out\n[`npm install`](/cli/v6/commands/npm-install) for more info.  It can do a lot of stuff.\n\nUse the `npm search` command to show everything that's available.\nUse `npm ls` to show everything you've installed.\n\n### Dependencies\n\nIf a package references to another package with a git URL, npm depends\non a preinstalled git.\n\nIf one of the packages npm tries to install is a native node module and\nrequires compiling of C++ Code, npm will use\n[node-gyp](https://github.com/nodejs/node-gyp) for that task.\nFor a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)\nneeds Python, make and a buildchain like GCC. On Windows,\nPython and Microsoft Visual Studio C++ are needed.\nFor more information visit\n[the node-gyp repository](https://github.com/nodejs/node-gyp) and\nthe [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).\n\n### Directories\n\nSee [`folders`](/cli/v6/configuring-npm/folders) to learn about where npm puts stuff.\n\nIn particular, npm has two modes of operation:\n\n* global mode:\n  npm installs packages into the install prefix at\n  `prefix/lib/node_modules` and bins are installed in `prefix/bin`.\n* local mode:\n  npm installs packages into the current project directory, which\n  defaults to the current working directory.  Packages are installed to\n  `./node_modules`, and bins are installed to `./node_modules/.bin`.\n\nLocal mode is the default.  Use `-g` or `--global` on any command to\noperate in global mode instead.\n\n### Developer Usage\n\nIf you're using npm to develop and publish your code, check out the\nfollowing help topics:\n\n* json:\n  Make a package.json file.  See [`package.json`](/cli/v6/configuring-npm/package-json).\n* link:\n  For linking your current working code into Node's path, so that you\n  don't have to reinstall every time you make a change.  Use\n  `npm link` to do this.\n* install:\n  It's a good idea to install things if you don't need the symbolic link.\n  Especially, installing other peoples code from the registry is done via\n  `npm install`\n* adduser:\n  Create an account or log in.  Credentials are stored in the\n  user config file.\n* publish:\n  Use the `npm publish` command to upload your code to the registry.\n\n#### Configuration\n\nnpm is extremely configurable.  It reads its configuration options from\n5 places.\n\n* Command line switches:\n  Set a config with `--key val`.  All keys take a value, even if they\n  are booleans (the config parser doesn't know what the options are at\n  the time of parsing).  If no value is provided, then the option is set\n  to boolean `true`.\n* Environment Variables:\n  Set any config by prefixing the name in an environment variable with\n  `npm_config_`.  For example, `export npm_config_key=val`.\n* User Configs:\n  The file at $HOME/.npmrc is an ini-formatted list of configs.  If\n  present, it is parsed.  If the `userconfig` option is set in the cli\n  or env, then that will be used instead.\n* Global Configs:\n  The file found at ../etc/npmrc (from the node executable, by default\n  this resolves to /usr/local/etc/npmrc) will be parsed if it is found.\n  If the `globalconfig` option is set in the cli, env, or user config,\n  then that file is parsed instead.\n* Defaults:\n  npm's default configuration options are defined in\n  lib/utils/config-defs.js.  These must not be changed.\n\nSee [`config`](/cli/v6/using-npm/config) for much much more information.\n\n### Contributions\n\nPatches welcome!\n\nIf you would like to contribute, but don't know what to work on, read\nthe contributing guidelines and check the issues list.\n\n* [CONTRIBUTING.md](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md)\n* [Bug tracker](https://github.com/npm/cli/issues)\n\n### Bugs\n\nWhen you find issues, please report them:\n\n* web:\n  <https://npm.community/c/bugs>\n\nBe sure to follow the template and bug reporting guidelines. You can also ask\nfor help in the [support forum](https://npm.community/c/support) if you're\nunsure if it's actually a bug or are having trouble coming up with a detailed\nreproduction to report.\n\n### Author\n\n[Isaac Z. Schlueter](http://blog.izs.me/) ::\n[isaacs](https://github.com/isaacs/) ::\n[@izs](https://twitter.com/izs) ::\n<i@izs.me>\n\n### See Also\n* [npm help](/cli/v6/commands/npm-help)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n"},{"id":"1202a20e-a5d9-5d80-96e6-070e2c716bc3","frontmatter":{"title":"folders"},"rawBody":"---\ntitle: folders\nsection: 5\ndescription: Folder Structures Used by npm\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/folders.md\n---\n\n### Description\n\nnpm puts various things on your computer.  That's its job.\n\nThis document will tell you what it puts where.\n\n#### tl;dr\n\n* Local install (default): puts stuff in `./node_modules` of the current\n  package root.\n* Global install (with `-g`): puts stuff in /usr/local or wherever node\n  is installed.\n* Install it **locally** if you're going to `require()` it.\n* Install it **globally** if you're going to run it on the command line.\n* If you need both, then install it in both places, or use `npm link`.\n\n#### prefix Configuration\n\nThe `prefix` config defaults to the location where node is installed.\nOn most systems, this is `/usr/local`. On Windows, it's `%AppData%\\npm`.\nOn Unix systems, it's one level up, since node is typically installed at\n`{prefix}/bin/node` rather than `{prefix}/node.exe`.\n\nWhen the `global` flag is set, npm installs things into this prefix.\nWhen it is not set, it uses the root of the current package, or the\ncurrent working directory if not in a package already.\n\n#### Node Modules\n\nPackages are dropped into the `node_modules` folder under the `prefix`.\nWhen installing locally, this means that you can\n`require(\"packagename\")` to load its main module, or\n`require(\"packagename/lib/path/to/sub/module\")` to load other modules.\n\nGlobal installs on Unix systems go to `{prefix}/lib/node_modules`.\nGlobal installs on Windows go to `{prefix}/node_modules` (that is, no\n`lib` folder.)\n\nScoped packages are installed the same way, except they are grouped together\nin a sub-folder of the relevant `node_modules` folder with the name of that\nscope prefix by the @ symbol, e.g. `npm install @myorg/package` would place\nthe package in `{prefix}/node_modules/@myorg/package`. See [`scope`](/cli/v6/using-npm/scope) for more details.\n\nIf you wish to `require()` a package, then install it locally.\n\n#### Executables\n\nWhen in global mode, executables are linked into `{prefix}/bin` on Unix,\nor directly into `{prefix}` on Windows.\n\nWhen in local mode, executables are linked into\n`./node_modules/.bin` so that they can be made available to scripts run\nthrough npm.  (For example, so that a test runner will be in the path\nwhen you run `npm test`.)\n\n#### Man Pages\n\nWhen in global mode, man pages are linked into `{prefix}/share/man`.\n\nWhen in local mode, man pages are not installed.\n\nMan pages are not installed on Windows systems.\n\n#### Cache\n\nSee [`npm cache`](/cli/v6/commands/npm-cache).  Cache files are stored in `~/.npm` on Posix, or\n`%AppData%/npm-cache` on Windows.\n\nThis is controlled by the `cache` configuration param.\n\n#### Temp Files\n\nTemporary files are stored by default in the folder specified by the\n`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment\nvariables, or `/tmp` on Unix and `c:\\windows\\temp` on Windows.\n\nTemp files are given a unique folder under this root for each run of the\nprogram, and are deleted upon successful exit.\n\n### More Information\n\nWhen installing locally, npm first tries to find an appropriate\n`prefix` folder.  This is so that `npm install foo@1.2.3` will install\nto the sensible root of your package, even if you happen to have `cd`ed\ninto some other folder.\n\nStarting at the $PWD, npm will walk up the folder tree checking for a\nfolder that contains either a `package.json` file, or a `node_modules`\nfolder.  If such a thing is found, then that is treated as the effective\n\"current directory\" for the purpose of running npm commands.  (This\nbehavior is inspired by and similar to git's .git-folder seeking\nlogic when running git commands in a working dir.)\n\nIf no package root is found, then the current folder is used.\n\nWhen you run `npm install foo@1.2.3`, then the package is loaded into\nthe cache, and then unpacked into `./node_modules/foo`.  Then, any of\nfoo's dependencies are similarly unpacked into\n`./node_modules/foo/node_modules/...`.\n\nAny bin files are symlinked to `./node_modules/.bin/`, so that they may\nbe found by npm scripts when necessary.\n\n#### Global Installation\n\nIf the `global` configuration is set to true, then npm will\ninstall packages \"globally\".\n\nFor global installation, packages are installed roughly the same way,\nbut using the folders described above.\n\n#### Cycles, Conflicts, and Folder Parsimony\n\nCycles are handled using the property of node's module system that it\nwalks up the directories looking for `node_modules` folders.  So, at every\nstage, if a package is already installed in an ancestor `node_modules`\nfolder, then it is not installed at the current location.\n\nConsider the case above, where `foo -> bar -> baz`.  Imagine if, in\naddition to that, baz depended on bar, so you'd have:\n`foo -> bar -> baz -> bar -> baz ...`.  However, since the folder\nstructure is: `foo/node_modules/bar/node_modules/baz`, there's no need to\nput another copy of bar into `.../baz/node_modules`, since when it calls\nrequire(\"bar\"), it will get the copy that is installed in\n`foo/node_modules/bar`.\n\nThis shortcut is only used if the exact same\nversion would be installed in multiple nested `node_modules` folders.  It\nis still possible to have `a/node_modules/b/node_modules/a` if the two\n\"a\" packages are different versions.  However, without repeating the\nexact same package multiple times, an infinite regress will always be\nprevented.\n\nAnother optimization can be made by installing dependencies at the\nhighest level possible, below the localized \"target\" folder.\n\n#### Example\n\nConsider this dependency graph:\n\n```bash\nfoo\n+-- blerg@1.2.5\n+-- bar@1.2.3\n|   +-- blerg@1.x (latest=1.3.7)\n|   +-- baz@2.x\n|   |   `-- quux@3.x\n|   |       `-- bar@1.2.3 (cycle)\n|   `-- asdf@*\n`-- baz@1.2.3\n    `-- quux@3.x\n        `-- bar\n```\n\nIn this case, we might expect a folder structure like this:\n\n```bash\nfoo\n+-- node_modules\n    +-- blerg (1.2.5) <---[A]\n    +-- bar (1.2.3) <---[B]\n    |   `-- node_modules\n    |       +-- baz (2.0.2) <---[C]\n    |       |   `-- node_modules\n    |       |       `-- quux (3.2.0)\n    |       `-- asdf (2.3.4)\n    `-- baz (1.2.3) <---[D]\n        `-- node_modules\n            `-- quux (3.2.0) <---[E]\n```\n\nSince foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are\ninstalled in foo's `node_modules` folder.\n\nEven though the latest copy of blerg is 1.3.7, foo has a specific\ndependency on version 1.2.5.  So, that gets installed at [A].  Since the\nparent installation of blerg satisfies bar's dependency on `blerg@1.x`,\nit does not install another copy under [B].\n\nBar [B] also has dependencies on baz and asdf, so those are installed in\nbar's `node_modules` folder.  Because it depends on `baz@2.x`, it cannot\nre-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],\nand must install its own copy [C].\n\nUnderneath bar, the `baz -> quux -> bar` dependency creates a cycle.\nHowever, because bar is already in quux's ancestry [B], it does not\nunpack another copy of bar into that folder.\n\nUnderneath `foo -> baz` [D], quux's [E] folder tree is empty, because its\ndependency on bar is satisfied by the parent folder copy installed at [B].\n\nFor a graphical breakdown of what is installed where, use `npm ls`.\n\n#### Publishing\n\nUpon publishing, npm will look in the `node_modules` folder.  If any of\nthe items there are not in the `bundledDependencies` array, then they will\nnot be included in the package tarball.\n\nThis allows a package maintainer to install all of their dependencies\n(and dev dependencies) locally, but only re-publish those items that\ncannot be found elsewhere.  See [`package.json`](/cli/v6/configuring-npm/package-json) for more information.\n\n### See also\n\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm pack](/cli/v6/commands/npm-pack)\n* [npm cache](/cli/v6/commands/npm-cache)\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [config](/cli/v6/using-npm/config)\n* [npm publish](/cli/v6/commands/npm-publish)\n"},{"id":"ac1449fc-d310-57b6-aff7-0e249eeea809","frontmatter":{"title":"Configuring npm"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/nav.yml\ntitle: Configuring npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"00b0c6ef-dcfc-5f0a-8586-7cf872054577","frontmatter":{"title":"install"},"rawBody":"---\ntitle: install\nsection: 5\ndescription: Download and install node and npm\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/install.md\n---\n\n### Description\n\nTo 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 recommend 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 permissions errors when you run npm packages globally.\n\n### Overview\n\n- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)\n- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)\n- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)\n\n### Checking your version of npm and Node.js\n\nTo see if you already have Node.js and npm installed and check the installed version, run the following commands:\n\n```\nnode -v\nnpm -v\n```\n\n### Using a Node version manager to install Node.js and npm\n\nNode version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.\n\n#### OSX or Linux Node version managers\n\n* [nvm](https://github.com/creationix/nvm)\n* [n](https://github.com/tj/n)\n\n#### Windows Node version managers\n\n* [nodist](https://github.com/marcelklehr/nodist)\n* [nvm-windows](https://github.com/coreybutler/nvm-windows)\n\n### Using a Node installer to install Node.js and npm\n\nIf you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.\n\n* [Node.js installer](https://nodejs.org/en/download/)\n* [NodeSource installer](https://github.com/nodesource/distributions). If you use Linux, we recommend that you use a NodeSource installer.\n\n#### OS X or Windows Node installers\n\nIf 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.\n\n#### Linux or other operating systems Node installers\n\nIf you're using Linux or another operating system, use one of the following installers:\n\n- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)\n- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)\n\nOr see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.\n\n\n#### Less-common operating systems\n\nFor more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].\n\n\n[pkg-mgr]: https://nodejs.org/en/download/package-manager/\n"},{"id":"a22ab565-3e28-5a40-b4df-e12a9dcd1df9","frontmatter":{"title":"npmrc"},"rawBody":"---\ntitle: npmrc\nsection: 5\ndescription: The npm config files\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/npmrc.md\n---\n\n### Description\n\nnpm gets its config settings from the command line, environment\nvariables, and `npmrc` files.\n\nThe `npm config` command can be used to update and edit the contents\nof the user and global npmrc files.\n\nFor a list of available configuration options, see [config](/cli/v6/using-npm/config).\n\n### Files\n\nThe four relevant files are:\n\n* per-project config file (/path/to/my/project/.npmrc)\n* per-user config file (~/.npmrc)\n* global config file ($PREFIX/etc/npmrc)\n* npm builtin config file (/path/to/npm/npmrc)\n\nAll npm config files are an ini-formatted list of `key = value`\nparameters.  Environment variables can be replaced using\n`${VARIABLE_NAME}`. For example:\n\n```bash\nprefix = ${HOME}/.npm-packages\n```\n\nEach of these files is loaded, and config options are resolved in\npriority order.  For example, a setting in the userconfig file would\noverride the setting in the globalconfig file.\n\nArray values are specified by adding \"[]\" after the key name. For\nexample:\n\n```bash\nkey[] = \"first value\"\nkey[] = \"second value\"\n```\n\n#### Comments\n\nLines in `.npmrc` files are interpreted as comments when they begin with a `;` or `#` character. `.npmrc` files are parsed by [npm/ini](https://github.com/npm/ini), which specifies this comment syntax.\n\nFor example:\n\n```bash\n# last modified: 01 Jan 2016\n; Set a new registry for a scoped package\n@myscope:registry=https://mycustomregistry.example.org\n```\n\n#### Per-project config file\n\nWhen working locally in a project, a `.npmrc` file in the root of the\nproject (ie, a sibling of `node_modules` and `package.json`) will set\nconfig values specific to this project.\n\nNote that this only applies to the root of the project that you're\nrunning npm in.  It has no effect when your module is published.  For\nexample, you can't publish a module that forces itself to install\nglobally, or in a different location.\n\nAdditionally, this file is not read in global mode, such as when running\n`npm install -g`.\n\n#### Per-user config file\n\n`$HOME/.npmrc` (or the `userconfig` param, if set in the environment\nor on the command line)\n\n#### Global config file\n\n`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):\nThis file is an ini-file formatted list of `key = value` parameters.\nEnvironment variables can be replaced as above.\n\n#### Built-in config file\n\n`path/to/npm/itself/npmrc`\n\nThis is an unchangeable \"builtin\" configuration file that npm keeps\nconsistent across updates.  Set fields in here using the `./configure`\nscript that comes with npm.  This is primarily for distribution\nmaintainers to override default configs in a standard and consistent\nmanner.\n\n### See also\n\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm config](/cli/v6/commands/npm-config)\n* [config](/cli/v6/using-npm/config)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm](/cli/v6/commands/npm)\n"},{"id":"568a6fc8-febd-5105-8934-904fabeee747","frontmatter":{"title":"package.json"},"rawBody":"---\ntitle: package.json\nsection: 5\ndescription: Specifics of npm's package.json handling\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/package-json.md\n---\n\n### Description\n\nThis document is all you need to know about what's required in your package.json\nfile.  It must be actual JSON, not just a JavaScript object literal.\n\nA lot of the behavior described in this document is affected by the config\nsettings described in [`config`](/cli/v6/using-npm/config).\n\n### name\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The name\nand version together form an identifier that is assumed to be completely unique.\nChanges to the package should come along with changes to the version. If you don't\nplan to publish your package, the name and version fields are optional.\n\nThe name is what your thing is called.\n\nSome rules:\n\n* The name must be less than or equal to 214 characters. This includes the scope for\n  scoped packages.\n* The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope.\n* New packages must not have uppercase letters in the name.\n* The name ends up being part of a URL, an argument on the command line, and a\n  folder name. Therefore, the name can't contain any non-URL-safe characters.\n\nSome tips:\n\n* Don't use the same name as a core Node module.\n* Don't put \"js\" or \"node\" in the name.  It's assumed that it's js, since you're\n  writing a package.json file, and you can specify the engine using the \"engines\"\n  field.  (See below.)\n* The name will probably be passed as an argument to require(), so it should\n  be something short, but also reasonably descriptive.\n* You may want to check the npm registry to see if there's something by that name\n  already, before you get too attached to it. <https://www.npmjs.com/>\n\nA name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See\n[`scope`](/cli/v6/using-npm/scope) for more detail.\n\n### version\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The name\nand version together form an identifier that is assumed to be completely unique.\nChanges to the package should come along with changes to the version. If you don't\nplan to publish your package, the name and version fields are optional.\n\nVersion must be parseable by\n[node-semver](https://github.com/isaacs/node-semver), which is bundled\nwith npm as a dependency.  (`npm install semver` to use it yourself.)\n\nMore on version numbers and ranges at [semver](/cli/v6/using-npm/semver).\n\n### description\n\nPut a description in it.  It's a string.  This helps people discover your\npackage, as it's listed in `npm search`.\n\n### keywords\n\nPut keywords in it.  It's an array of strings.  This helps people\ndiscover your package as it's listed in `npm search`.\n\n### homepage\n\nThe url to the project homepage.\n\nExample:\n\n```json\n\"homepage\": \"https://github.com/owner/project#readme\"\n```\n\n### bugs\n\nThe url to your project's issue tracker and / or the email address to which\nissues should be reported. These are helpful for people who encounter issues\nwith your package.\n\nIt should look like this:\n\n```json\n{ \"url\" : \"https://github.com/owner/project/issues\"\n, \"email\" : \"project@hostname.com\"\n}\n```\n\nYou can specify either one or both values. If you want to provide only a url,\nyou can specify the value for \"bugs\" as a simple string instead of an object.\n\nIf a url is provided, it will be used by the `npm bugs` command.\n\n### license\n\nYou should specify a license for your package so that people know how they are\npermitted to use it, and any restrictions you're placing on it.\n\nIf you're using a common license such as BSD-2-Clause or MIT, add a\ncurrent SPDX license identifier for the license you're using, like this:\n\n```json\n{ \"license\" : \"BSD-3-Clause\" }\n```\n\nYou can check [the full list of SPDX license IDs](https://spdx.org/licenses/).\nIdeally you should pick one that is\n[OSI](https://opensource.org/licenses/alphabetical) approved.\n\nIf your package is licensed under multiple common licenses, use an [SPDX license\nexpression syntax version 2.0 string](https://www.npmjs.com/package/spdx), like this:\n\n```json\n{ \"license\" : \"(ISC OR GPL-3.0)\" }\n```\nIf you are using a license that hasn't been assigned an SPDX identifier, or if\nyou are using a custom license, use a string value like this one:\n\n```json\n{ \"license\" : \"SEE LICENSE IN <filename>\" }\n```\nThen include a file named `<filename>` at the top level of the package.\n\nSome old packages used license objects or a \"licenses\" property containing an\narray of license objects:\n\n```json\n// Not valid metadata\n{ \"license\" :\n  { \"type\" : \"ISC\"\n  , \"url\" : \"https://opensource.org/licenses/ISC\"\n  }\n}\n\n// Not valid metadata\n{ \"licenses\" :\n  [\n    { \"type\": \"MIT\"\n    , \"url\": \"https://www.opensource.org/licenses/mit-license.php\"\n    }\n  , { \"type\": \"Apache-2.0\"\n    , \"url\": \"https://opensource.org/licenses/apache2.0.php\"\n    }\n  ]\n}\n```\n\nThose styles are now deprecated. Instead, use SPDX expressions, like this:\n\n```json\n{ \"license\": \"ISC\" }\n\n{ \"license\": \"(MIT OR Apache-2.0)\" }\n```\n\nFinally, if you do not wish to grant others the right to use a private or\nunpublished package under any terms:\n\n```json\n{ \"license\": \"UNLICENSED\" }\n```\nConsider also setting `\"private\": true` to prevent accidental publication.\n\n### people fields: author, contributors\n\nThe \"author\" is one person.  \"contributors\" is an array of people.  A \"person\"\nis an object with a \"name\" field and optionally \"url\" and \"email\", like this:\n\n```json\n{ \"name\" : \"Barney Rubble\"\n, \"email\" : \"b@rubble.com\"\n, \"url\" : \"http://barnyrubble.tumblr.com/\"\n}\n```\n\nOr you can shorten that all into a single string, and npm will parse it for you:\n\n```json\n\"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)\"\n```\n\nBoth email and url are optional either way.\n\nnpm also sets a top-level \"maintainers\" field with your npm user info.\n\n### funding\n\nYou can specify an object containing an URL that provides up-to-date\ninformation about ways to help fund development of your package, or\na string URL, or an array of these:\n\n    \"funding\": {\n      \"type\" : \"individual\",\n      \"url\" : \"http://example.com/donate\"\n    }\n\n    \"funding\": {\n      \"type\" : \"patreon\",\n      \"url\" : \"https://www.patreon.com/my-account\"\n    }\n\n    \"funding\": \"http://example.com/donate\"\n\n    \"funding\": [\n      {\n        \"type\" : \"individual\",\n        \"url\" : \"http://example.com/donate\"\n      },\n      \"http://example.com/donateAlso\",\n      {\n        \"type\" : \"patreon\",\n        \"url\" : \"https://www.patreon.com/my-account\"\n      }\n    ]\n\n\nUsers can use the `npm fund` subcommand to list the `funding` URLs of all\ndependencies of their project, direct and indirect. A shortcut to visit each\nfunding url is also available when providing the project name such as:\n`npm fund <projectname>` (when there are multiple URLs, the first one will be\nvisited)\n\n### files\n\nThe optional `files` field is an array of file patterns that describes\nthe entries to be included when your package is installed as a\ndependency. File patterns follow a similar syntax to `.gitignore`, but\nreversed: including a file, directory, or glob pattern (`*`, `**/*`, and such)\nwill make it so that file is included in the tarball when it's packed. Omitting\nthe field will make it default to `[\"*\"]`, which means it will include all files.\n\nSome special files and directories are also included or excluded regardless of\nwhether they exist in the `files` array (see below).\n\nYou can also provide a `.npmignore` file in the root of your package or\nin subdirectories, which will keep files from being included. At the\nroot of your package it will not override the \"files\" field, but in\nsubdirectories it will. The `.npmignore` file works just like a\n`.gitignore`. If there is a `.gitignore` file, and `.npmignore` is\nmissing, `.gitignore`'s contents will be used instead.\n\nFiles included with the \"package.json#files\" field _cannot_ be excluded\nthrough `.npmignore` or `.gitignore`.\n\nCertain files are always included, regardless of settings:\n\n* `package.json`\n* `README`\n* `CHANGES` / `CHANGELOG` / `HISTORY`\n* `LICENSE` / `LICENCE`\n* `NOTICE`\n* The file in the \"main\" field\n\n`README`, `CHANGES`, `LICENSE` & `NOTICE` can have any case and extension.\n\nConversely, some files are always ignored:\n\n* `.git`\n* `CVS`\n* `.svn`\n* `.hg`\n* `.lock-wscript`\n* `.wafpickle-N`\n* `.DS_Store`\n* `npm-debug.log`\n* `.npmrc`\n* `node_modules`\n* `config.gypi`\n* `package-lock.json` (use shrinkwrap instead)\n* All files containing a `*` character (incompatible with Windows) \n\n### main\n\nThe main field is a module ID that is the primary entry point to your program.\nThat is, if your package is named `foo`, and a user installs it, and then does\n`require(\"foo\")`, then your main module's exports object will be returned.\n\nThis should be a module ID relative to the root of your package folder.\n\nFor most modules, it makes the most sense to have a main script and often not\nmuch else.\n\n### browser\n\nIf your module is meant to be used client-side the browser field should be\nused instead of the main field. This is helpful to hint users that it might\nrely on primitives that aren't available in Node.js modules. (e.g. `window`)\n\n### bin\n\nA lot of packages have one or more executable files that they'd like to\ninstall into the PATH. npm makes this pretty easy (in fact, it uses this\nfeature to install the \"npm\" executable.)\n\nTo use this, supply a `bin` field in your package.json which is a map of\ncommand name to local file name. On install, npm will symlink that file into\n`prefix/bin` for global installs, or `./node_modules/.bin/` for local\ninstalls.\n\n\nFor example, myapp could have this:\n\n```json\n{ \"bin\" : { \"myapp\" : \"./cli.js\" } }\n```\n\nSo, when you install myapp, it'll create a symlink from the `cli.js` script to\n`/usr/local/bin/myapp`.\n\nIf you have a single executable, and its name should be the name\nof the package, then you can just supply it as a string.  For example:\n\n```json\n{ \"name\": \"my-program\"\n, \"version\": \"1.2.5\"\n, \"bin\": \"./path/to/program\" }\n```\n\nwould be the same as this:\n\n```json\n{ \"name\": \"my-program\"\n, \"version\": \"1.2.5\"\n, \"bin\" : { \"my-program\" : \"./path/to/program\" } }\n```\n\nPlease make sure that your file(s) referenced in `bin` starts with\n`#!/usr/bin/env node`, otherwise the scripts are started without the node\nexecutable!\n\n### man\n\nSpecify either a single file or an array of filenames to put in place for the\n`man` program to find.\n\nIf only a single file is provided, then it's installed such that it is the\nresult from `man <pkgname>`, regardless of its actual filename.  For example:\n\n```json\n{ \"name\" : \"foo\"\n, \"version\" : \"1.2.3\"\n, \"description\" : \"A packaged foo fooer for fooing foos\"\n, \"main\" : \"foo.js\"\n, \"man\" : \"./man/doc.1\"\n}\n```\n\nwould link the `./man/doc.1` file in such that it is the target for `man foo`\n\nIf the filename doesn't start with the package name, then it's prefixed.\nSo, this:\n\n```json\n{ \"name\" : \"foo\"\n, \"version\" : \"1.2.3\"\n, \"description\" : \"A packaged foo fooer for fooing foos\"\n, \"main\" : \"foo.js\"\n, \"man\" : [ \"./man/foo.1\", \"./man/bar.1\" ]\n}\n```\n\nwill create files to do `man foo` and `man foo-bar`.\n\nMan files must end with a number, and optionally a `.gz` suffix if they are\ncompressed.  The number dictates which man section the file is installed into.\n\n```json\n{ \"name\" : \"foo\"\n, \"version\" : \"1.2.3\"\n, \"description\" : \"A packaged foo fooer for fooing foos\"\n, \"main\" : \"foo.js\"\n, \"man\" : [ \"./man/foo.1\", \"./man/foo.2\" ]\n}\n```\nwill create entries for `man foo` and `man 2 foo`\n\n### directories\n\nThe CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a\nfew ways that you can indicate the structure of your package using a `directories`\nobject. If you look at [npm's package.json](https://registry.npmjs.org/npm/latest),\nyou'll see that it has directories for doc, lib, and man.\n\nIn the future, this information may be used in other creative ways.\n\n#### directories.lib\n\nTell people where the bulk of your library is.  Nothing special is done\nwith the lib folder in any way, but it's useful meta info.\n\n#### directories.bin\n\nIf you specify a `bin` directory in `directories.bin`, all the files in\nthat folder will be added.\n\nBecause of the way the `bin` directive works, specifying both a\n`bin` path and setting `directories.bin` is an error. If you want to\nspecify individual files, use `bin`, and for all the files in an\nexisting `bin` directory, use `directories.bin`.\n\n#### directories.man\n\nA folder that is full of man pages.  Sugar to generate a \"man\" array by\nwalking the folder.\n\n#### directories.doc\n\nPut markdown files in here.  Eventually, these will be displayed nicely,\nmaybe, someday.\n\n#### directories.example\n\nPut example scripts in here.  Someday, it might be exposed in some clever way.\n\n#### directories.test\n\nPut your tests in here. It is currently not exposed, but it might be in the\nfuture.\n\n### repository\n\nSpecify the place where your code lives. This is helpful for people who\nwant to contribute.  If the git repo is on GitHub, then the `npm docs`\ncommand will be able to find you.\n\nDo it like this:\n\n```json\n\"repository\": {\n  \"type\" : \"git\",\n  \"url\" : \"https://github.com/npm/cli.git\"\n}\n\n\"repository\": {\n  \"type\" : \"svn\",\n  \"url\" : \"https://v8.googlecode.com/svn/trunk/\"\n}\n```\n\nThe URL should be a publicly available (perhaps read-only) url that can be handed\ndirectly to a VCS program without any modification.  It should not be a url to an\nhtml project page that you put in your browser.  It's for computers.\n\nFor GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same\nshortcut syntax you use for `npm install`:\n\n```json\n\"repository\": \"npm/npm\"\n\n\"repository\": \"github:user/repo\"\n\n\"repository\": \"gist:11081aaa281\"\n\n\"repository\": \"bitbucket:user/repo\"\n\n\"repository\": \"gitlab:user/repo\"\n```\n\nIf the `package.json` for your package is not in the root directory (for example\nif it is part of a monorepo), you can specify the directory in which it lives:\n\n```json\n\"repository\": {\n  \"type\" : \"git\",\n  \"url\" : \"https://github.com/facebook/react.git\",\n  \"directory\": \"packages/react-dom\"\n}\n```\n\n### scripts\n\nThe \"scripts\" property is a dictionary containing script commands that are run\nat various times in the lifecycle of your package.  The key is the lifecycle\nevent, and the value is the command to run at that point.\n\nSee [`scripts`](/cli/v6/using-npm/scripts) to find out more about writing package scripts.\n\n### config\n\nA \"config\" object can be used to set configuration parameters used in package\nscripts that persist across upgrades.  For instance, if a package had the\nfollowing:\n\n```json\n{ \"name\" : \"foo\"\n, \"config\" : { \"port\" : \"8080\" } }\n```\n\nand then had a \"start\" command that then referenced the\n`npm_package_config_port` environment variable, then the user could\noverride that by doing `npm config set foo:port 8001`.\n\nSee [`config`](/cli/v6/using-npm/config) and [`scripts`](/cli/v6/using-npm/scripts) for more on package\nconfigs.\n\n### dependencies\n\nDependencies are specified in a simple object that maps a package name to a\nversion range. The version range is a string which has one or more\nspace-separated descriptors.  Dependencies can also be identified with a\ntarball or git URL.\n\n**Please do not put test harnesses or transpilers in your\n`dependencies` object.**  See `devDependencies`, below.\n\nSee [semver](/cli/v6/using-npm/semver) for more details about specifying version ranges.\n\n* `version` Must match `version` exactly\n* `>version` Must be greater than `version`\n* `>=version` etc\n* `<version`\n* `<=version`\n* `~version` \"Approximately equivalent to version\"  See [semver](/cli/v6/using-npm/semver)\n* `^version` \"Compatible with version\"  See [semver](/cli/v6/using-npm/semver)\n* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0\n* `http://...` See 'URLs as Dependencies' below\n* `*` Matches any version\n* `\"\"` (just an empty string) Same as `*`\n* `version1 - version2` Same as `>=version1 <=version2`.\n* `range1 || range2` Passes if either range1 or range2 are satisfied.\n* `git...` See 'Git URLs as Dependencies' below\n* `user/repo` See 'GitHub URLs' below\n* `tag` A specific version tagged and published as `tag`  See [`npm dist-tag`](/cli/v6/commands/npm-dist-tag)\n* `path/path/path` See [Local Paths](#local-paths) below\n\nFor example, these are all valid:\n\n```json\n{ \"dependencies\" :\n  { \"foo\" : \"1.0.0 - 2.9999.9999\"\n  , \"bar\" : \">=1.0.2 <2.1.2\"\n  , \"baz\" : \">1.0.2 <=2.3.4\"\n  , \"boo\" : \"2.0.1\"\n  , \"qux\" : \"<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0\"\n  , \"asd\" : \"http://asdf.com/asdf.tar.gz\"\n  , \"til\" : \"~1.2\"\n  , \"elf\" : \"~1.2.3\"\n  , \"two\" : \"2.x\"\n  , \"thr\" : \"3.3.x\"\n  , \"lat\" : \"latest\"\n  , \"dyl\" : \"file:../dyl\"\n  }\n}\n```\n\n#### URLs as Dependencies\n\nYou may specify a tarball URL in place of a version range.\n\nThis tarball will be downloaded and installed locally to your package at\ninstall time.\n\n#### Git URLs as Dependencies\n\nGit urls are of the form:\n\n```bash\n<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n```\n\n`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n`git+file`.\n\nIf `#<commit-ish>` is provided, it will be used to clone exactly that\ncommit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\nbe any valid semver range or exact version, and npm will look for any tags\nor refs matching that range in the remote repository, much as it would for a\nregistry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\nspecified, then `master` is used.\n\nExamples:\n\n```bash\ngit+ssh://git@github.com:npm/cli.git#v1.0.27\ngit+ssh://git@github.com:npm/cli#semver:^5.0\ngit+https://isaacs@github.com/npm/cli.git\ngit://github.com/npm/cli.git#v1.0.27\n```\n\n#### GitHub URLs\n\nAs of version 1.1.65, you can refer to GitHub urls as just \"foo\":\n\"user/foo-project\".  Just as with git URLs, a `commit-ish` suffix can be\nincluded.  For example:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"0.0.0\",\n  \"dependencies\": {\n    \"express\": \"expressjs/express\",\n    \"mocha\": \"mochajs/mocha#4727d357ea\",\n    \"module\": \"user/repo#feature\\/branch\"\n  }\n}\n```\n\n#### Local Paths\n\nAs of version 2.0.0 you can provide a path to a local directory that contains a\npackage. Local paths can be saved using `npm install -S` or\n`npm install --save`, using any of these forms:\n\n```bash\n../foo/bar\n~/foo/bar\n./foo/bar\n/foo/bar\n```\n\nin which case they will be normalized to a relative path and added to your\n`package.json`. For example:\n\n```json\n{\n  \"name\": \"baz\",\n  \"dependencies\": {\n    \"bar\": \"file:../foo/bar\"\n  }\n}\n```\n\nThis feature is helpful for local offline development and creating\ntests that require npm installing where you don't want to hit an\nexternal server, but should not be used when publishing packages\nto the public registry.\n\n### devDependencies\n\nIf someone is planning on downloading and using your module in their\nprogram, then they probably don't want or need to download and build\nthe external test or documentation framework that you use.\n\nIn this case, it's best to map these additional items in a `devDependencies`\nobject.\n\nThese things will be installed when doing `npm link` or `npm install`\nfrom the root of a package, and can be managed like any other npm\nconfiguration param.  See [`config`](/cli/v6/using-npm/config) for more on the topic.\n\nFor build steps that are not platform-specific, such as compiling\nCoffeeScript or other languages to JavaScript, use the `prepare`\nscript to do this, and make the required package a devDependency.\n\nFor example:\n\n```json\n{ \"name\": \"ethopia-waza\",\n  \"description\": \"a delightfully fruity coffee varietal\",\n  \"version\": \"1.2.3\",\n  \"devDependencies\": {\n    \"coffee-script\": \"~1.6.3\"\n  },\n  \"scripts\": {\n    \"prepare\": \"coffee -o lib/ -c src/waza.coffee\"\n  },\n  \"main\": \"lib/waza.js\"\n}\n```\n\nThe `prepare` script will be run before publishing, so that users\ncan consume the functionality without requiring them to compile it\nthemselves.  In dev mode (ie, locally running `npm install`), it'll\nrun this script as well, so that you can test it easily.\n\n### peerDependencies\n\nIn some cases, you want to express the compatibility of your package with a\nhost tool or library, while not necessarily doing a `require` of this host.\nThis is usually referred to as a *plugin*. Notably, your module may be exposing\na specific interface, expected and specified by the host documentation.\n\nFor example:\n\n```json\n{\n  \"name\": \"tea-latte\",\n  \"version\": \"1.3.5\",\n  \"peerDependencies\": {\n    \"tea\": \"2.x\"\n  }\n}\n```\n\nThis ensures your package `tea-latte` can be installed *along* with the second\nmajor version of the host package `tea` only. `npm install tea-latte` could\npossibly yield the following dependency graph:\n\n```bash\n├── tea-latte@1.3.5\n└── tea@2.2.0\n```\n\n**NOTE: npm versions 1 and 2 will automatically install `peerDependencies` if\nthey are not explicitly depended upon higher in the dependency tree. In the\nnext major version of npm (npm@3), this will no longer be the case. You will\nreceive a warning that the peerDependency is not installed instead.** The\nbehavior in npms 1 & 2 was frequently confusing and could easily put you into\ndependency hell, a situation that npm is designed to avoid as much as possible.\n\nTrying to install another plugin with a conflicting requirement will cause an\nerror. For this reason, make sure your plugin requirement is as broad as\npossible, and not to lock it down to specific patch versions.\n\nAssuming the host complies with [semver](https://semver.org/), only changes in\nthe host package's major version will break your plugin. Thus, if you've worked\nwith every 1.x version of the host package, use `\"^1.0\"` or `\"1.x\"` to express\nthis. If you depend on features introduced in 1.5.2, use `\">= 1.5.2 < 2\"`.\n\n### bundledDependencies\n\nThis defines an array of package names that will be bundled when publishing\nthe package.\n\nIn cases where you need to preserve npm packages locally or have them\navailable through a single file download, you can bundle the packages in a\ntarball file by specifying the package names in the `bundledDependencies`\narray and executing `npm pack`.\n\nFor example:\n\nIf we define a package.json like this:\n\n```json\n{\n  \"name\": \"awesome-web-framework\",\n  \"version\": \"1.0.0\",\n  \"bundledDependencies\": [\n    \"renderized\", \"super-streams\"\n  ]\n}\n```\nwe can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`.\nThis file contains the dependencies `renderized` and `super-streams` which\ncan be installed in a new project by executing `npm install\nawesome-web-framework-1.0.0.tgz`.  Note that the package names do not include\nany versions, as that information is specified in `dependencies`.\n\nIf this is spelled `\"bundleDependencies\"`, then that is also honored.\n\n### optionalDependencies\n\nIf a dependency can be used, but you would like npm to proceed if it cannot be\nfound or fails to install, then you may put it in the `optionalDependencies`\nobject.  This is a map of package name to version or url, just like the\n`dependencies` object.  The difference is that build failures do not cause\ninstallation to fail.  Running `npm install --no-optional` will prevent these\ndependencies from being installed.\n\nIt is still your program's responsibility to handle the lack of the\ndependency.  For example, something like this:\n\n```js\ntry {\n  var foo = require('foo')\n  var fooVersion = require('foo/package.json').version\n} catch (er) {\n  foo = null\n}\nif ( notGoodFooVersion(fooVersion) ) {\n  foo = null\n}\n\n// .. then later in your program ..\n\nif (foo) {\n  foo.doFooThings()\n}\n```\n\nEntries in `optionalDependencies` will override entries of the same name in\n`dependencies`, so it's usually best to only put in one place.\n\n### engines\n\nYou can specify the version of node that your stuff works on:\n\n```json\n{ \"engines\" : { \"node\" : \">=0.10.3 <0.12\" } }\n```\n\nAnd, like with dependencies, if you don't specify the version (or if you\nspecify \"\\*\" as the version), then any version of node will do.\n\nIf you specify an \"engines\" field, then npm will require that \"node\" be\nsomewhere on that list. If \"engines\" is omitted, then npm will just assume\nthat it works on node.\n\nYou can also use the \"engines\" field to specify which versions of npm\nare capable of properly installing your program.  For example:\n\n```json\n{ \"engines\" : { \"npm\" : \"~1.0.20\" } }\n```\n\nUnless the user has set the `engine-strict` config flag, this\nfield is advisory only and will only produce warnings when your package is installed as a dependency.\n\n### engineStrict\n\n**This feature was removed in npm 3.0.0**\n\nPrior to npm 3.0.0, this feature was used to treat this package as if the\nuser had set `engine-strict`. It is no longer used.\n\n### os\n\nYou can specify which operating systems your\nmodule will run on:\n\n```json\n\"os\" : [ \"darwin\", \"linux\" ]\n```\n\nYou can also blacklist instead of whitelist operating systems,\njust prepend the blacklisted os with a '!':\n\n```json\n\"os\" : [ \"!win32\" ]\n```\n\nThe host operating system is determined by `process.platform`\n\nIt is allowed to both blacklist, and whitelist, although there isn't any\ngood reason to do this.\n\n### cpu\n\nIf your code only runs on certain cpu architectures,\nyou can specify which ones.\n\n```json\n\"cpu\" : [ \"x64\", \"ia32\" ]\n```\n\nLike the `os` option, you can also blacklist architectures:\n\n```json\n\"cpu\" : [ \"!arm\", \"!mips\" ]\n```\n\nThe host architecture is determined by `process.arch`\n\n### preferGlobal\n\n**DEPRECATED**\n\nThis option used to trigger an npm warning, but it will no longer warn. It is\npurely there for informational purposes. It is now recommended that you install\nany binaries as local devDependencies wherever possible.\n\n### private\n\nIf you set `\"private\": true` in your package.json, then npm will refuse\nto publish it.\n\nThis is a way to prevent accidental publication of private repositories.  If\nyou would like to ensure that a given package is only ever published to a\nspecific registry (for example, an internal registry), then use the\n`publishConfig` dictionary described below to override the `registry` config\nparam at publish-time.\n\n### publishConfig\n\nThis is a set of config values that will be used at publish-time. It's\nespecially handy if you want to set the tag, registry or access, so that\nyou can ensure that a given package is not tagged with \"latest\", published\nto the global public registry or that a scoped module is private by default.\n\nAny config values can be overridden, but only \"tag\", \"registry\" and \"access\"\nprobably matter for the purposes of publishing.\n\nSee [`config`](/cli/v6/using-npm/config) to see the list of config options that can be\noverridden.\n\n### DEFAULT VALUES\n\nnpm will default some values based on package contents.\n\n* `\"scripts\": {\"start\": \"node server.js\"}`\n\n  If there is a `server.js` file in the root of your package, then npm\n  will default the `start` command to `node server.js`.\n\n* `\"scripts\":{\"install\": \"node-gyp rebuild\"}`\n\n  If there is a `binding.gyp` file in the root of your package and you have not defined an `install` or `preinstall` script, npm will\n  default the `install` command to compile using node-gyp.\n\n* `\"contributors\": [...]`\n\n  If there is an `AUTHORS` file in the root of your package, npm will\n  treat each line as a `Name <email> (url)` format, where email and url\n  are optional.  Lines which start with a `#` or are blank, will be\n  ignored.\n\n### SEE ALSO\n\n* [semver](/cli/v6/using-npm/semver)\n* [npm init](/cli/v6/commands/npm-init)\n* [npm version](/cli/v6/commands/npm-version)\n* [npm config](/cli/v6/commands/npm-config)\n* [npm help](/cli/v6/commands/npm-help)\n* [npm install](/cli/v6/commands/npm-install)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm uninstall](/cli/v6/commands/npm-uninstall)\n"},{"id":"16d9c3d5-46db-5161-b5d9-0ab0e248c348","frontmatter":{"title":"package-lock.json"},"rawBody":"---\ntitle: package-lock.json\nsection: 5\ndescription: A manifestation of the manifest\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/package-lock-json.md\n---\n\n### Description\n\n`package-lock.json` is automatically generated for any operations where npm\nmodifies either the `node_modules` tree, or `package.json`. It describes the\nexact tree that was generated, such that subsequent installs are able to\ngenerate identical trees, regardless of intermediate dependency updates.\n\nThis file is intended to be committed into source repositories, and serves\nvarious purposes:\n\n* Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies.\n\n* Provide a facility for users to \"time-travel\" to previous states of `node_modules` without having to commit the directory itself.\n\n* To facilitate greater visibility of tree changes through readable source control diffs.\n\n* And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages.\n\nOne key detail about `package-lock.json` is that it cannot be published, and it\nwill be ignored if found in any place other than the toplevel package. It shares\na format with [npm-shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json), which is essentially the same file, but\nallows publication. This is not recommended unless deploying a CLI tool or\notherwise using the publication process for producing production packages.\n\nIf both `package-lock.json` and `npm-shrinkwrap.json` are present in the root of\na package, `package-lock.json` will be completely ignored.\n\n\n### File Format\n\n#### name\n\nThe name of the package this is a package-lock for. This must match what's in\n`package.json`.\n\n#### version\n\nThe version of the package this is a package-lock for. This must match what's in\n`package.json`.\n\n#### lockfileVersion\n\nAn integer version, starting at `1` with the version number of this document\nwhose semantics were used when generating this `package-lock.json`.\n\n#### packageIntegrity\n\nThis is a [subresource\nintegrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) value\ncreated from the `package.json`. No preprocessing of the `package.json` should\nbe done. Subresource integrity strings can be produced by modules like\n[`ssri`](https://www.npmjs.com/package/ssri).\n\n#### preserveSymlinks\n\nIndicates that the install was done with the environment variable\n`NODE_PRESERVE_SYMLINKS` enabled. The installer should insist that the value of\nthis property match that environment variable.\n\n#### dependencies\n\nA mapping of package name to dependency object.  Dependency objects have the\nfollowing properties:\n\n##### version\n\nThis is a specifier that uniquely identifies this package and should be\nusable in fetching a new copy of it.\n\n* bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes.\n* registry sources: This is a version number. (eg, `1.2.3`)\n* git sources: This is a git specifier with resolved committish. (eg, `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`)\n* http tarball sources: This is the URL of the tarball. (eg, `https://example.com/example-1.3.0.tgz`)\n* local tarball sources: This is the file URL of the tarball. (eg `file:///opt/storage/example-1.3.0.tgz`)\n* local link sources: This is the file URL of the link. (eg `file:libs/our-module`)\n\n##### integrity\n\nThis is a [Standard Subresource\nIntegrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) for this\nresource.\n\n* For bundled dependencies this is not included, regardless of source.\n* For registry sources, this is the `integrity` that the registry provided, or if one wasn't provided the SHA1 in `shasum`.\n* For git sources this is the specific commit hash we cloned from.\n* For remote tarball sources this is an integrity based on a SHA512 of\n  the file.\n* For local tarball sources: This is an integrity field based on the SHA512 of the file.\n\n##### resolved\n\n* For bundled dependencies this is not included, regardless of source.\n* For registry sources this is path of the tarball relative to the registry\n  URL.  If the tarball URL isn't on the same server as the registry URL then\n  this is a complete URL.\n\n##### bundled\n\nIf true, this is the bundled dependency and will be installed by the parent\nmodule.  When installing, this module will be extracted from the parent\nmodule during the extract phase, not installed as a separate dependency.\n\n##### dev\n\nIf true then this dependency is either a development dependency ONLY of the\ntop level module or a transitive dependency of one.  This is false for\ndependencies that are both a development dependency of the top level and a\ntransitive dependency of a non-development dependency of the top level.\n\n##### optional\n\nIf true then this dependency is either an optional dependency ONLY of the\ntop level module or a transitive dependency of one.  This is false for\ndependencies that are both an optional dependency of the top level and a\ntransitive dependency of a non-optional dependency of the top level.\n\nAll optional dependencies should be included even if they're uninstallable\non the current platform.\n\n\n##### requires\n\nThis is a mapping of module name to version.  This is a list of everything\nthis module requires, regardless of where it will be installed.  The version\nshould match via normal matching rules a dependency either in our\n`dependencies` or in a level higher than us.\n\n\n##### dependencies\n\nThe dependencies of this dependency, exactly as at the top level.\n\n### See also\n\n* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)\n* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)\n* [package-locks](/cli/v6/configuring-npm/package-locks)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"1e23fd8f-c55b-587b-b99d-adf5980cfcd9","frontmatter":{"title":"package-locks"},"rawBody":"---\ntitle: package-locks\nsection: 5\ndescription: An explanation of npm lockfiles\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/package-locks.md\n---\n\n### Description\n\nConceptually, the \"input\" to [`npm install`](/cli/v6/commands/npm-install) is a [package.json](/cli/v6/configuring-npm/package-json), while its\n\"output\" is a fully-formed `node_modules` tree: a representation of the\ndependencies you declared. In an ideal world, npm would work like a pure\nfunction: the same `package.json` should produce the exact same `node_modules`\ntree, any time. In some cases, this is indeed true. But in many others, npm is\nunable to do this. There are multiple reasons for this:\n\n* different versions of npm (or other package managers) may have been used to install a package, each using slightly different installation algorithms.\n\n* a new version of a direct semver-range package may have been published since the last time your packages were installed, and thus a newer version will be used.\n\n* A dependency of one of your dependencies may have published a new version, which will update even if you used pinned dependency specifiers (`1.2.3` instead of `^1.2.3`)\n\n* The registry you installed from is no longer available, or allows mutation of versions (unlike the primary npm registry), and a different version of a package exists under the same version number now.\n\nAs an example, consider package A:\n\n```json\n{\n  \"name\": \"A\",\n  \"version\": \"0.1.0\",\n  \"dependencies\": {\n    \"B\": \"<0.1.0\"\n  }\n}\n```\n\npackage B:\n\n```json\n{\n  \"name\": \"B\",\n  \"version\": \"0.0.1\",\n  \"dependencies\": {\n    \"C\": \"<0.1.0\"\n  }\n}\n```\n\nand package C:\n```json\n{\n  \"name\": \"C\",\n  \"version\": \"0.0.1\"\n}\n```\n\nIf these are the only versions of A, B, and C available in the\nregistry, then a normal `npm install A` will install:\n\n```json\nA@0.1.0\n`-- B@0.0.1\n    `-- C@0.0.1\n```\n\nHowever, if B@0.0.2 is published, then a fresh `npm install A` will\ninstall:\n\n```bash\nA@0.1.0\n`-- B@0.0.2\n    `-- C@0.0.1\n```\n\nassuming the new version did not modify B's dependencies. Of course,\nthe new version of B could include a new version of C and any number\nof new dependencies. If such changes are undesirable, the author of A\ncould specify a dependency on B@0.0.1. However, if A's author and B's\nauthor are not the same person, there's no way for A's author to say\nthat he or she does not want to pull in newly published versions of C\nwhen B hasn't changed at all.\n\nTo prevent this potential issue, npm uses [package-lock.json](/cli/v6/configuring-npm/package-lock-json) or, if present, [npm-shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json). These files are called package locks, or lockfiles.\n\nWhenever you run `npm install`, npm generates or updates your package lock,\nwhich will look something like this:\n\n```json\n{\n  \"name\": \"A\",\n  \"version\": \"0.1.0\",\n  ...metadata fields...\n  \"dependencies\": {\n    \"B\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/B/-/B-0.0.1.tgz\",\n      \"integrity\": \"sha512-DeAdb33F+\"\n      \"dependencies\": {\n        \"C\": {\n          \"version\": \"git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4\"\n        }\n      }\n    }\n  }\n}\n```\n\nThis file describes an *exact*, and more importantly *reproducible*\n`node_modules` tree. Once it's present, any future installation will base its\nwork off this file, instead of recalculating dependency versions off\n[package.json](/cli/v6/configuring-npm/package-json).\n\nThe presence of a package lock changes the installation behavior such that:\n\n1. The module tree described by the package lock is reproduced. This means\nreproducing the structure described in the file, using the specific files\nreferenced in \"resolved\" if available, falling back to normal package resolution\nusing \"version\" if one isn't.\n\n2. The tree is walked and any missing dependencies are installed in the usual\nfashion.\n\nIf `preshrinkwrap`, `shrinkwrap` or `postshrinkwrap` are in the `scripts`\nproperty of the `package.json`, they will be executed in order. `preshrinkwrap`\nand `shrinkwrap` are executed before the shrinkwrap, `postshrinkwrap` is\nexecuted afterwards. These scripts run for both `package-lock.json` and\n`npm-shrinkwrap.json`. For example to run some postprocessing on the generated\nfile:\n\n```json\n  \"scripts\": {\n    \"postshrinkwrap\": \"json -I -e \\\"this.myMetadata = $MY_APP_METADATA\\\"\"\n  }\n```\n\n#### Using locked packages\n\nUsing a locked package is no different than using any package without a package\nlock: any commands that update `node_modules` and/or `package.json`'s\ndependencies will automatically sync the existing lockfile. This includes `npm\ninstall`, `npm rm`, `npm update`, etc. To prevent this update from happening,\nyou can use the `--no-save` option to prevent saving altogether, or\n`--no-shrinkwrap` to allow `package.json` to be updated while leaving\n`package-lock.json` or `npm-shrinkwrap.json` intact.\n\nIt is highly recommended you commit the generated package lock to source\ncontrol: this will allow anyone else on your team, your deployments, your\nCI/continuous integration, and anyone else who runs `npm install` in your\npackage source to get the exact same dependency tree that you were developing\non. Additionally, the diffs from these changes are human-readable and will\ninform you of any changes npm has made to your `node_modules`, so you can notice\nif any transitive dependencies were updated, hoisted, etc.\n\n#### Resolving lockfile conflicts\n\nOccasionally, two separate npm install will create package locks that cause\nmerge conflicts in source control systems. As of `npm@5.7.0`, these conflicts\ncan be resolved by manually fixing any `package.json` conflicts, and then\nrunning `npm install [--package-lock-only]` again. npm will automatically\nresolve any conflicts for you and write a merged package lock that includes all\nthe dependencies from both branches in a reasonable tree. If\n`--package-lock-only` is provided, it will do this without also modifying your\nlocal `node_modules/`.\n\nTo make this process seamless on git, consider installing\n[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how\nto do this itself without any user interaction. In short: `$ npx\nnpm-merge-driver install -g` will let you do this, and even works with\npre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if\n`package.json` itself conflicts, you will have to resolve that by hand and run\n`npm install` manually, even with the merge driver.\n\n### See Also\n\n* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)\n* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)\n* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)\n"},{"id":"ee207d02-c9f4-5e99-af8a-744309bf59c7","frontmatter":{"title":"shrinkwrap.json"},"rawBody":"---\ntitle: shrinkwrap.json\nsection: 5\ndescription: A publishable lockfile\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/configuring-npm/shrinkwrap-json.md\n---\n\n### Description\n\n`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli/v6/commands/npm-shrinkwrap). It is identical to\n`package-lock.json`, with one major caveat: Unlike `package-lock.json`,\n`npm-shrinkwrap.json` may be included when publishing a package.\n\nThe recommended use-case for `npm-shrinkwrap.json` is applications deployed\nthrough the publishing process on the registry: for example, daemons and\ncommand-line tools intended as global installs or `devDependencies`. It's\nstrongly discouraged for library authors to publish this file, since that would\nprevent end users from having control over transitive dependency updates.\n\nAdditionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present\nin a package root, `package-lock.json` will be ignored in favor of this file.\n\nFor full details and description of the `npm-shrinkwrap.json` file format, refer\nto the manual page for [package-lock.json](/cli/v6/configuring-npm/package-lock-json).\n\n### See also\n\n* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)\n* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"b0af0d0d-c719-5cbf-a739-401713a5712b","frontmatter":{"title":"config"},"rawBody":"---\ntitle: config\nsection: 7\ndescription: More than you probably want to know about npm configuration\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/config.md\n---\n\n### Description\n\nnpm gets its configuration values from the following sources, sorted by priority:\n\n#### Command Line Flags\n\nPutting `--foo bar` on the command line sets the `foo` configuration\nparameter to `\"bar\"`.  A `--` argument tells the cli parser to stop\nreading flags.  Using `--flag` without specifying any value will set\nthe value to `true`.\n\nExample: `--flag1 --flag2` will set both configuration parameters\nto `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,\nand `flag2` to `bar`.  Finally, `--flag1 --flag2 -- bar` will set\nboth configuration parameters to `true`, and the `bar` is taken\nas a command argument.\n\n#### Environment Variables\n\nAny environment variables that start with `npm_config_` will be\ninterpreted as a configuration parameter.  For example, putting\n`npm_config_foo=bar` in your environment will set the `foo`\nconfiguration parameter to `bar`.  Any environment configurations that\nare not given a value will be given the value of `true`.  Config\nvalues are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the\nsame. However, please note that inside [`scripts`](/cli/v6/using-npm/scripts)\nnpm will set its own environment variables and Node will prefer\nthose lowercase versions over any uppercase ones that you might set.\nFor details see [this issue](https://github.com/npm/npm/issues/14528).\n\nNotice that you need to use underscores instead of dashes, so `--allow-same-version`\nwould become `npm_config_allow_same_version=true`.\n\n#### npmrc Files\n\nThe four relevant files are:\n\n* per-project configuration file (`/path/to/my/project/.npmrc`)\n* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI\n  option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)\n* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via\n  CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)\n* npm's built-in configuration file (`/path/to/npm/npmrc`)\n\nSee [npmrc](/cli/v6/configuring-npm/npmrc) for more details.\n\n#### Default Configs\n\nRun `npm config ls -l` to see a set of configuration parameters that are\ninternal to npm, and are defaults if nothing else is specified.\n\n### Shorthands and Other CLI Niceties\n\nThe following shorthands are parsed on the command-line:\n\n* `-v`: `--version`\n* `-h`, `-?`, `--help`, `-H`: `--usage`\n* `-s`, `--silent`: `--loglevel silent`\n* `-q`, `--quiet`: `--loglevel warn`\n* `-d`: `--loglevel info`\n* `-dd`, `--verbose`: `--loglevel verbose`\n* `-ddd`: `--loglevel silly`\n* `-g`: `--global`\n* `-C`: `--prefix`\n* `-l`: `--long`\n* `-m`: `--message`\n* `-p`, `--porcelain`: `--parseable`\n* `-reg`: `--registry`\n* `-f`: `--force`\n* `-desc`: `--description`\n* `-S`: `--save`\n* `-P`: `--save-prod`\n* `-D`: `--save-dev`\n* `-O`: `--save-optional`\n* `-B`: `--save-bundle`\n* `-E`: `--save-exact`\n* `-y`: `--yes`\n* `-n`: `--yes false`\n* `ll` and `la` commands: `ls --long`\n\nIf the specified configuration param resolves unambiguously to a known\nconfiguration parameter, then it is expanded to that configuration\nparameter.  For example:\n\n```bash\nnpm ls --par\n# same as:\nnpm ls --parseable\n```\n\nIf multiple single-character shorthands are strung together, and the\nresulting combination is unambiguously not some other configuration\nparam, then it is expanded to its various component pieces.  For\nexample:\n\n```bash\nnpm ls -gpld\n# same as:\nnpm ls --global --parseable --long --loglevel info\n```\n\n### Per-Package Config Settings\n\nWhen running scripts (see [`scripts`](/cli/v6/using-npm/scripts)) the package.json \"config\"\nkeys are overwritten in the environment if there is a config param of\n`<name>[@<version>]:<key>`.  For example, if the package.json has\nthis:\n\n```json\n{ \"name\" : \"foo\"\n, \"config\" : { \"port\" : \"8080\" }\n, \"scripts\" : { \"start\" : \"node server.js\" } }\n```\n\nand the server.js is this:\n\n```javascript\nhttp.createServer(...).listen(process.env.npm_package_config_port)\n```\n\nthen the user could change the behavior by doing:\n\n```bash\nnpm config set foo:port 80\n```\n\nSee [package.json](/cli/v6/configuring-npm/package-json) for more information.\n\n### Config Settings\n\n#### access\n\n* Default: `restricted`\n* Type: Access\n\nWhen publishing scoped packages, the access level defaults to `restricted`.  If\nyou want your scoped package to be publicly viewable (and installable) set\n`--access=public`. The only valid values for `access` are `public` and\n`restricted`. Unscoped packages _always_ have an access level of `public`.\n\n#### allow-same-version\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version\nto the same value as the current version.\n\n#### always-auth\n\n* Default: false\n* Type: Boolean\n\nForce npm to always require authentication when accessing the registry,\neven for `GET` requests.\n\n#### also\n\n* Default: null\n* Type: String\n\nWhen \"dev\" or \"development\" and running local `npm shrinkwrap`,\n`npm outdated`, or `npm update`, is an alias for `--dev`.\n\n#### audit\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside `npm install` runs to the default\nregistry and all registries configured for scopes.  See the documentation\nfor [`npm audit`](/cli/v6/commands/npm-audit) for details on what is submitted.\n\n#### audit-level\n\n* Default: `\"low\"`\n* Type: `'low'`, `'moderate'`, `'high'`, `'critical'`\n\nThe minimum level of vulnerability for `npm audit` to exit with\na non-zero exit code.\n\n#### auth-type\n\n* Default: `'legacy'`\n* Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`\n\nWhat authentication strategy to use with `adduser`/`login`.\n\n#### before\n\n* Alias: enjoy-by\n* Default: null\n* Type: Date\n\nIf passed to `npm install`, will rebuild the npm tree such that only versions\nthat were available **on or before** the `--before` time get installed.\nIf there's no versions available for the current set of direct dependencies, the\ncommand will error.\n\nIf the requested version is a `dist-tag` and the given tag does not pass the\n`--before` filter, the most recent version less than or equal to that tag will\nbe used. For example, `foo@latest` might install `foo@1.2` even though `latest`\nis `2.0`.\n\n#### bin-links\n\n* Default: `true`\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this.  This can be used to work around\nthe fact that some file systems don't support symlinks, even on\nostensibly Unix systems.\n\n#### browser\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: String\n\nThe browser that is called by the `npm docs` command to open websites.\n\n#### ca\n\n* Default: The npm CA certificate\n* Type: String, Array or null\n\nThe Certificate Authority signing certificate that is trusted for SSL\nconnections to the registry. Values should be in PEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with newlines\nreplaced by the string \"\\n\". For example:\n\n```bash\nca=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nSet to `null` to only allow \"known\" registrars, or to a specific CA cert\nto trust only that specific signing authority.\n\nMultiple CAs can be trusted by specifying an array of certificates:\n\n```bash\nca[]=\"...\"\nca[]=\"...\"\n```\n\nSee also the `strict-ssl` config.\n\n#### cafile\n\n* Default: `null`\n* Type: path\n\nA path to a file containing one or multiple Certificate Authority signing\ncertificates. Similar to the `ca` setting, but allows for multiple CA's, as\nwell as for the CA information to be stored in a file on disk.\n\n#### cache\n\n* Default: Windows: `%AppData%\\npm-cache`, Posix: `~/.npm`\n* Type: path\n\nThe location of npm's cache directory.  See [`npm cache`](/cli/v6/commands/npm-cache)\n\n#### cache-lock-stale\n\n* Default: 60000 (1 minute)\n* Type: Number\n\nThe number of ms before cache folder lockfiles are considered stale.\n\n#### cache-lock-retries\n\n* Default: 10\n* Type: Number\n\nNumber of times to retry to acquire a lock on cache folder lockfiles.\n\n#### cache-lock-wait\n\n* Default: 10000 (10 seconds)\n* Type: Number\n\nNumber of ms to wait for cache lock files to expire.\n\n#### cache-max\n\n* Default: Infinity\n* Type: Number\n\n**DEPRECATED**: This option has been deprecated in favor of `--prefer-online`.\n\n`--cache-max=0` is an alias for `--prefer-online`.\n\n#### cache-min\n\n* Default: 10\n* Type: Number\n\n**DEPRECATED**: This option has been deprecated in favor of `--prefer-offline`.\n\n`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.\n\n#### cert\n\n* Default: `null`\n* Type: String\n\nA client certificate to pass when accessing the registry.  Values should be in\nPEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with newlines replaced by the string \"\\n\". For example:\n\n```bash\ncert=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nIt is _not_ the path to a certificate file (and there is no \"certfile\" option).\n\n#### cidr\n\n* Default: `null`\n* Type: String, Array, null\n\nThis is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.\n\n#### color\n\n* Default: true\n* Type: Boolean or `\"always\"`\n\nIf false, never shows colors.  If `\"always\"` then always shows colors.\nIf true, then only prints color codes for tty file descriptors.\n\nThis option can also be changed using the environment: colors are\ndisabled when the environment variable `NO_COLOR` is set to any value.\n\n#### depth\n\n* Default: Infinity\n* Type: Number\n\nThe depth to go when recursing directories for `npm ls`,\n`npm cache ls`, and `npm outdated`.\n\nFor `npm outdated`, a setting of `Infinity` will be treated as `0`\nsince that gives more useful information.  To show the outdated status\nof all packages and dependents, use a large integer value,\ne.g., `npm outdated --depth 9999`\n\n#### description\n\n* Default: true\n* Type: Boolean\n\nShow the description in `npm search`\n\n#### dev\n\n* Default: false\n* Type: Boolean\n\nInstall `dev-dependencies` along with packages.\n\n#### dry-run\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done.  This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`.  This is NOT currently honored by some network related\ncommands, eg `dist-tags`, `owner`, etc.\n\n#### editor\n\n* Default: `EDITOR` environment variable if set, or `\"vi\"` on Posix,\n  or `\"notepad\"` on Windows.\n* Type: path\n\nThe command to run for `npm edit` or `npm config edit`.\n\n#### engine-strict\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then npm will stubbornly refuse to install (or even\nconsider installing) any package that claims to not be compatible with\nthe current Node.js version.\n\n#### force\n\n* Default: false\n* Type: Boolean\n\nMakes various commands more forceful.\n\n* lifecycle script failure does not block progress.\n* publishing clobbers previously published versions.\n* skips cache when requesting from the registry.\n* prevents checks against clobbering non-npm files.\n\n#### format-package-lock\n\n* Default: true\n* Type: Boolean\n\nFormat `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.\n\n#### fetch-retries\n\n* Default: 2\n* Type: Number\n\nThe \"retries\" config for the `retry` module to use when fetching\npackages from the registry.\n\n#### fetch-retry-factor\n\n* Default: 10\n* Type: Number\n\nThe \"factor\" config for the `retry` module to use when fetching\npackages.\n\n#### fetch-retry-mintimeout\n\n* Default: 10000 (10 seconds)\n* Type: Number\n\nThe \"minTimeout\" config for the `retry` module to use when fetching\npackages.\n\n#### fetch-retry-maxtimeout\n\n* Default: 60000 (1 minute)\n* Type: Number\n\nThe \"maxTimeout\" config for the `retry` module to use when fetching\npackages.\n\n#### fund\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding.\nSee [`npm fund`](/cli/v6/commands/npm-fund) for details.\n\n#### git\n\n* Default: `\"git\"`\n* Type: String\n\nThe command to use for git commands.  If git is installed on the\ncomputer, but is not in the `PATH`, then set this to the full path to\nthe git binary.\n\n#### git-tag-version\n\n* Default: `true`\n* Type: Boolean\n\nTag the commit when using the `npm version` command.\n\n#### commit-hooks\n\n* Default: `true`\n* Type: Boolean\n\nRun git commit hooks when using the `npm version` command.\n\n#### global\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the\n`prefix` folder instead of the current working directory.  See\n[folders](/cli/v6/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the\n  current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n#### globalconfig\n\n* Default: {prefix}/etc/npmrc\n* Type: path\n\nThe config file to read for global config options.\n\n#### global-style\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder.  Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders.  This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be\npreferred.\n\n#### group\n\n* Default: GID of the current process\n* Type: String or Number\n\nThe group to use when running package scripts in global mode as the root\nuser.\n\n#### heading\n\n* Default: `\"npm\"`\n* Type: String\n\nThe string that starts all the debugging log output.\n\n#### https-proxy\n\n* Default: null\n* Type: url\n\nA proxy to use for outgoing https requests. If the `HTTPS_PROXY` or\n`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,\nproxy settings will be honored by the underlying `request` library.\n\n#### if-present\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not exit with an error code when `run-script` is invoked for\na script that isn't defined in the `scripts` section of `package.json`. This\noption can be used when it's desirable to optionally run a script when it's\npresent and fail if the script fails. This is useful, for example, when running\nscripts that may only apply for some builds in an otherwise generic CI setup.\n\n#### ignore-prepublish\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not run `prepublish` scripts.\n\n#### ignore-scripts\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\n#### init-module\n\n* Default: ~/.npm-init.js\n* Type: path\n\nA module that will be loaded by the `npm init` command.  See the\ndocumentation for the\n[init-package-json](https://github.com/isaacs/init-package-json) module\nfor more information, or [npm init](/cli/v6/commands/npm-init).\n\n#### init-author-name\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's name.\n\n#### init-author-email\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's email.\n\n#### init-author-url\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's homepage.\n\n#### init-license\n\n* Default: \"ISC\"\n* Type: String\n\nThe value `npm init` should use by default for the package license.\n\n#### init-version\n\n* Default: \"1.0.0\"\n* Type: semver\n\nThe value that `npm init` should use by default for the package\nversion number, if not already set in package.json.\n\n#### json\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\nThis feature is currently experimental, and the output data structures for many\ncommands is either not implemented in JSON yet, or subject to change.  Only the\noutput from `npm ls --json` and `npm search --json` are currently valid.\n\n#### key\n\n* Default: `null`\n* Type: String\n\nA client key to pass when accessing the registry.  Values should be in PEM\nformat with newlines replaced by the string \"\\n\". For example:\n\n```json\nkey=\"-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----\"\n```\n\nIt is _not_ the path to a key file (and there is no \"keyfile\" option).\n\n#### legacy-bundling\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package.  This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n#### link\n\n* Default: false\n* Type: Boolean\n\nIf true, then local installs will link if there is a suitable globally\ninstalled package.\n\nNote that this means that local installs can cause things to be\ninstalled into the global space at the same time.  The link is only done\nif one of the two conditions are met:\n\n* The package is not already installed globally, or\n* the globally installed version is identical to the version that is\n  being installed locally.\n\n#### local-address\n\n* Default: undefined\n* Type: IP Address\n\nThe IP address of the local interface to use when making connections\nto the npm registry.  Must be IPv4 in versions of Node prior to 0.12.\n\n#### loglevel\n\n* Default: \"notice\"\n* Type: String\n* Values: \"silent\", \"error\", \"warn\", \"notice\", \"http\", \"timing\", \"info\",\n  \"verbose\", \"silly\"\n\nWhat level of logs to report.  On failure, *all* logs are written to\n`npm-debug.log` in the current working directory.\n\nAny logs of a higher level than the setting are shown. The default is \"notice\".\n\n#### logstream\n\n* Default: process.stderr\n* Type: Stream\n\nThis is the stream that is passed to the\n[npmlog](https://github.com/npm/npmlog) module at run time.\n\nIt cannot be set from the command line, but if you are using npm\nprogrammatically, you may wish to send logs to somewhere other than\nstderr.\n\nIf the `color` config is set to true, then this stream will receive\ncolored output if it is a TTY.\n\n#### logs-max\n\n* Default: 10\n* Type: Number\n\nThe maximum number of log files to store.\n\n#### long\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `npm ls` and `npm search`.\n\n#### maxsockets\n\n* Default: 50\n* Type: Number\n\nThe maximum number of connections to use per origin (protocol/host/port\ncombination). Passed to the `http` `Agent` used to make the request.\n\n#### message\n\n* Default: \"%s\"\n* Type: String\n\nCommit message which is used by `npm version` when creating version commit.\n\nAny \"%s\" in the message will be replaced with the version number.\n\n#### metrics-registry\n\n* Default: The value of  `registry` (which defaults to \"https://registry.npmjs.org/\")\n* Type: String\n\nThe registry you want to send cli metrics to if `send-metrics` is true.\n\n#### node-options\n\n* Default: null\n* Type: String\n\nOptions to pass through to Node.js via the `NODE_OPTIONS` environment\nvariable.  This does not impact how npm itself is executed but it does\nimpact how lifecycle scripts are called.\n\n#### node-version\n\n* Default: process.version\n* Type: semver or false\n\nThe node version to use when checking a package's `engines` map.\n\n#### noproxy\n\n* Default: null\n* Type: String or Array\n\nA comma-separated string or an array of domain extensions that a proxy should not be used for.\n\n#### offline\n\n* Default: false\n* Type: Boolean\n\nForce offline mode: no network requests will be done during install. To allow\nthe CLI to fill in missing cache data, see `--prefer-offline`.\n\n#### onload-script\n\n* Default: false\n* Type: path\n\nA node module to `require()` when npm loads.  Useful for programmatic\nusage.\n\n#### only\n\n* Default: null\n* Type: String\n\nWhen \"dev\" or \"development\" and running local `npm install` without any\narguments, only devDependencies (and their dependencies) are installed.\n\nWhen \"dev\" or \"development\" and running local `npm ls`, `npm outdated`, or\n`npm update`, is an alias for `--dev`.\n\nWhen \"prod\" or \"production\" and running local `npm install` without any\narguments, only non-devDependencies (and their dependencies) are\ninstalled.\n\nWhen \"prod\" or \"production\" and running local `npm ls`, `npm outdated`, or\n`npm update`, is an alias for `--production`.\n\n#### optional\n\n* Default: true\n* Type: Boolean\n\nAttempt to install packages in the `optionalDependencies` object.  Note\nthat if these packages fail to install, the overall installation\nprocess is not aborted.\n\n#### otp\n\n* Default: null\n* Type: Number\n\nThis is a one-time password from a two-factor authenticator.  It's needed\nwhen publishing or changing package permissions with `npm access`.\n\n#### package-lock\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled.  To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\nThis option is an alias for `--shrinkwrap`.\n\n#### package-lock-only\n\n* Default: false\n* Type: Boolean\n\nIf set to true, it will update only the `package-lock.json`,\ninstead of checking `node_modules` and downloading dependencies.\n\n#### parseable\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to\nstandard output. For `npm search`, this will be tab-separated table format.\n\n#### prefer-offline\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be bypassed, but missing data\nwill be requested from the server. To force full offline mode, use `--offline`.\n\nThis option is effectively equivalent to `--cache-min=9999999`.\n\n#### prefer-online\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be forced, making the CLI look\nfor updates immediately even for fresh package data.\n\n#### prefix\n\n* Default: see [folders](/cli/v6/configuring-npm/folders)\n* Type: path\n\nThe location to install global items.  If set on the command line, then\nit forces non-global commands to run in the specified folder.\n\n#### preid\n\n* Default: \"\"\n* Type: String\n\nThe \"prerelease identifier\" to use as a prefix for the \"prerelease\" part of a\nsemver. Like the `rc` in `1.2.0-rc.8`.\n\n#### production\n\n* Default: false\n* Type: Boolean\n\nSet to true to run in \"production\" mode.\n\n1. devDependencies are not installed at the topmost level when running\n   local `npm install` without any arguments.\n2. Set the NODE_ENV=\"production\" for lifecycle scripts.\n\n#### progress\n\n* Default: true, unless TRAVIS or CI env vars set.\n* Type: Boolean\n\nWhen set to `true`, npm will display a progress bar during time intensive\noperations, if `process.stderr` is a TTY.\n\nSet to `false` to suppress the progress bar.\n\n#### proxy\n\n* Default: null\n* Type: url\n\nA proxy to use for outgoing http requests. If the `HTTP_PROXY` or\n`http_proxy` environment variables are set, proxy settings will be\nhonored by the underlying `request` library.\n\n#### read-only\n\n* Default: false\n* Type: Boolean\n\nThis is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.\n\n#### rebuild-bundle\n\n* Default: true\n* Type: Boolean\n\nRebuild bundled dependencies after installation.\n\n#### registry\n\n* Default: https://registry.npmjs.org/\n* Type: url\n\nThe base URL of the npm package registry.\n\n#### rollback\n\n* Default: true\n* Type: Boolean\n\nRemove failed installs.\n\n#### save\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, it removes it from the `dependencies`\nobject.\n\nOnly works if there is already a package.json file present.\n\n#### save-bundle\n\n* Default: false\n* Type: Boolean\n\nIf a package would be saved at install time by the use of `--save`,\n`--save-dev`, or `--save-optional`, then also put it in the\n`bundleDependencies` list.\n\nWhen used with the `npm rm` command, it removes it from the\nbundledDependencies list.\n\n#### save-prod\n\n* Default: false\n* Type: Boolean\n\nMakes sure that a package will be saved into `dependencies` specifically. This\nis useful if a package already exists in `devDependencies` or\n`optionalDependencies`, but you want to move it to be a production dep. This is\nalso the default behavior if `--save` is true, and neither `--save-dev` or\n`--save-optional` are true.\n\n#### save-dev\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `devDependencies`.\n\nWhen used with the `npm rm` command, it removes it from the\n`devDependencies` object.\n\nOnly works if there is already a package.json file present.\n\n#### save-exact\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json using `--save`, `--save-dev` or\n`--save-optional` will be configured with an exact version rather than\nusing npm's default semver range operator.\n\n#### save-optional\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as\noptionalDependencies.\n\nWhen used with the `npm rm` command, it removes it from the\n`devDependencies` object.\n\nOnly works if there is already a package.json file present.\n\n#### save-prefix\n\n* Default: '^'\n* Type: String\n\nConfigure how versions of packages installed to a package.json file via\n`--save` or `--save-dev` get prefixed.\n\nFor example if a package has version `1.2.3`, by default its version is\nset to `^1.2.3` which allows minor upgrades for that package, but after\n`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows\npatch upgrades.\n\n#### scope\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry. Useful when logging\nin to a private registry for the first time:\n`npm login --scope=@organization --registry=registry.organization.com`, which\nwill cause `@organization` to be mapped to the registry for future installation\nof packages specified according to the pattern `@organization/package`.\n\n#### script-shell\n\n* Default: `null`\n* Type: path\n\nThe shell to use for scripts run with the `npm run` command.\n\n#### scripts-prepend-node-path\n\n* Default: \"warn-only\"\n* Type: Boolean, `\"auto\"` or `\"warn-only\"`\n\nIf set to `true`, add the directory in which the current `node` executable\nresides to the `PATH` environment variable when running scripts,\neven if that means that `npm` will invoke a different `node` executable than\nthe one which it is running.\n\nIf set to `false`, never modify `PATH` with that.\n\nIf set to `\"warn-only\"`, never modify `PATH` but print a warning if `npm` thinks\nthat you may want to run it with `true`, e.g. because the `node` executable\nin the `PATH` is not the one `npm` was invoked with.\n\nIf set to `auto`, only add that directory to the `PATH` environment variable\nif the `node` executable with which `npm` was invoked and the one that is found\nfirst on the `PATH` are different.\n\n#### searchexclude\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n#### searchopts\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n#### searchlimit\n\n* Default: 20\n* Type: Number\n\nNumber of items to limit search results to. Will not apply at all to legacy\nsearches.\n\n#### searchstaleness\n\n* Default: 900 (15 minutes)\n* Type: Number\n\nThe age of the cache, in seconds, before another registry request is made if\nusing legacy search endpoint.\n\n#### send-metrics\n\n* Default: false\n* Type: Boolean\n\nIf true, success/failure metrics will be reported to the registry stored in\n`metrics-registry`.  These requests contain the number of successful and\nfailing runs of the npm CLI and the time period overwhich those counts were\ngathered. No identifying information is included in these requests.\n\n#### shell\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd\" on\n  Windows\n* Type: path\n\nThe shell to run for the `npm explore` command.\n\n#### shrinkwrap\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `npm-shrinkwrap.json` files when installing. This\nwill also prevent _writing_ `npm-shrinkwrap.json` if `save` is true.\n\nThis option is an alias for `--package-lock`.\n\n#### sign-git-commit\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will commit the new package\nversion using `-S` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs\nfor this to work properly.\n\n#### sign-git-tag\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will tag the version\nusing `-s` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs\nfor this to work properly.\n\n#### sso-poll-frequency\n\n* Default: 500\n* Type: Number\n\nWhen used with SSO-enabled `auth-type`s, configures how regularly the registry\nshould be polled while the user is completing authentication.\n\n#### sso-type\n\n* Default: 'oauth'\n* Type: 'oauth', 'saml', or null\n\nIf `--auth-type=sso`, the type of SSO type to use.\n\n#### strict-ssl\n\n* Default: true\n* Type: Boolean\n\nWhether or not to do SSL key validation when making requests to the\nregistry via https.\n\nSee also the `ca` config.\n\n#### tag\n\n* Default: latest\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version, then\nit will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm\ntag` command, if no explicit tag is given.\n\n#### tag-version-prefix\n\n* Default: `\"v\"`\n* Type: String\n\nIf set, alters the prefix used when tagging a new version when performing a\nversion increment using  `npm-version`. To remove the prefix altogether, set it\nto the empty string: `\"\"`.\n\nBecause other tools may rely on the convention that npm version tags look like\n`v1.0.0`, _only use this property if it is absolutely necessary_. In\nparticular, use care when overriding this setting for public packages.\n\n#### timing\n\n* Default: `false`\n* Type: Boolean\n\nIf true, writes an `npm-debug` log to `_logs` and timing information to\n`_timing.json`, both in your cache.  `_timing.json` is a newline delimited\nlist of JSON objects.  You can quickly view it with this\n[json](https://www.npmjs.com/package/json) command line:\n`json -g < ~/.npm/_timing.json`.\n\n#### tmp\n\n* Default: TMPDIR environment variable, or \"/tmp\"\n* Type: path\n\nWhere to store temporary files and folders.  All temp files are deleted\non success, but left behind on failure for forensic purposes.\n\n#### unicode\n\n* Default: false on windows, true on mac/unix systems with a unicode locale\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output.  When\nfalse, it uses ascii characters to draw trees.\n\n#### unsafe-perm\n\n* Default: false if running as root, true otherwise\n* Type: Boolean\n\nSet to true to suppress the UID/GID switching when running package\nscripts.  If set explicitly to false, then installing as a non-root user\nwill fail.\n\n#### update-notifier\n\n* Default: true\n* Type: Boolean\n\nSet to false to suppress the update notification when using an older\nversion of npm than the latest.\n\n#### usage\n\n* Default: false\n* Type: Boolean\n\nSet to show short usage output (like the -H output)\ninstead of complete help when doing [`npm help`](/cli/v6/commands/npm-help).\n\n#### user\n\n* Default: \"nobody\"\n* Type: String or Number\n\nThe UID to set to when running package scripts as root.\n\n#### userconfig\n\n* Default: ~/.npmrc\n* Type: path\n\nThe location of user-level configuration settings.\n\n#### umask\n\n* Default: 022\n* Type: Octal numeric string in range 0000..0777 (0..511)\n\nThe \"umask\" value to use when setting the file creation mode on files\nand folders.\n\nFolders and executables are given a mode which is `0777` masked against\nthis value.  Other files are given a mode which is `0666` masked against\nthis value.  Thus, the defaults are `0755` and `0644` respectively.\n\n#### user-agent\n\n* Default: node/{process.version} {process.platform} {process.arch}\n* Type: String\n\nSets a User-Agent to the request header\n\n#### version\n\n* Default: false\n* Type: boolean\n\nIf true, output the npm version and exit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n#### versions\n\n* Default: false\n* Type: boolean\n\nIf true, output the npm version as well as node's `process.versions` map, and\nexit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n#### viewer\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: path\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n### See also\n\n* [npm config](/cli/v6/commands/npm-config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm folders](/cli/v6/configuring-npm/folders)\n* [npm](/cli/v6/commands/npm)\n"},{"id":"16fb165c-4f16-5bd4-a775-1883e045389c","frontmatter":{"title":"developers"},"rawBody":"---\ntitle: developers\nsection: 7\ndescription: Developer Guide\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/developers.md\n---\n\n### Description\n\nSo, you've decided to use npm to develop (and maybe publish/deploy)\nyour project.\n\nFantastic!\n\nThere are a few things that you need to do above the simple steps\nthat your users will do to install your program.\n\n### About These Documents\n\nThese are man pages.  If you install npm, you should be able to\nthen do `man npm-thing` to get the documentation on a particular\ntopic, or `npm help thing` to see the same information.\n\n### What is a package\n\nA package is:\n\n* a) a folder containing a program described by a package.json file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry with (c)\n* e) a `<name>@<tag>` that points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `git` url that, when cloned, results in (a).\n\nEven if you never publish your package, you can still get a lot of\nbenefits of using npm if you just want to write a node program (a), and\nperhaps if you also want to be able to easily install it elsewhere\nafter packing it up into a tarball (b).\n\nGit urls can be of the form:\n\n```bash\ngit://github.com/user/project.git#commit-ish\ngit+ssh://user@hostname:project.git#commit-ish\ngit+http://user@hostname/project/blah.git#commit-ish\ngit+https://user@hostname/project/blah.git#commit-ish\n```\n\nThe `commit-ish` can be any tag, sha, or branch which can be supplied as\nan argument to `git checkout`.  The default is `master`.\n\n### The package.json File\n\nYou need to have a `package.json` file in the root of your project to do\nmuch of anything with npm.  That is basically the whole interface.\n\nSee [`package.json`](/cli/v6/configuring-npm/package-json) for details about what goes in that file.  At the very\nleast, you need:\n\n* name:\n  This should be a string that identifies your project.  Please do not\n  use the name to specify that it runs on node, or is in JavaScript.\n  You can use the \"engines\" field to explicitly state the versions of\n  node (or whatever else) that your program requires, and it's pretty\n  well assumed that it's JavaScript.\n\n  It does not necessarily need to match your github repository name.\n\n  So, `node-foo` and `bar-js` are bad names.  `foo` or `bar` are better.\n\n* version:\n  A semver-compatible version.\n\n* engines:\n  Specify the versions of node (or whatever else) that your program\n  runs on.  The node API changes a lot, and there may be bugs or new\n  functionality that you depend on.  Be explicit.\n\n* author:\n  Take some credit.\n\n* scripts:\n  If you have a special compilation or installation script, then you\n  should put it in the `scripts` object.  You should definitely have at\n  least a basic smoke-test command as the \"scripts.test\" field.\n  See [scripts](/cli/v6/using-npm/scripts).\n\n* main:\n  If you have a single module that serves as the entry point to your\n  program (like what the \"foo\" package gives you at require(\"foo\")),\n  then you need to specify that in the \"main\" field.\n\n* directories:\n  This is an object mapping names to folders.  The best ones to include are\n  \"lib\" and \"doc\", but if you use \"man\" to specify a folder full of man pages,\n  they'll get installed just like these ones.\n\nYou can use `npm init` in the root of your package in order to get you\nstarted with a pretty basic package.json file.  See [`npm init`](/cli/v6/commands/npm-init) for\nmore info.\n\n### Keeping files *out* of your package\n\nUse a `.npmignore` file to keep stuff out of your package.  If there's\nno `.npmignore` file, but there *is* a `.gitignore` file, then npm will\nignore the stuff matched by the `.gitignore` file.  If you *want* to\ninclude something that is excluded by your `.gitignore` file, you can\ncreate an empty `.npmignore` file to override it. Like `git`, `npm` looks\nfor `.npmignore` and `.gitignore` files in all subdirectories of your\npackage, not only the root directory.\n\n`.npmignore` files follow the [same pattern rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files)\nas `.gitignore` files:\n\n* Blank lines or lines starting with `#` are ignored.\n* Standard glob patterns work.\n* You can end patterns with a forward slash `/` to specify a directory.\n* You can negate a pattern by starting it with an exclamation point `!`.\n\nBy default, the following paths and files are ignored, so there's no\nneed to add them to `.npmignore` explicitly:\n\n* `.*.swp`\n* `._*`\n* `.DS_Store`\n* `.git`\n* `.hg`\n* `.npmrc`\n* `.lock-wscript`\n* `.svn`\n* `.wafpickle-*`\n* `config.gypi`\n* `CVS`\n* `npm-debug.log`\n\nAdditionally, everything in `node_modules` is ignored, except for\nbundled dependencies. npm automatically handles this for you, so don't\nbother adding `node_modules` to `.npmignore`.\n\nThe following paths and files are never ignored, so adding them to\n`.npmignore` is pointless:\n\n* `package.json`\n* `README` (and its variants)\n* `CHANGELOG` (and its variants)\n* `LICENSE` / `LICENCE`\n\nIf, given the structure of your project, you find `.npmignore` to be a\nmaintenance headache, you might instead try populating the `files`\nproperty of `package.json`, which is an array of file or directory names\nthat should be included in your package. Sometimes a whitelist is easier\nto manage than a blacklist.\n\n#### Testing whether your `.npmignore` or `files` config works\n\nIf you want to double check that your package will include only the files\nyou intend it to when published, you can run the `npm pack` command locally\nwhich will generate a tarball in the working directory, the same way it\ndoes for publishing.\n\n### Link Packages\n\n`npm link` is designed to install a development package and see the\nchanges in real time without having to keep re-installing it.  (You do\nneed to either re-link or `npm rebuild -g` to update compiled packages,\nof course.)\n\nMore info at [`npm link`](/cli/v6/commands/npm-link).\n\n### Before Publishing: Make Sure Your Package Installs and Works\n\n**This is important.**\n\nIf you can not install it locally, you'll have\nproblems trying to publish it.  Or, worse yet, you'll be able to\npublish it, but you'll be publishing a broken or pointless package.\nSo don't do that.\n\nIn the root of your package, do this:\n\n```bash\nnpm install . -g\n```\n\nThat'll show you that it's working.  If you'd rather just create a symlink\npackage that points to your working directory, then do this:\n\n```bash\nnpm link\n```\n\nUse `npm ls -g` to see if it's there.\n\nTo test a local install, go into some other folder, and then do:\n\n```bash\ncd ../some-other-folder\nnpm install ../my-package\n```\n\nto install it locally into the node_modules folder in that other place.\n\nThen go into the node-repl, and try using require(\"my-thing\") to\nbring in your module's main module.\n\n### Create a User Account\n\nCreate a user with the adduser command.  It works like this:\n\n```bash\nnpm adduser\n```\n\nand then follow the prompts.\n\nThis is documented better in [npm adduser](/cli/v6/commands/npm-adduser).\n\n### Publish your package\n\nThis part's easy.  In the root of your folder, do this:\n\n```bash\nnpm publish\n```\n\nYou can give publish a url to a tarball, or a filename of a tarball,\nor a path to a folder.\n\nNote that pretty much **everything in that folder will be exposed**\nby default.  So, if you have secret stuff in there, use a\n`.npmignore` file to list out the globs to ignore, or publish\nfrom a fresh checkout.\n\n### Brag about it\n\nSend emails, write blogs, blab in IRC.\n\nTell the world how easy it is to install your program!\n\n### See also\n\n* [npm](/cli/v6/commands/npm)\n* [npm init](/cli/v6/commands/npm-init)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm scripts](/cli/v6/using-npm/scripts)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm adduser](/cli/v6/commands/npm-adduser)\n* [npm registry](/cli/v6/using-npm/registry)\n"},{"id":"85305637-95c5-5056-9737-0fe8421cb564","frontmatter":{"title":"Using npm"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/nav.yml\ntitle: Using npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"5a5e55a6-af1b-51d5-bd52-89f1fe3f0181","frontmatter":{"title":"orgs"},"rawBody":"---\ntitle: orgs\nsection: 7\ndescription: Working with Teams & Orgs\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/orgs.md\n---\n\n### Description\n\nThere are three levels of org users:\n\n1. Super admin, controls billing & adding people to the org.\n2. Team admin, manages team membership & package access.\n3. Developer, works on packages they are given access to.  \n\nThe super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to.\n\nThe team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.\n\nThe developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.\n\nThere are two main commands:\n\n1. `npm team` see [npm team](/cli/v6/commands/npm-team) for more details\n2. `npm access` see [npm access](/cli/v6/commands/npm-access) for more details\n\n### Team Admins create teams\n\n* Check who you’ve added to your org:\n\n```bash\nnpm team ls <org>:developers\n```\n\n* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command.\n\n* Create a new team:\n\n```bash\nnpm team create <org:team>\n```\n\n* Add members to that team:\n\n```bash\nnpm team add <org:team> <user>\n```\n\n### Publish a package and adjust package access\n\n* In package directory, run\n\n```bash\nnpm init --scope=<org>\n```\nto scope it for your org & publish as usual\n\n* Grant access:  \n\n```bash\nnpm access grant <read-only|read-write> <org:team> [<package>]\n```\n\n* Revoke access:\n\n```bash\nnpm access revoke <org:team> [<package>]\n```\n\n### Monitor your package access\n\n* See what org packages a team member can access:\n\n```bash\nnpm access ls-packages <org> <user>\n```\n\n* See packages available to a specific team:\n\n```bash\nnpm access ls-packages <org:team>\n```\n\n* Check which teams are collaborating on a package:\n\n```bash\nnpm access ls-collaborators <pkg>\n```\n\n### See also\n\n* [npm team](/cli/v6/commands/npm-team)\n* [npm access](/cli/v6/commands/npm-access)\n* [npm scope](/cli/v6/using-npm/scope)\n"},{"id":"460bacc9-db51-579e-9c7e-878cb76764b1","frontmatter":{"title":"registry"},"rawBody":"---\ntitle: registry\nsection: 7\ndescription: The JavaScript Package Registry\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/registry.md\n---\n\n### Description\n\nTo resolve packages by name and version, npm talks to a registry website\nthat implements the CommonJS Package Registry specification for reading\npackage info.\n\nnpm is configured to use npm, Inc.'s public registry at\n<https://registry.npmjs.org> by default. Use of the npm public registry is\nsubject to terms of use available at <https://www.npmjs.com/policies/terms>.\n\nYou can configure npm to use any compatible registry you like, and even run\nyour own registry. Use of someone else's registry may be governed by their\nterms of use.\n\nnpm's package registry implementation supports several\nwrite APIs as well, to allow for publishing packages and managing user\naccount information.\n\nThe npm public registry is powered by a CouchDB database,\nof which there is a public mirror at\n<https://skimdb.npmjs.com/registry>.  The code for the couchapp is\navailable at <https://github.com/npm/npm-registry-couchapp>.\n\nThe registry URL used is determined by the scope of the package (see\n[`scope`](/cli/v6/using-npm/scope). If no scope is specified, the default registry is used, which is\nsupplied by the `registry` config parameter.  See [`npm config`](/cli/v6/commands/npm-config),\n[`npmrc`](/cli/v6/configuring-npm/npmrc), and [`config`](/cli/v6/using-npm/config) for more on managing npm's configuration.\n\n### Does npm send any information about me back to the registry?\n\nYes.\n\nWhen making requests of the registry npm adds two headers with information\nabout your environment:\n\n* `Npm-Scope` – If your project is scoped, this header will contain its\n  scope. In the future npm hopes to build registry features that use this\n  information to allow you to customize your experience for your\n  organization.\n* `Npm-In-CI` – Set to \"true\" if npm believes this install is running in a\n  continuous integration environment, \"false\" otherwise. This is detected by\n  looking for the following environment variables: `CI`, `TDDIUM`,\n  `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find\n  the [original PR](https://github.com/npm/npm-registry-client/pull/129)\n  interesting.\n  This is used to gather better metrics on how npm is used by humans, versus\n  build farms.\n\nThe npm registry does not try to correlate the information in these headers\nwith any authenticated accounts that may be used in the same requests.\n\n### Can I run my own private registry?\n\nYes!\n\nThe easiest way is to replicate the couch database, and use the same (or\nsimilar) design doc to implement the APIs.\n\nIf you set up continuous replication from the official CouchDB, and then\nset your internal CouchDB as the registry config, then you'll be able\nto read any published packages, in addition to your private ones, and by\ndefault will only publish internally. \n\nIf you then want to publish a package for the whole world to see, you can\nsimply override the `--registry` option for that `publish` command.\n\n### I don't want my package published in the official registry. It's private.\n\nSet `\"private\": true` in your package.json to prevent it from being\npublished at all, or\n`\"publishConfig\":{\"registry\":\"http://my-internal-registry.local\"}`\nto force it to be published only to your internal registry.\n\nSee [`package.json`](/cli/v6/configuring-npm/package-json) for more info on what goes in the package.json file.\n\n### Will you replicate from my registry into the public one?\n\nNo.  If you want things to be public, then publish them into the public\nregistry using npm.  What little security there is would be for nought\notherwise.\n\n### Do I have to use couchdb to build a registry that npm can talk to?\n\nNo, but it's way easier.  Basically, yes, you do, or you have to\neffectively implement the entire CouchDB API anyway.\n\n### Is there a website or something to see package docs and such?\n\nYes, head over to <https://www.npmjs.com/>\n\n### See also\n\n* [npm config](/cli/v6/commands/npm-config)\n* [config](/cli/v6/using-npm/config)\n* [npmrc](/cli/v6/configuring-npm/npmrc)\n* [npm developers](/cli/v6/using-npm/developers)\n"},{"id":"5b0cb7b5-9273-5a83-9253-6caedb7e5827","frontmatter":{"title":"removal"},"rawBody":"---\ntitle: removal\nsection: 7\ndescription: Cleaning the Slate\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/removal.md\n---\n\n### Synopsis\n\nSo sad to see you go.\n\n```bash\nsudo npm uninstall npm -g\n```\n\nOr, if that fails, get the npm source code, and do:\n\n```bash\nsudo make uninstall\n```\n\n### More Severe Uninstalling\n\nUsually, the above instructions are sufficient.  That will remove\nnpm, but leave behind anything you've installed.\n\nIf that doesn't work, or if you require more drastic measures,\ncontinue reading.\n\nNote that this is only necessary for globally-installed packages.  Local\ninstalls are completely contained within a project's `node_modules`\nfolder.  Delete that folder, and everything is gone less a package's\ninstall script is particularly ill-behaved).\n\nThis assumes that you installed node and npm in the default place.  If\nyou configured node with a different `--prefix`, or installed npm with a\ndifferent prefix setting, then adjust the paths accordingly, replacing\n`/usr/local` with your install prefix.\n\nTo remove everything npm-related manually:\n\n```bash\nrm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*\n```\n\nIf you installed things *with* npm, then your best bet is to uninstall\nthem with npm first, and then install them again once you have a\nproper install.  This can help find any symlinks that are lying\naround:\n\n```bash\nls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm\n```\n\nPrior to version 0.3, npm used shim files for executables and node\nmodules.  To track those down, you can do the following:\n\n```bash\nfind /usr/local/{lib/node,bin} -exec grep -l npm \\{\\} \\; ;\n```\n\n(This is also in the README file.)\n\n### See also\n\n* [npm uninstall](/cli/v6/commands/npm-uninstall)\n* [npm prune](/cli/v6/commands/npm-prune)\n"},{"id":"24f378eb-e5b7-5cd7-8466-270b73332a88","frontmatter":{"title":"scope"},"rawBody":"---\ntitle: scope\nsection: 7\ndescription: Scoped packages\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/scope.md\n---\n\n### Description\n\nAll npm packages have a name. Some package names also have a scope. A scope\nfollows the usual rules for package names (URL-safe characters, no leading dots\nor underscores). When used in package names, scopes are preceded by an `@` symbol\nand followed by a slash, e.g.\n\n```bash\n@somescope/somepackagename\n```\n\nScopes are a way of grouping related packages together, and also affect a few\nthings about the way npm treats the package.\n\nEach npm user/organization has their own scope, and only you can add packages\nin your scope. This means you don't have to worry about someone taking your\npackage name ahead of you. Thus it is also a good way to signal official packages\nfor organizations.\n\nScoped packages can be published and installed as of `npm@2` and are supported\nby the primary npm registry. Unscoped packages can depend on scoped packages and\nvice versa. The npm client is backwards-compatible with unscoped registries,\nso it can be used to work with scoped and unscoped registries at the same time.\n\n### Installing scoped packages\n\nScoped packages are installed to a sub-folder of the regular installation\nfolder, e.g. if your other packages are installed in `node_modules/packagename`,\nscoped modules will be installed in `node_modules/@myorg/packagename`. The scope\nfolder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can\ncontain any number of scoped packages.\n\nA scoped package is installed by referencing it by name, preceded by an\n`@` symbol, in `npm install`:\n\n```bash\nnpm install @myorg/mypackage\n```\n\nOr in `package.json`:\n\n```json\n\"dependencies\": {\n  \"@myorg/mypackage\": \"^1.3.0\"\n}\n```\n\nNote that if the `@` symbol is omitted, in either case, npm will instead attempt to\ninstall from GitHub; see [`npm install`](/cli/v6/commands/npm-install).\n\n### Requiring scoped packages\n\nBecause scoped packages are installed into a scope folder, you have to\ninclude the name of the scope when requiring them in your code, e.g.\n\n```javascript\nrequire('@myorg/mypackage')\n```\n\nThere is nothing special about the way Node treats scope folders. This\nsimply requires the `mypackage` module in the folder named `@myorg`.\n\n### Publishing scoped packages\n\nScoped packages can be published from the CLI as of `npm@2` and can be\npublished to any registry that supports them, including the primary npm\nregistry.\n\n(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry\n**does** support scoped packages.)\n\nIf you wish, you may associate a scope with a registry; see below.\n\n#### Publishing public scoped packages to the primary npm registry\n\nTo publish a public scoped package, you must specify `--access public` with\nthe initial publication. This will publish the package and set access\nto `public` as if you had run `npm access public` after publishing.\n\n#### Publishing private scoped packages to the npm registry\n\nTo publish a private scoped package to the npm registry, you must have\nan [npm Private Modules](https://docs.npmjs.com/private-modules/intro)\naccount.\n\nYou can then publish the module with `npm publish` or `npm publish\n--access restricted`, and it will be present in the npm registry, with\nrestricted access. You can then change the access permissions, if\ndesired, with `npm access` or on the npmjs.com website.\n\n### Associating a scope with a registry\n\nScopes can be associated with a separate registry. This allows you to\nseamlessly use a mix of packages from the primary npm registry and one or more\nprivate registries, such as GitHub Packages or the open source Verdaccio\nproject.\n\nYou can associate a scope with a registry at login, e.g.\n\n```bash\nnpm login --registry=http://reg.example.com --scope=@myco\n```\n\nScopes have a many-to-one relationship with registries: one registry can\nhost multiple scopes, but a scope only ever points to one registry.\n\nYou can also associate a scope with a registry using `npm config`:\n\n```bash\nnpm config set @myco:registry http://reg.example.com\n```\n\nOnce a scope is associated with a registry, any `npm install` for a package\nwith that scope will request packages from that registry instead. Any\n`npm publish` for a package name that contains the scope will be published to\nthat registry instead.\n\n### See also\n\n* [npm install](/cli/v6/commands/npm-install)\n* [npm publish](/cli/v6/commands/npm-publish)\n* [npm access](/cli/v6/commands/npm-access)\n* [npm registry](/cli/v6/using-npm/registry)\n"},{"id":"670b3c4b-f44f-5740-a765-2174f54f48d8","frontmatter":{"title":"scripts"},"rawBody":"---\ntitle: scripts\nsection: 7\ndescription: How npm handles the \"scripts\" field\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/scripts.md\n---\n\n### Description\n\nThe `\"scripts\"` property of of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running `npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore <pkg> -- npm run <stage>`.\n\n### Pre & Post Scripts\n\nTo create \"pre\" or \"post\" scripts for any scripts defined in the `\"scripts\"` section of the `package.json`, simply create another script *with a matching name* and add \"pre\" or \"post\" to the beginning of them.\n\n```json\n{\n  \"scripts\": {\n    \"precompress\": \"{{ executes BEFORE the `compress` script }}\",\n    \"compress\": \"{{ run command to compress files }}\",\n    \"postcompress\": \"{{ executes AFTER `compress` script }}\"\n  }\n}\n```\n\n### Life Cycle Scripts\n\nThere are some special life cycle scripts that happen only in certain situations. These scripts happen in addtion to the \"pre\" and \"post\" script.\n* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`\n\n**prepare** (since `npm@4.0.0`)\n* Runs BEFORE the package is packed\n* Runs BEFORE the package is published\n* Runs on local `npm install` without any arguments\n* Run AFTER `prepublish`, but BEFORE `prepublishOnly`\n* NOTE: If a package being installed through git contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and the prepare script will be run, before the package is packaged and installed.\n\n**prepublish** (DEPRECATED)\n* Same as `prepare`\n\n**prepublishOnly**\n* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.\n\n**prepack**\n* Runs BEFORE a tarball is packed (on \"`npm pack`\", \"`npm publish`\", and when installing a git dependencies).\n* NOTE: \"`npm run pack`\" is NOT the same as \"`npm pack`\". \"`npm run pack`\" is an arbitrary user defined script name, where as, \"`npm pack`\" is a CLI defined command.\n\n**postpack**\n* Runs AFTER the tarball has been generated and moved to its final destination.\n\n#### Prepare and Prepublish\n\n**Deprecation Note: prepublish**\n\nSince `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below).  It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074).  As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape).\n\nSee <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further reading, for this change.\n\n**Use Cases**\n\nIf you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as:\n\n* Compiling CoffeeScript source code into JavaScript.\n* Creating minified versions of JavaScript source code.\n* Fetching remote resources that your package will use.\n\nThe advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:\n\n* You can depend on `coffee-script` as a `devDependency`, and thus\n  your users don't need to have it installed.\n* You don't need to include minifiers in your package, reducing\n  the size for your users.\n* You don't need to rely on your users having `curl` or `wget` or\n  other system tools on the target machines.\n\n### Life Cycle Operation Order\n\n#### [`npm publish`](/cli/v6/commands/npm-publish)\n\n* `prepublishOnly`\n* `prepare`\n* `prepublish`\n* `publish`\n* `postpublish`\n\n#### [`npm pack`](/cli/v6/commands/npm-pack)\n\n* `prepack`\n* `postpack`\n\n#### [`npm install`](/cli/v6/commands/npm-install)\n\n* `preinstall`\n* `install`\n* `postinstall`\n\nAlso triggers\n\n* `prepublish` (when on local)\n* `prepare` (when on local)\n\n#### [`npm start`](/cli/v6/commands/npm-start)\n\n`npm run start` has an `npm start` shorthand.\n\n* `prestart`\n* `start`\n* `poststart`\n\n### Default Values\nnpm will default some script values based on package contents.\n\n* `\"start\": \"node server.js\"`:\n\n  If there is a `server.js` file in the root of your package, then npm\n  will default the `start` command to `node server.js`.\n\n* `\"install\": \"node-gyp rebuild\"`:\n\n  If there is a `binding.gyp` file in the root of your package and you\n  haven't defined your own `install` or `preinstall` scripts, npm will\n  default the `install` command to compile using node-gyp.\n\n### User\n\nIf npm was invoked with root privileges, then it will change the uid\nto the user account or uid specified by the `user` config, which\ndefaults to `nobody`.  Set the `unsafe-perm` flag to run scripts with\nroot privileges.\n\n### Environment\n\nPackage scripts run in an environment where many pieces of information\nare made available regarding the setup of npm and the current state of\nthe process.\n\n\n#### path\n\nIf you depend on modules that define executable scripts, like test\nsuites, then those executables will be added to the `PATH` for\nexecuting the scripts.  So, if your package.json has this:\n\n```json\n{ \n  \"name\" : \"foo\", \n  \"dependencies\" : { \n    \"bar\" : \"0.1.x\" \n  }, \n  \"scripts\": { \n    \"start\" : \"bar ./test\" \n  } \n}\n```\n\nthen you could run `npm start` to execute the `bar` script, which is\nexported into the `node_modules/.bin` directory on `npm install`.\n\n#### package.json vars\n\nThe package.json fields are tacked onto the `npm_package_` prefix. So,\nfor instance, if you had `{\"name\":\"foo\", \"version\":\"1.2.5\"}` in your\npackage.json file, then your package scripts would have the\n`npm_package_name` environment variable set to \"foo\", and the\n`npm_package_version` set to \"1.2.5\".  You can access these variables \nin your code with `process.env.npm_package_name` and \n`process.env.npm_package_version`, and so on for other fields.\n\n#### configuration\n\nConfiguration parameters are put in the environment with the\n`npm_config_` prefix. For instance, you can view the effective `root`\nconfig by checking the `npm_config_root` environment variable.\n\n#### Special: package.json \"config\" object\n\nThe package.json \"config\" keys are overwritten in the environment if\nthere is a config param of `<name>[@<version>]:<key>`.  For example,\nif the package.json has this:\n\n```json\n{ \n  \"name\" : \"foo\", \n  \"config\" : { \n    \"port\" : \"8080\" \n  }, \n  \"scripts\" : { \n    \"start\" : \"node server.js\" \n  } \n}\n```\n\nand the server.js is this:\n\n```javascript\nhttp.createServer(...).listen(process.env.npm_package_config_port)\n```\n\nthen the user could change the behavior by doing:\n\n```bash\n  npm config set foo:port 80\n  ```\n\n#### current lifecycle event\n\nLastly, the `npm_lifecycle_event` environment variable is set to\nwhichever stage of the cycle is being executed. So, you could have a\nsingle script used for different parts of the process which switches\nbased on what's currently happening.\n\nObjects are flattened following this format, so if you had\n`{\"scripts\":{\"install\":\"foo.js\"}}` in your package.json, then you'd\nsee this in the script:\n\n```bash\nprocess.env.npm_package_scripts_install === \"foo.js\"\n```\n\n### Examples\n\nFor example, if your package.json contains this:\n\n```json\n{ \n  \"scripts\" : { \n    \"install\" : \"scripts/install.js\", \n    \"postinstall\" : \"scripts/install.js\", \n    \"uninstall\" : \"scripts/uninstall.js\"\n  }\n}\n```\n\nthen `scripts/install.js` will be called for the install\nand post-install stages of the lifecycle, and `scripts/uninstall.js`\nwill be called when the package is uninstalled.  Since\n`scripts/install.js` is running for two different phases, it would\nbe wise in this case to look at the `npm_lifecycle_event` environment\nvariable.\n\nIf you want to run a make command, you can do so.  This works just\nfine:\n\n```json\n{ \n  \"scripts\" : { \n    \"preinstall\" : \"./configure\", \n    \"install\" : \"make && make install\", \n    \"test\" : \"make test\"\n  }\n}\n```\n\n### Exiting\n\nScripts are run by passing the line as a script argument to `sh`.\n\nIf the script exits with a code other than 0, then this will abort the\nprocess.\n\nNote that these script files don't have to be nodejs or even\njavascript programs. They just have to be some kind of executable\nfile.\n\n### Hook Scripts\n\nIf you want to run a specific script at a specific lifecycle event for\nALL packages, then you can use a hook script.\n\nPlace an executable file at `node_modules/.hooks/{eventname}`, and\nit'll get run for all packages when they are going through that point\nin the package lifecycle for any packages installed in that root.\n\nHook scripts are run exactly the same way as package.json scripts.\nThat is, they are in a separate child process, with the env described\nabove.\n\n### Best Practices\n\n* Don't exit with a non-zero error code unless you *really* mean it.\n  Except for uninstall scripts, this will cause the npm action to\n  fail, and potentially be rolled back.  If the failure is minor or\n  only will prevent some optional features, then it's better to just\n  print a warning and exit successfully.\n* Try not to use scripts to do what npm can do for you.  Read through\n  [`package.json`](/cli/v6/configuring-npm/package-json) to see all the things that you can specify and enable\n  by simply describing your package appropriately.  In general, this\n  will lead to a more robust and consistent state.\n* Inspect the env to determine where to put things.  For instance, if\n  the `npm_config_binroot` environment variable is set to `/home/user/bin`, then\n  don't try to install executables into `/usr/local/bin`.  The user\n  probably set it up that way for a reason.\n* Don't prefix your script commands with \"sudo\".  If root permissions\n  are required for some reason, then it'll fail with that error, and\n  the user will sudo the npm command in question.\n* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`\n  for anything else. You should almost never have to explicitly set a\n  preinstall or install script. If you are doing this, please consider if\n  there is another option. The only valid use of `install` or `preinstall`\n  scripts is for compilation which must be done on the target architecture.\n\n### See Also\n\n* [npm run-script](/cli/v6/commands/npm-run-script)\n* [package.json](/cli/v6/configuring-npm/package-json)\n* [npm developers](/cli/v6/using-npm/developers)\n* [npm install](/cli/v6/commands/npm-install)\n"},{"id":"accf5699-ba99-5edf-854a-9c3278cc9060","frontmatter":{"title":"semver"},"rawBody":"---\ntitle: semver\nsection: 7\ndescription: The semantic versioner for npm\ngithub_repo: npm/cli\ngithub_branch: v6\ngithub_path: docs/content/using-npm/semver.md\n---\n\n## Install\n\n```bash\nnpm install --save semver\n````\n\n## Usage\n\nAs a node module:\n\n```js\nconst semver = require('semver')\n\nsemver.valid('1.2.3') // '1.2.3'\nsemver.valid('a.b.c') // null\nsemver.clean('  =v1.2.3   ') // '1.2.3'\nsemver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\nsemver.gt('1.2.3', '9.8.7') // false\nsemver.lt('1.2.3', '9.8.7') // true\nsemver.minVersion('>=1.0.0') // '1.0.0'\nsemver.valid(semver.coerce('v2')) // '2.0.0'\nsemver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'\n```\n\nAs a command-line utility:\n\n```\n$ semver -h\n\nA JavaScript implementation of the https://semver.org/ specification\nCopyright Isaac Z. Schlueter\n\nUsage: semver [options] <version> [<version> [...]]\nPrints valid versions sorted by SemVer precedence\n\nOptions:\n-r --range <range>\n        Print versions that match the specified range.\n\n-i --increment [<level>]\n        Increment a version by the specified level.  Level can\n        be one of: major, minor, patch, premajor, preminor,\n        prepatch, or prerelease.  Default level is 'patch'.\n        Only one version may be specified.\n\n--preid <identifier>\n        Identifier to be used to prefix premajor, preminor,\n        prepatch or prerelease version increments.\n\n-l --loose\n        Interpret versions and ranges loosely\n\n-p --include-prerelease\n        Always include prerelease versions in range matching\n\n-c --coerce\n        Coerce a string into SemVer if possible\n        (does not imply --loose)\n\nProgram exits successfully if any valid version satisfies\nall supplied ranges, and prints all satisfying versions.\n\nIf no satisfying versions are found, then exits failure.\n\nVersions are printed in ascending order, so supplying\nmultiple versions to the utility will just sort them.\n```\n\n## Versions\n\nA \"version\" is described by the `v2.0.0` specification found at\n<https://semver.org/>.\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Ranges\n\nA `version range` is a set of `comparators` which specify versions\nthat satisfy the range.\n\nA `comparator` is composed of an `operator` and a `version`.  The set\nof primitive `operators` is:\n\n* `<` Less than\n* `<=` Less than or equal to\n* `>` Greater than\n* `>=` Greater than or equal to\n* `=` Equal.  If no operator is specified, then equality is assumed,\n  so this operator is optional, but MAY be included.\n\nFor example, the comparator `>=1.2.7` would match the versions\n`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`\nor `1.1.0`.\n\nComparators can be joined by whitespace to form a `comparator set`,\nwhich is satisfied by the **intersection** of all of the comparators\nit includes.\n\nA range is composed of one or more comparator sets, joined by `||`.  A\nversion matches a range if and only if every comparator in at least\none of the `||`-separated comparator sets is satisfied by the version.\n\nFor example, the range `>=1.2.7 <1.3.0` would match the versions\n`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,\nor `1.1.0`.\n\nThe range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,\n`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.\n\n### Prerelease Tags\n\nIf a version has a prerelease tag (for example, `1.2.3-alpha.3`) then\nit will only be allowed to satisfy comparator sets if at least one\ncomparator with the same `[major, minor, patch]` tuple also has a\nprerelease tag.\n\nFor example, the range `>1.2.3-alpha.3` would be allowed to match the\nversion `1.2.3-alpha.7`, but it would *not* be satisfied by\n`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically \"greater\nthan\" `1.2.3-alpha.3` according to the SemVer sort rules.  The version\nrange only accepts prerelease tags on the `1.2.3` version.  The\nversion `3.4.5` *would* satisfy the range, because it does not have a\nprerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.\n\nThe purpose for this behavior is twofold.  First, prerelease versions\nfrequently are updated very quickly, and contain many breaking changes\nthat are (by the author's design) not yet fit for public consumption.\nTherefore, by default, they are excluded from range matching\nsemantics.\n\nSecond, a user who has opted into using a prerelease version has\nclearly indicated the intent to use *that specific* set of\nalpha/beta/rc versions.  By including a prerelease tag in the range,\nthe user is indicating that they are aware of the risk.  However, it\nis still not appropriate to assume that they have opted into taking a\nsimilar risk on the *next* set of prerelease versions.\n\nNote that this behavior can be suppressed (treating all prerelease\nversions as if they were normal versions, for the purpose of range\nmatching) by setting the `includePrerelease` flag on the options\nobject to any\n[functions](https://github.com/npm/node-semver#functions) that do\nrange matching.\n\n#### Prerelease Identifiers\n\nThe method `.inc` takes an additional `identifier` string argument that\nwill append the value of the string as a prerelease identifier:\n\n```javascript\nsemver.inc('1.2.3', 'prerelease', 'beta')\n// '1.2.4-beta.0'\n```\n\ncommand-line example:\n\n```bash\n$ semver 1.2.3 -i prerelease --preid beta\n1.2.4-beta.0\n```\n\nWhich then can be used to increment further:\n\n```bash\n$ semver 1.2.4-beta.0 -i prerelease\n1.2.4-beta.1\n```\n\n### Advanced Range Syntax\n\nAdvanced range syntax desugars to primitive comparators in\ndeterministic ways.\n\nAdvanced ranges may be combined in the same way as primitive\ncomparators using white space or `||`.\n\n#### Hyphen Ranges `X.Y.Z - A.B.C`\n\nSpecifies an inclusive set.\n\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n\nIf a partial version is provided as the first version in the inclusive\nrange, then the missing pieces are replaced with zeroes.\n\n* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`\n\nIf a partial version is provided as the second version in the\ninclusive range, then all versions that start with the supplied parts\nof the tuple are accepted, but nothing that would be greater than the\nprovided tuple parts.\n\n* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`\n* `1.2.3 - 2` := `>=1.2.3 <3.0.0`\n\n#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`\n\nAny of `X`, `x`, or `*` may be used to \"stand in\" for one of the\nnumeric values in the `[major, minor, patch]` tuple.\n\n* `*` := `>=0.0.0` (Any version satisfies)\n* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)\n* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)\n\nA partial version range is treated as an X-Range, so the special\ncharacter is in fact optional.\n\n* `\"\"` (empty string) := `*` := `>=0.0.0`\n* `1` := `1.x.x` := `>=1.0.0 <2.0.0`\n* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`\n\n#### Tilde Ranges `~1.2.3` `~1.2` `~1`\n\nAllows patch-level changes if a minor version is specified on the\ncomparator.  Allows minor-level changes if not.\n\n* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)\n* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)\n* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`\n* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)\n* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)\n* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in\n  the `1.2.3` version will be allowed, if they are greater than or\n  equal to `beta.2`.  So, `1.2.3-beta.4` would be allowed, but\n  `1.2.4-beta.2` would not, because it is a prerelease of a\n  different `[major, minor, patch]` tuple.\n\n#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`\n\nAllows changes that do not modify the left-most non-zero digit in the\n`[major, minor, patch]` tuple.  In other words, this allows patch and\nminor updates for versions `1.0.0` and above, patch updates for\nversions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.\n\nMany authors treat a `0.x` version as if the `x` were the major\n\"breaking-change\" indicator.\n\nCaret ranges are ideal when an author may make breaking changes\nbetween `0.2.4` and `0.3.0` releases, which is a common practice.\nHowever, it presumes that there will *not* be breaking changes between\n`0.2.4` and `0.2.5`.  It allows for changes that are presumed to be\nadditive (but non-breaking), according to commonly observed practices.\n\n* `^1.2.3` := `>=1.2.3 <2.0.0`\n* `^0.2.3` := `>=0.2.3 <0.3.0`\n* `^0.0.3` := `>=0.0.3 <0.0.4`\n* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in\n  the `1.2.3` version will be allowed, if they are greater than or\n  equal to `beta.2`.  So, `1.2.3-beta.4` would be allowed, but\n  `1.2.4-beta.2` would not, because it is a prerelease of a\n  different `[major, minor, patch]` tuple.\n* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4`  Note that prereleases in the\n  `0.0.3` version *only* will be allowed, if they are greater than or\n  equal to `beta`.  So, `0.0.3-pr.2` would be allowed.\n\nWhen parsing caret ranges, a missing `patch` value desugars to the\nnumber `0`, but will allow flexibility within that value, even if the\nmajor and minor versions are both `0`.\n\n* `^1.2.x` := `>=1.2.0 <2.0.0`\n* `^0.0.x` := `>=0.0.0 <0.1.0`\n* `^0.0` := `>=0.0.0 <0.1.0`\n\nA missing `minor` and `patch` values will desugar to zero, but also\nallow flexibility within those values, even if the major version is\nzero.\n\n* `^1.x` := `>=1.0.0 <2.0.0`\n* `^0.x` := `>=0.0.0 <1.0.0`\n\n### Range Grammar\n\nPutting all this together, here is a Backus-Naur grammar for ranges,\nfor the benefit of parser authors:\n\n```bnf\nrange-set  ::= range ( logical-or range ) *\nlogical-or ::= ( ' ' ) * '||' ( ' ' ) *\nrange      ::= hyphen | simple ( ' ' simple ) * | ''\nhyphen     ::= partial ' - ' partial\nsimple     ::= primitive | partial | tilde | caret\nprimitive  ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial\npartial    ::= xr ( '.' xr ( '.' xr qualifier ? )? )?\nxr         ::= 'x' | 'X' | '*' | nr\nnr         ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *\ntilde      ::= '~' partial\ncaret      ::= '^' partial\nqualifier  ::= ( '-' pre )? ( '+' build )?\npre        ::= parts\nbuild      ::= parts\nparts      ::= part ( '.' part ) *\npart       ::= nr | [-0-9A-Za-z]+\n```\n\n## Functions\n\nAll methods and classes take a final `options` object argument.  All\noptions in this object are `false` by default.  The options supported\nare:\n\n- `loose`  Be more forgiving about not-quite-valid semver strings.\n  (Any resulting output will always be 100% strict compliant, of\n  course.)  For backwards compatibility reasons, if the `options`\n  argument is a boolean value instead of an object, it is interpreted\n  to be the `loose` param.\n- `includePrerelease`  Set to suppress the [default\n  behavior](https://github.com/npm/node-semver#prerelease-tags) of\n  excluding prerelease tagged versions from ranges unless they are\n  explicitly opted into.\n\nStrict-mode Comparators and Ranges will be strict about the SemVer\nstrings that they parse.\n\n* `valid(v)`: Return the parsed version, or null if it's not valid.\n* `inc(v, release)`: Return the version incremented by the release\n  type (`major`,   `premajor`, `minor`, `preminor`, `patch`,\n  `prepatch`, or `prerelease`), or null if it's not valid\n  * `premajor` in one call will bump the version up to the next major\n    version and down to a prerelease of that major version.\n    `preminor`, and `prepatch` work the same way.\n  * If called from a non-prerelease version, the `prerelease` will work the\n    same as `prepatch`. It increments the patch version, then makes a\n    prerelease. If the input version is already a prerelease it simply\n    increments it.\n* `prerelease(v)`: Returns an array of prerelease components, or null\n  if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`\n* `major(v)`: Return the major version number.\n* `minor(v)`: Return the minor version number.\n* `patch(v)`: Return the patch version number.\n* `intersects(r1, r2, loose)`: Return true if the two supplied ranges\n  or comparators intersect.\n* `parse(v)`: Attempt to parse a string as a semantic version, returning either\n  a `SemVer` object or `null`.\n\n### Comparison\n\n* `gt(v1, v2)`: `v1 > v2`\n* `gte(v1, v2)`: `v1 >= v2`\n* `lt(v1, v2)`: `v1 < v2`\n* `lte(v1, v2)`: `v1 <= v2`\n* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,\n  even if they're not the exact same string.  You already know how to\n  compare strings.\n* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.\n* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call\n  the corresponding function above.  `\"===\"` and `\"!==\"` do simple\n  string comparison, but are included for completeness.  Throws if an\n  invalid comparison string is provided.\n* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if\n  `v2` is greater.  Sorts in ascending order if passed to `Array.sort()`.\n* `rcompare(v1, v2)`: The reverse of compare.  Sorts an array of versions\n  in descending order when passed to `Array.sort()`.\n* `diff(v1, v2)`: Returns difference between two versions by the release type\n  (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),\n  or null if the versions are the same.\n\n### Comparators\n\n* `intersects(comparator)`: Return true if the comparators intersect\n\n### Ranges\n\n* `validRange(range)`: Return the valid range or null if it's not valid\n* `satisfies(version, range)`: Return true if the version satisfies the\n  range.\n* `maxSatisfying(versions, range)`: Return the highest version in the list\n  that satisfies the range, or `null` if none of them do.\n* `minSatisfying(versions, range)`: Return the lowest version in the list\n  that satisfies the range, or `null` if none of them do.\n* `minVersion(range)`: Return the lowest version that can possibly match\n  the given range.\n* `gtr(version, range)`: Return `true` if version is greater than all the\n  versions possible in the range.\n* `ltr(version, range)`: Return `true` if version is less than all the\n  versions possible in the range.\n* `outside(version, range, hilo)`: Return true if the version is outside\n  the bounds of the range in either the high or low direction.  The\n  `hilo` argument must be either the string `'>'` or `'<'`.  (This is\n  the function called by `gtr` and `ltr`.)\n* `intersects(range)`: Return true if any of the ranges comparators intersect\n\nNote that, since ranges may be non-contiguous, a version might not be\ngreater than a range, less than a range, *or* satisfy a range!  For\nexample, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`\nuntil `2.0.0`, so the version `1.2.10` would not be greater than the\nrange (because `2.0.1` satisfies, which is higher), nor less than the\nrange (since `1.2.8` satisfies, which is lower), and it also does not\nsatisfy the range.\n\nIf you want to know if a version satisfies or does not satisfy a\nrange, use the `satisfies(version, range)` function.\n\n### Coercion\n\n* `coerce(version)`: Coerces a string to semver if possible\n\nThis aims to provide a very forgiving translation of a non-semver string to\nsemver. It looks for the first digit in a string, and consumes all\nremaining characters which satisfy at least a partial semver (e.g., `1`,\n`1.2`, `1.2.3`) up to the max permitted length (256 characters).  Longer\nversions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).  All\nsurrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes\n`3.4.0`).  Only text which lacks digits will fail coercion (`version one`\nis not valid).  The maximum  length for any semver component considered for\ncoercion is 16 characters; longer components will be ignored\n(`10000000000000000.4.7.4` becomes `4.7.4`).  The maximum value for any\nsemver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value\ncomponents are invalid (`9999999999999999.4.7.4` is likely invalid).\n"},{"id":"1e4a42f7-70c5-5822-9379-bf6975f29371","frontmatter":{"title":"CLI Commands"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/nav.yml\ntitle: CLI Commands\n---\n\n<Index depth=\"1\" />\n"},{"id":"e7ff7e32-1d85-5725-9344-f82c87d91237","frontmatter":{"title":"npm-access"},"rawBody":"---\ntitle: npm-access\nsection: 1\ndescription: Set access level on published packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-access.md\n---\n\n### Synopsis\n\n```bash\nnpm access public [<package>]\nnpm access restricted [<package>]\n\nnpm access grant <read-only|read-write> <scope:team> [<package>]\nnpm access revoke <scope:team> [<package>]\n\nnpm access 2fa-required [<package>]\nnpm access 2fa-not-required [<package>]\n\nnpm access ls-packages [<user>|<scope>|<scope:team>]\nnpm access ls-collaborators [<package> [<user>]]\nnpm access edit [<package>]\n```\n\n### Description\n\nUsed to set access controls on private packages.\n\nFor all of the subcommands, `npm access` will perform actions on the packages\nin the current working directory if no package name is passed to the\nsubcommand.\n\n* public / restricted:\n  Set a package to be either publicly accessible or restricted.\n\n* grant / revoke:\n  Add or remove the ability of users and teams to have read-only or read-write\n  access to a package.\n\n* 2fa-required / 2fa-not-required:\n  Configure whether a package requires that anyone publishing it have two-factor\n  authentication enabled on their account.\n\n* ls-packages:\n  Show all of the packages a user or a team is able to access, along with the\n  access level, except for read-only public packages (it won't print the whole\n  registry listing)\n\n* ls-collaborators:\n  Show all of the access privileges for a package. Will only show permissions\n  for packages to which you have at least read access. If `<user>` is passed in,\n  the list is filtered only to teams _that_ user happens to belong to.\n\n* edit:\n  Set the access privileges for a package at once using `$EDITOR`.\n\n### Details\n\n`npm access` always operates directly on the current registry, configurable\nfrom the command line using `--registry=<registry url>`.\n\nUnscoped packages are *always public*.\n\nScoped packages *default to restricted*, but you can either publish them as\npublic using `npm publish --access=public`, or set their access as public using\n`npm access public` after the initial publish.\n\nYou must have privileges to set the access of a package:\n\n* You are an owner of an unscoped or scoped package.\n* You are a member of the team that owns a scope.\n* You have been given read-write privileges for a package, either as a member\n  of a team or directly as an owner.\n\nIf you have two-factor authentication enabled then you'll be prompted to\nprovide an otp token, or may use the `--otp=...` option to specify it on\nthe command line.\n\nIf your account is not paid, then attempts to publish scoped packages will\nfail with an HTTP 402 status code (logically enough), unless you use\n`--access=public`.\n\nManagement of teams and team memberships is done with the `npm team` command.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [`libnpmaccess`](https://npm.im/libnpmaccess)\n* [npm team](/cli/v7/commands/npm-team)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm registry](/cli/v7/using-npm/registry)\n"},{"id":"6fa754d5-9546-5dec-91a0-9f9c5c96aac5","frontmatter":{"title":"npm-adduser"},"rawBody":"---\ntitle: npm-adduser\nsection: 1\ndescription: Add a registry user account\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-adduser.md\n---\n\n### Synopsis\n\n```bash\nnpm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]\n\naliases: login, add-user\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nCreate or verify a user named `<username>` in the specified registry, and\nsave the credentials to the `.npmrc` file. If no registry is specified,\nthe default registry will be used (see [`config`](/cli/v7/using-npm/config)).\n\nThe username, password, and email are read in from prompts.\n\nTo reset your password, go to <https://www.npmjs.com/forgot>\n\nTo change your email address, go to <https://www.npmjs.com/email-edit>\n\nYou may use this command multiple times with the same user account to\nauthorize on a new machine.  When authenticating on a new machine,\nthe username, password and email address must all match with\nyour existing record.\n\n`npm login` is an alias to `adduser` and behaves exactly the same way.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm token](/cli/v7/commands/npm-token)\n* [npm profile](/cli/v7/commands/npm-profile)\n"},{"id":"88386370-e4e7-5fc8-b6c7-36ee74311a49","frontmatter":{"title":"npm-audit"},"rawBody":"---\ntitle: npm-audit\nsection: 1\ndescription: Run a security audit\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-audit.md\n---\n\n### Synopsis\n\n```bash\nnpm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]\nnpm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]\n\ncommon options: [--production] [--only=(dev|prod)]\n```\n\n### Description\n\nThe audit command submits a description of the dependencies configured in\nyour project to your default registry and asks for a report of known\nvulnerabilities.  If any vulnerabilities are found, then the impact and\nappropriate remediation will be calculated.  If the `fix` argument is\nprovided, then remediations will be applied to the package tree.\n\nThe command will exit with a 0 exit code if no vulnerabilities were found.\n\nNote that some vulnerabilities cannot be fixed automatically and will\nrequire manual intervention or review.  Also note that since `npm audit\nfix` runs a full-fledged `npm install` under the hood, all configs that\napply to the installer will also apply to `npm install` -- so things like\n`npm audit fix --package-lock-only` will work as expected.\n\nBy default, the audit command will exit with a non-zero code if any\nvulnerability is found. It may be useful in CI environments to include the\n`--audit-level` parameter to specify the minimum vulnerability level that\nwill cause the command to fail. This option does not filter the report\noutput, it simply changes the command's failure threshold.\n\n### Audit Endpoints\n\nThere are two audit endpoints that npm may use to fetch vulnerability\ninformation: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint.\n\n#### Bulk Advisory Endpoint\n\nAs of version 7, npm uses the much faster `Bulk Advisory` endpoint to\noptimize the speed of calculating audit results.\n\nnpm will generate a JSON payload with the name and list of versions of each\npackage in the tree, and POST it to the default configured registry at\nthe path `/-/npm/v1/security/advisories/bulk`.\n\nAny packages in the tree that do not have a `version` field in their\npackage.json file will be ignored.  If any `--omit` options are specified\n(either via the `--omit` config, or one of the shorthands such as\n`--production`, `--only=dev`, and so on), then packages will be omitted\nfrom the submitted payload as appropriate.\n\nIf the registry responds with an error, or with an invalid response, then\nnpm will attempt to load advisory data from the `Quick Audit` endpoint.\n\nThe expected result will contain a set of advisory objects for each\ndependency that matches the advisory range.  Each advisory object contains\na `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`.\n\nnpm then uses these advisory objects to calculate vulnerabilities and\nmeta-vulnerabilities of the dependencies within the tree.\n\n#### Quick Audit Endpoint\n\nIf the `Bulk Advisory` endpoint returns an error, or invalid data, npm will\nattempt to load advisory data from the `Quick Audit` endpoint, which is\nconsiderably slower in most cases.\n\nThe full package tree as found in `package-lock.json` is submitted, along\nwith the following pieces of additional metadata:\n\n* `npm_version`\n* `node_version`\n* `platform`\n* `arch`\n* `node_env`\n\nAll packages in the tree are submitted to the Quick Audit endpoint.\nOmitted dependency types are skipped when generating the report.\n\n#### Scrubbing\n\nOut of an abundance of caution, npm versions 5 and 6 would \"scrub\" any\npackages from the submitted report if their name contained a `/` character,\nso as to avoid leaking the names of potentially private packages or git\nURLs.\n\nHowever, in practice, this resulted in audits often failing to properly\ndetect meta-vulnerabilities, because the tree would appear to be invalid\ndue to missing dependencies, and prevented the detection of vulnerabilities\nin package trees that used git dependencies or private modules.\n\nThis scrubbing has been removed from npm as of version 7.\n\n#### Calculating Meta-Vulnerabilities and Remediations\n\nnpm uses the\n[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator)\nmodule to turn a set of security advisories into a set of \"vulnerability\"\nobjects.  A \"meta-vulnerability\" is a dependency that is vulnerable by\nvirtue of dependence on vulnerable versions of a vulnerable package.\n\nFor example, if the package `foo` is vulnerable in the range `>=1.0.2\n<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version\nof `bar` can only be installed by installing a vulnerable version of `foo`.\nIn this case, `bar` is a \"metavulnerability\".\n\nOnce metavulnerabilities for a given package are calculated, they are\ncached in the `~/.npm` folder and only re-evaluated if the advisory range\nchanges, or a new version of the package is published (in which case, the\nnew version is checked for metavulnerable status as well).\n\nIf the chain of metavulnerabilities extends all the way to the root\nproject, and it cannot be updated without changing its dependency ranges,\nthen `npm audit fix` will require the `--force` option to apply the\nremediation.  If remediations do not require changes to the dependency\nranges, then all vulnerable packages will be updated to a version that does\nnot have an advisory or metavulnerability posted against it.\n\n### Exit Code\n\nThe `npm audit` command will exit with a 0 exit code if no vulnerabilities\nwere found.  The `npm audit fix` command will exit with 0 exit code if no\nvulnerabilities are found _or_ if the remediation is able to successfully\nfix all vulnerabilities.\n\nIf vulnerabilities were found the exit code will depend on the\n`audit-level` configuration setting.\n\n### Examples\n\nScan your project for vulnerabilities and automatically install any compatible\nupdates to vulnerable dependencies:\n\n```bash\n$ npm audit fix\n```\n\nRun `audit fix` without modifying `node_modules`, but still updating the\npkglock:\n\n```bash\n$ npm audit fix --package-lock-only\n```\n\nSkip updating `devDependencies`:\n\n```bash\n$ npm audit fix --only=prod\n```\n\nHave `audit fix` install SemVer-major updates to toplevel dependencies, not\njust SemVer-compatible ones:\n\n```bash\n$ npm audit fix --force\n```\n\nDo a dry run to get an idea of what `audit fix` will do, and _also_ output\ninstall information in JSON format:\n\n```bash\n$ npm audit fix --dry-run --json\n```\n\nScan your project for vulnerabilities and just show the details, without\nfixing anything:\n\n```bash\n$ npm audit\n```\n\nGet the detailed audit report in JSON format:\n\n```bash\n$ npm audit --json\n```\n\nFail an audit only if the results include a vulnerability with a level of moderate or higher:\n\n```bash\n$ npm audit --audit-level=moderate\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `audit-level`\n\n* Default: null\n* Type: null, \"info\", \"low\", \"moderate\", \"high\", \"critical\", or \"none\"\n\nThe minimum level of vulnerability for `npm audit` to exit with a non-zero\nexit code.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [config](/cli/v7/using-npm/config)\n"},{"id":"a2eff430-640c-5131-91f2-8dac3e3bdb37","frontmatter":{"title":"npm-bin"},"rawBody":"---\ntitle: npm-bin\nsection: 1\ndescription: Display npm bin folder\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-bin.md\n---\n\n### Synopsis\n\n```bash\nnpm bin [-g|--global]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPrint the folder where npm will install executables.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prefix](/cli/v7/commands/npm-prefix)\n* [npm root](/cli/v7/commands/npm-root)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"16798f51-b3aa-52b8-9604-f38adc6df9cf","frontmatter":{"title":"npm-bugs"},"rawBody":"---\ntitle: npm-bugs\nsection: 1\ndescription: Report bugs for a package in a web browser\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-bugs.md\n---\n\n### Synopsis\n\n```bash\nnpm bugs [<pkgname> [<pkgname> ...]]\n\naliases: issues\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's bug\ntracker URL or the `mailto` URL of the support email, and then tries to\nopen it using the `--browser` config param. If no package name is provided, it\nwill search for a `package.json` in the current folder and use the `name` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm docs](/cli/v7/commands/npm-docs)\n* [npm view](/cli/v7/commands/npm-view)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [package.json](/cli/v7/configuring-npm/package-json)\n"},{"id":"bf47804f-c926-52d4-9304-cf146d1690f6","frontmatter":{"title":"npm-cache"},"rawBody":"---\ntitle: npm-cache\nsection: 1\ndescription: Manipulates packages cache\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-cache.md\n---\n\n### Synopsis\n\n```bash\nnpm cache add <tarball file>...\nnpm cache add <folder>...\nnpm cache add <tarball url>...\nnpm cache add <name>@<version>...\n\nnpm cache clean\naliases: npm cache clear, npm cache rm\n\nnpm cache verify\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nUsed to add, list, or clean the npm cache folder.\n\n* add:\n  Add the specified packages to the local cache.  This command is primarily\n  intended to be used internally by npm, but it can provide a way to\n  add data to the local installation cache explicitly.\n\n* clean:\n  Delete all data out of the cache folder.  Note that this is typically\n  unnecessary, as npm's cache is self-healing and resistant to data\n  corruption issues.\n\n* verify:\n  Verify the contents of the cache folder, garbage collecting any unneeded\n  data, and verifying the integrity of the cache index and all cached data.\n\n### Details\n\nnpm stores cache data in an opaque directory within the configured `cache`,\nnamed `_cacache`. This directory is a\n[`cacache`](http://npm.im/cacache)-based content-addressable cache that\nstores all http request data as well as other package-related data. This\ndirectory is primarily accessed through `pacote`, the library responsible\nfor all package fetching as of npm@5.\n\nAll data that passes through the cache is fully verified for integrity on\nboth insertion and extraction. Cache corruption will either trigger an\nerror, or signal to `pacote` that the data must be refetched, which it will\ndo automatically. For this reason, it should never be necessary to clear\nthe cache for any reason other than reclaiming disk space, thus why `clean`\nnow requires `--force` to run.\n\nThere is currently no method exposed through npm to inspect or directly\nmanage the contents of this cache. In order to access it, `cacache` must be\nused directly.\n\nnpm will not remove data by itself: the cache will grow as new packages are\ninstalled.\n\n### A note about the cache's design\n\nThe npm cache is strictly a cache: it should not be relied upon as a\npersistent and reliable data store for package data. npm makes no guarantee\nthat a previously-cached piece of data will be available later, and will\nautomatically delete corrupted contents. The primary guarantee that the\ncache makes is that, if it does return data, that data will be exactly the\ndata that was inserted.\n\nTo run an offline verification of existing cache contents, use `npm cache\nverify`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `cache`\n\n* Default: Windows: `%LocalAppData%\\npm-cache`, Posix: `~/.npm`\n* Type: Path\n\nThe location of npm's cache directory. See [`npm\ncache`](/cli/v7/commands/npm-cache)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm pack](/cli/v7/commands/npm-pack)\n* https://npm.im/cacache\n* https://npm.im/pacote\n* https://npm.im/@npmcli/arborist\n* https://npm.im/make-fetch-happen\n"},{"id":"8c392cf6-6b2c-5370-ae04-df70c70f41a1","frontmatter":{"title":"npm-ci"},"rawBody":"---\ntitle: npm-ci\nsection: 1\ndescription: Install a project with a clean slate\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-ci.md\n---\n\n### Synopsis\n\n```bash\nnpm ci\n```\n\n### Description\n\nThis command is similar to [`npm install`](/cli/v7/commands/npm-install), except\nit's meant to be used in automated environments such as test platforms,\ncontinuous integration, and deployment -- or any situation where you want\nto make sure you're doing a clean install of your dependencies.\n\n`npm ci` will be significantly faster when:\n\n- There is a `package-lock.json` or `npm-shrinkwrap.json` file.\n- The `node_modules` folder is missing or empty.\n\nIn short, the main differences between using `npm install` and `npm ci` are:\n\n* The project **must** have an existing `package-lock.json` or\n  `npm-shrinkwrap.json`.\n* If dependencies in the package lock do not match those in `package.json`,\n  `npm ci` will exit with an error, instead of updating the package lock.\n* `npm ci` can only install entire projects at a time: individual\n  dependencies cannot be added with this command.\n* If a `node_modules` is already present, it will be automatically removed\n  before `npm ci` begins its install.\n* It will never write to `package.json` or any of the package-locks:\n  installs are essentially frozen.\n\n### Example\n\nMake sure you have a package-lock and an up-to-date install:\n\n```bash\n$ cd ./my/npm/project\n$ npm install\nadded 154 packages in 10s\n$ ls | grep package-lock\n```\n\nRun `npm ci` in that project\n\n```bash\n$ npm ci\nadded 154 packages in 5s\n```\n\nConfigure Travis to build using `npm ci` instead of `npm install`:\n\n```bash\n# .travis.yml\ninstall:\n- npm ci\n# keep the npm cache around to speed up installs\ncache:\n  directories:\n  - \"$HOME/.npm\"\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)\n"},{"id":"a249fbaa-4dd0-519e-9bbd-20f1f29e5a94","frontmatter":{"title":"npm-completion"},"rawBody":"---\ntitle: npm-completion\nsection: 1\ndescription: Tab Completion for npm\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-completion.md\n---\n\n### Synopsis\n\n```bash\nsource <(npm completion)\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nEnables tab-completion in all npm commands.\n\nThe synopsis above\nloads the completions into your current shell.  Adding it to\nyour ~/.bashrc or ~/.zshrc will make the completions available\neverywhere:\n\n```bash\nnpm completion >> ~/.bashrc\nnpm completion >> ~/.zshrc\n```\n\nYou may of course also pipe the output of `npm completion` to a file\nsuch as `/usr/local/etc/bash_completion.d/npm` or \n`/etc/bash_completion.d/npm` if you have a system that will read \nthat file for you.\n\nWhen `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the\nenvironment, `npm completion` acts in \"plumbing mode\", and outputs\ncompletions based on the arguments.\n\n### See Also\n\n* [npm developers](/cli/v7/using-npm/developers)\n* [npm](/cli/v7/commands/npm)\n"},{"id":"bebab92e-bf96-517b-8e2a-dd88a933261b","frontmatter":{"title":"npm-config"},"rawBody":"---\ntitle: npm-config\nsection: 1\ndescription: Manage the npm configuration files\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-config.md\n---\n\n### Synopsis\n\n```bash\nnpm config set <key>=<value> [<key>=<value> ...]\nnpm config get [<key> [<key> ...]]\nnpm config delete <key> [<key> ...]\nnpm config list [--json]\nnpm config edit\nnpm set <key>=<value> [<key>=<value> ...]\nnpm get [<key> [<key> ...]]\n\nalias: c\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nnpm gets its config settings from the command line, environment\nvariables, `npmrc` files, and in some cases, the `package.json` file.\n\nSee [npmrc](/cli/v7/configuring-npm/npmrc) for more information about the npmrc\nfiles.\n\nSee [config(7)](/cli/v7/using-npm/config) for a more thorough explanation of the\nmechanisms involved, and a full list of config options available.\n\nThe `npm config` command can be used to update and edit the contents\nof the user and global npmrc files.\n\n### Sub-commands\n\nConfig supports the following sub-commands:\n\n#### set\n\n```bash\nnpm config set key=value [key=value...]\nnpm set key=value [key=value...]\n```\n\nSets each of the config keys to the value provided.\n\nIf value is omitted, then it sets it to an empty string.\n\nNote: for backwards compatibility, `npm config set key value` is supported\nas an alias for `npm config set key=value`.\n\n#### get\n\n```bash\nnpm config get [key ...]\nnpm get [key ...]\n```\n\nEcho the config value(s) to stdout.\n\nIf multiple keys are provided, then the values will be prefixed with the\nkey names.\n\nIf no keys are provided, then this command behaves the same as `npm config\nlist`.\n\n#### list\n\n```bash\nnpm config list\n```\n\nShow all the config settings. Use `-l` to also show defaults. Use `--json`\nto show the settings in json format.\n\n#### delete\n\n```bash\nnpm config delete key [key ...]\n```\n\nDeletes the specified keys from all configuration files.\n\n#### edit\n\n```bash\nnpm config edit\n```\n\nOpens the config file in an editor.  Use the `--global` flag to edit the\nglobal config.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `location`\n\n* Default: \"user\" unless `--global` is passed, which will also set this value\n  to \"global\"\n* Type: \"global\", \"user\", or \"project\"\n\nWhen passed to `npm config` this refers to which config file to use.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm](/cli/v7/commands/npm)\n"},{"id":"cb6b0576-5045-5a6b-bc08-b0caf9523c34","frontmatter":{"title":"npm-dedupe"},"rawBody":"---\ntitle: npm-dedupe\nsection: 1\ndescription: Reduce duplication in the package tree\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-dedupe.md\n---\n\n### Synopsis\n\n```bash\nnpm dedupe\nnpm ddp\n\naliases: ddp\n```\n\n### Description\n\nSearches the local package tree and attempts to simplify the overall\nstructure by moving dependencies further up the tree, where they can\nbe more effectively shared by multiple dependent packages.\n\nFor example, consider this dependency graph:\n\n```\na\n+-- b <-- depends on c@1.0.x\n|   `-- c@1.0.3\n`-- d <-- depends on c@~1.0.9\n    `-- c@1.0.10\n```\n\nIn this case, `npm dedupe` will transform the tree to:\n\n```bash\na\n+-- b\n+-- d\n`-- c@1.0.10\n```\n\nBecause of the hierarchical nature of node's module lookup, b and d\nwill both get their dependency met by the single c package at the root\nlevel of the tree.\n\nIn some cases, you may have a dependency graph like this:\n\n```\na\n+-- b <-- depends on c@1.0.x\n+-- c@1.0.3\n`-- d <-- depends on c@1.x\n    `-- c@1.9.9\n```\n\nDuring the installation process, the `c@1.0.3` dependency for `b` was\nplaced in the root of the tree.  Though `d`'s dependency on `c@1.x` could\nhave been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used,\nbecause npm favors updates by default, even when doing so causes\nduplication.\n\nRunning `npm dedupe` will cause npm to note the duplication and\nre-evaluate, deleting the nested `c` module, because the one in the root is\nsufficient.\n\nTo prefer deduplication over novelty during the installation process, run\n`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`.\n\nArguments are ignored. Dedupe always acts on the entire tree.\n\nNote that this operation transforms the dependency tree, but will never\nresult in new modules being installed.\n\nUsing `npm find-dupes` will run the command in `--dry-run` mode.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm find-dupes](/cli/v7/commands/npm-find-dupes)\n* [npm ls](/cli/v7/commands/npm-ls)\n* [npm update](/cli/v7/commands/npm-update)\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"6dd5d1dd-08db-5610-b55e-27782d6315c9","frontmatter":{"title":"npm-deprecate"},"rawBody":"---\ntitle: npm-deprecate\nsection: 1\ndescription: Deprecate a version of a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-deprecate.md\n---\n\n### Synopsis\n\n```bash\nnpm deprecate <pkg>[@<version range>] <message>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command will update the npm registry entry for a package, providing a\ndeprecation warning to all who attempt to install it.\n\nIt works on [version ranges](https://semver.npmjs.com/) as well as specific\nversions, so you can do something like this:\n\n```bash\nnpm deprecate my-thing@\"< 0.2.3\" \"critical bug fixed in v0.2.3\"\n```\n\nSemVer ranges passed to this command are interpreted such that they *do*\ninclude prerelease versions.  For example:\n\n```bash\nnpm deprecate my-thing@1.x \"1.x is no longer supported\"\n```\n\nIn this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.\n\nYou must be the package owner to deprecate something.  See the `owner` and\n`adduser` help topics.\n\nTo un-deprecate a package, specify an empty string (`\"\"`) for the `message` \nargument. Note that you must use double quotes with no space between them to \nformat an empty string.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n"},{"id":"8f5c3a4d-92bf-5556-924d-5379e8e88a8b","frontmatter":{"title":"npm-diff"},"rawBody":"---\ntitle: npm-diff\nsection: 1\ndescription: The registry diff command\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-diff.md\n---\n\n### Synopsis\n\n```bash\nnpm diff [...<paths>]\nnpm diff --diff=<pkg-name> [...<paths>]\nnpm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]\nnpm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]\nnpm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>]\n```\n\n### Description\n\nSimilar to its `git diff` counterpart, this command will print diff patches\nof files for packages published to the npm registry.\n\n* `npm diff --diff=<spec-a> --diff=<spec-b>`\n\n    Compares two package versions using their registry specifiers, e.g:\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to\n    compare across forks of any package,\n    e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`.\n\n    Any valid spec can be used, so that it's also possible to compare\n    directories or git repositories,\n    e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg`\n\n    Here's an example comparing two different versions of a package named\n    `abbrev` from the registry:\n\n    ```bash\n    npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1\n    ```\n\n    On success, output looks like:\n\n    ```bash\n    diff --git a/package.json b/package.json\n    index v1.1.0..v1.1.1 100644\n    --- a/package.json\n    +++ b/package.json\n    @@ -1,6 +1,6 @@\n     {\n       \"name\": \"abbrev\",\n    -  \"version\": \"1.1.0\",\n    +  \"version\": \"1.1.1\",\n       \"description\": \"Like ruby's abbrev module, but in js\",\n       \"author\": \"Isaac Z. Schlueter <i@izs.me>\",\n       \"main\": \"abbrev.js\",\n    ```\n\n    Given the flexible nature of npm specs, you can also target local\n    directories or git repos just like when using `npm install`:\n\n    ```bash\n    npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path\n    ```\n\n    In the example above we can compare the contents from the package installed\n    from the git repo at `github.com/npm/libnpmdiff` with the contents of the\n    `./local-path` that contains a valid package, such as a modified copy of\n    the original.\n\n* `npm diff` (in a package directory, no arguments):\n\n    If the package is published to the registry, `npm diff` will fetch the\n    tarball version tagged as `latest` (this value can be configured using the\n    `tag` option) and proceed to compare the contents of files present in that\n    tarball, with the current files in your local file system.\n\n    This workflow provides a handy way for package authors to see what\n    package-tracked files have been changed in comparison with the latest\n    published version of that package.\n\n* `npm diff --diff=<pkg-name>` (in a package directory):\n\n    When using a single package name (with no version or tag specifier) as an\n    argument, `npm diff` will work in a similar way to\n    [`npm-outdated`](npm-outdated) and reach for the registry to figure out\n    what current published version of the package named `<pkg-name>`\n    will satisfy its dependent declared semver-range. Once that specific\n    version is known `npm diff` will print diff patches comparing the\n    current version of `<pkg-name>` found in the local file system with\n    that specific version returned by the registry.\n\n    Given a package named `abbrev` that is currently installed:\n\n    ```bash\n    npm diff --diff=abbrev\n    ```\n\n    That will request from the registry its most up to date version and\n    will print a diff output comparing the currently installed version to this\n    newer one if the version numbers are not the same.\n\n* `npm diff --diff=<spec-a>` (in a package directory):\n\n    Similar to using only a single package name, it's also possible to declare\n    a full registry specifier version if you wish to compare the local version\n    of an installed package with the specific version/tag/semver-range provided\n    in `<spec-a>`.\n\n    An example: assuming `pkg@1.0.0` is installed in the current `node_modules`\n    folder, running:\n\n    ```bash\n    npm diff --diff=pkg@2.0.0\n    ```\n\n    It will effectively be an alias to\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`.\n\n* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory):\n\n    Using `npm diff` along with semver-valid version numbers is a shorthand\n    to compare different versions of the current package.\n\n    It needs to be run from a package directory, such that for a package named\n    `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`.\n\n    If only a single argument `<version-a>` is provided, then the current local\n    file system is going to be compared against that version.\n\n    Here's an example comparing two specific versions (published to the\n    configured registry) of the current project directory:\n\n    ```bash\n    npm diff --diff=1.0.0 --diff=1.1.0\n    ```\n\nNote that tag names are not valid `--diff` argument values, if you wish to\ncompare to a published tag, you must use the `pkg@tagname` syntax.\n\n#### Filtering files\n\nIt's possible to also specify positional arguments using file names or globs\npattern matching in order to limit the result of diff patches to only a subset\nof files for a given package, e.g:\n\n  ```bash\n  npm diff --diff=pkg@2 ./lib/ CHANGELOG.md\n  ```\n\nIn the example above the diff output is only going to print contents of files\nlocated within the folder `./lib/` and changed lines of code within the\n`CHANGELOG.md` file.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `diff`\n\n* Default:\n* Type: String (can be set multiple times)\n\nDefine arguments to compare in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-name-only`\n\n* Default: false\n* Type: Boolean\n\nPrints only filenames when using `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-unified`\n\n* Default: 3\n* Type: Number\n\nThe number of lines of context to print in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-ignore-all-space`\n\n* Default: false\n* Type: Boolean\n\nIgnore whitespace when comparing lines in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-no-prefix`\n\n* Default: false\n* Type: Boolean\n\nDo not show any source or destination prefix in `npm diff` output.\n\nNote: this causes `npm diff` to ignore the `--diff-src-prefix` and\n`--diff-dst-prefix` configs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-src-prefix`\n\n* Default: \"a/\"\n* Type: String\n\nSource prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-dst-prefix`\n\n* Default: \"b/\"\n* Type: String\n\nDestination prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-text`\n\n* Default: false\n* Type: Boolean\n\nTreat all files as text in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n## See Also\n\n* [npm outdated](/cli/v7/commands/npm-outdated)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm registry](/cli/v7/using-npm/registry)\n"},{"id":"a8fd44d5-1bc6-588f-9224-312e3af277ce","frontmatter":{"title":"npm-dist-tag"},"rawBody":"---\ntitle: npm-dist-tag\nsection: 1\ndescription: Modify package distribution tags\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-dist-tag.md\n---\n\n### Synopsis\n\n```bash\nnpm dist-tag add <pkg>@<version> [<tag>]\nnpm dist-tag rm <pkg> <tag>\nnpm dist-tag ls [<pkg>]\n\naliases: dist-tags\n```\n\n### Description\n\nAdd, remove, and enumerate distribution tags on a package:\n\n* add: Tags the specified version of the package with the specified tag, or\n  the `--tag` config if not specified. If you have two-factor\n  authentication on auth-and-writes then you’ll need to include a one-time\n  password on the command line with `--otp <one-time password>`, or at the\n  OTP prompt.\n\n* rm: Clear a tag that is no longer in use from the package. If you have\n  two-factor authentication on auth-and-writes then you’ll need to include\n  a one-time password on the command line with `--otp <one-time password>`,\n  or at the OTP prompt.\n\n* ls: Show all of the dist-tags for a package, defaulting to the package in\n  the current prefix. This is the default action if none is specified.\n\nA tag can be used when installing packages as a reference to a version instead\nof using a specific version number:\n\n```bash\nnpm install <name>@<tag>\n```\n\nWhen installing dependencies, a preferred tagged version may be specified:\n\n```bash\nnpm install --tag <tag>\n```\n\n(This also applies to any other commands that resolve and install\ndependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.)\n\nPublishing a package sets the `latest` tag to the published version unless the\n`--tag` option is used. For example, `npm publish --tag=beta`.\n\nBy default, `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag.\n\n### Purpose\n\nTags can be used to provide an alias instead of version numbers.\n\nFor example, a project might choose to have multiple streams of development\nand use a different tag for each stream, e.g., `stable`, `beta`, `dev`,\n`canary`.\n\nBy default, the `latest` tag is used by npm to identify the current version\nof a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag. Typically, projects only use the\n`latest` tag for stable release versions, and use other tags for unstable\nversions such as prereleases.\n\nThe `next` tag is used by some projects to identify the upcoming version.\n\nOther than `latest`, no tag has any special significance to npm itself.\n\n### Caveats\n\nThis command used to be known as `npm tag`, which only created new tags,\nand so had a different syntax.\n\nTags must share a namespace with version numbers, because they are\nspecified in the same slot: `npm install <pkg>@<version>` vs\n`npm install <pkg>@<tag>`.\n\nTags that can be interpreted as valid semver ranges will be rejected. For\nexample, `v1.4` cannot be used as a tag, because it is interpreted by\nsemver as `>=1.4.0 <1.5.0`.  See <https://github.com/npm/npm/issues/6082>.\n\nThe simplest way to avoid semver problems with tags is to use tags that do\nnot begin with a number or the letter `v`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm dedupe](/cli/v7/commands/npm-dedupe)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"09ad20e2-83c1-52df-a8c1-1c31b3638add","frontmatter":{"title":"npm-docs"},"rawBody":"---\ntitle: npm-docs\nsection: 1\ndescription: Open documentation for a package in a web browser\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-docs.md\n---\n\n### Synopsis\n\n```bash\nnpm docs [<pkgname> [<pkgname> ...]]\n\naliases: home\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's\ndocumentation URL, and then tries to open it using the `--browser` config\nparam. You can pass multiple package names at once. If no package name is\nprovided, it will search for a `package.json` in the current folder and use\nthe `name` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm view](/cli/v7/commands/npm-view)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [package.json](/cli/v7/configuring-npm/package-json)\n"},{"id":"2d4abb52-a5c3-5075-ac4a-bb3904d99346","frontmatter":{"title":"npm-doctor"},"rawBody":"---\ntitle: npm-doctor\nsection: 1\ndescription: Check your npm environment\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-doctor.md\n---\n\n### Synopsis\n\n```bash\nnpm doctor\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n`npm doctor` runs a set of checks to ensure that your npm installation has\nwhat it needs to manage your JavaScript packages. npm is mostly a\nstandalone tool, but it does have some basic requirements that must be met:\n\n+ Node.js and git must be executable by npm.\n+ The primary npm registry, `registry.npmjs.com`, or another service that\n  uses the registry API, is available.\n+ The directories that npm uses, `node_modules` (both locally and\n  globally), exist and can be written by the current user.\n+ The npm cache exists, and the package tarballs within it aren't corrupt.\n\nWithout all of these working properly, npm may not work properly.  Many\nissues are often attributable to things that are outside npm's code base,\nso `npm doctor` confirms that the npm installation is in a good state.\n\nAlso, in addition to this, there are also very many issue reports due to\nusing old versions of npm. Since npm is constantly improving, running\n`npm@latest` is better than an old version.\n\n`npm doctor` verifies the following items in your environment, and if there\nare any recommended changes, it will display them.\n\n#### `npm ping`\n\nBy default, npm installs from the primary npm registry,\n`registry.npmjs.org`.  `npm doctor` hits a special ping endpoint within the\nregistry. This can also be checked with `npm ping`. If this check fails,\nyou may be using a proxy that needs to be configured, or may need to talk\nto your IT staff to get access over HTTPS to `registry.npmjs.org`.\n\nThis check is done against whichever registry you've configured (you can\nsee what that is by running `npm config get registry`), and if you're using\na private registry that doesn't support the `/whoami` endpoint supported by\nthe primary registry, this check may fail.\n\n#### `npm -v`\n\nWhile Node.js may come bundled with a particular version of npm, it's the\npolicy of the CLI team that we recommend all users run `npm@latest` if they\ncan. As the CLI is maintained by a small team of contributors, there are\nonly resources for a single line of development, so npm's own long-term\nsupport releases typically only receive critical security and regression\nfixes. The team believes that the latest tested version of npm is almost\nalways likely to be the most functional and defect-free version of npm.\n\n#### `node -v`\n\nFor most users, in most circumstances, the best version of Node will be the\nlatest long-term support (LTS) release. Those of you who want access to new\nECMAscript features or bleeding-edge changes to Node's standard library may\nbe running a newer version, and some may be required to run an older\nversion of Node because of enterprise change control policies. That's OK!\nBut in general, the npm team recommends that most users run Node.js LTS.\n\n#### `npm config get registry`\n\nYou may be installing from private package registries for your project or\ncompany. That's great! Others may be following tutorials or StackOverflow\nquestions in an effort to troubleshoot problems you may be having.\nSometimes, this may entail changing the registry you're pointing at.  This\npart of `npm doctor` just lets you, and maybe whoever's helping you with\nsupport, know that you're not using the default registry.\n\n#### `which git`\n\nWhile it's documented in the README, it may not be obvious that npm needs\nGit installed to do many of the things that it does. Also, in some cases\n– especially on Windows – you may have Git set up in such a way that it's\nnot accessible via your `PATH` so that npm can find it. This check ensures\nthat Git is available.\n\n#### Permissions checks\n\n* Your cache must be readable and writable by the user running npm.\n* Global package binaries must be writable by the user running npm.\n* Your local `node_modules` path, if you're running `npm doctor` with a\n  project directory, must be readable and writable by the user running npm.\n\n#### Validate the checksums of cached packages\n\nWhen an npm package is published, the publishing process generates a\nchecksum that npm uses at install time to verify that the package didn't\nget corrupted in transit. `npm doctor` uses these checksums to validate the\npackage tarballs in your local cache (you can see where that cache is\nlocated with `npm config get cache`). In the event that there are corrupt\npackages in your cache, you should probably run `npm cache clean -f` and\nreset the cache.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm bugs](/cli/v7/commands/npm-bugs)\n* [npm help](/cli/v7/commands/npm-help)\n* [npm ping](/cli/v7/commands/npm-ping)\n"},{"id":"d1878e1c-89d7-5a5b-a5ba-62b5753fd8cd","frontmatter":{"title":"npm-edit"},"rawBody":"---\ntitle: npm-edit\nsection: 1\ndescription: Edit an installed package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-edit.md\n---\n\n### Synopsis\n\n```bash\nnpm edit <pkg>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSelects a dependency in the current project and opens the package folder in\nthe default editor (or whatever you've configured as the npm `editor`\nconfig -- see [`npm-config`](npm-config).)\n\nAfter it has been edited, the package is rebuilt so as to pick up any\nchanges in compiled packages.\n\nFor instance, you can do `npm install connect` to install connect\ninto your package, and then `npm edit connect` to make a few\nchanges to your locally installed copy.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm explore](/cli/v7/commands/npm-explore)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"a7da0e25-1e11-5b69-9b6f-ef073561e496","frontmatter":{"title":"npm-exec"},"rawBody":"---\ntitle: npm-exec\nsection: 1\ndescription: Run a command from a local or remote npm package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-exec.md\n---\n\n### Synopsis\n\n```bash\nnpm exec -- <pkg>[@<version>] [args...]\nnpm exec --package=<pkg>[@<version>] -- <cmd> [args...]\nnpm exec -c '<cmd> [args...]'\nnpm exec --package=foo -c '<cmd> [args...]'\nnpm exec [--ws] [-w <workspace-name] [args...]\n\nnpx <pkg>[@<specifier>] [args...]\nnpx -p <pkg>[@<specifier>] <cmd> [args...]\nnpx -c '<cmd> [args...]'\nnpx -p <pkg>[@<specifier>] -c '<cmd> [args...]'\nRun without --call or positional args to open interactive subshell\n\nalias: npm x, npx\n\ncommon options:\n--package=<pkg> (may be specified multiple times)\n-p is a shorthand for --package only when using npx executable\n-c <cmd> --call=<cmd> (may not be mixed with positional arguments)\n```\n\n### Description\n\nThis command allows you to run an arbitrary command from an npm package\n(either one installed locally, or fetched remotely), in a similar context\nas running it via `npm run`.\n\nRun without positional arguments or `--call`, this allows you to\ninteractively run commands in the same sort of shell environment that\n`package.json` scripts are run.  Interactive mode is not supported in CI\nenvironments when standard input is a TTY, to prevent hangs.\n\nWhatever packages are specified by the `--package` option will be\nprovided in the `PATH` of the executed command, along with any locally\ninstalled package executables.  The `--package` option may be\nspecified multiple times, to execute the supplied command in an environment\nwhere all specified packages are available.\n\nIf any requested packages are not present in the local project\ndependencies, then they are installed to a folder in the npm cache, which\nis added to the `PATH` environment variable in the executed process.  A\nprompt is printed (which can be suppressed by providing either `--yes` or\n`--no`).\n\nPackage names provided without a specifier will be matched with whatever\nversion exists in the local project.  Package names with a specifier will\nonly be considered a match if they have the exact same name and version as\nthe local dependency.\n\nIf no `-c` or `--call` option is provided, then the positional arguments\nare used to generate the command string.  If no `--package` options\nare provided, then npm will attempt to determine the executable name from\nthe package specifier provided as the first positional argument according\nto the following heuristic:\n\n- If the package has a single entry in its `bin` field in `package.json`,\n  or if all entries are aliases of the same command, then that command\n  will be used.\n- If the package has multiple `bin` entries, and one of them matches the\n  unscoped portion of the `name` field, then that command will be used.\n- If this does not result in exactly one option (either because there are\n  no bin entries, or none of them match the `name` of the package), then\n  `npm exec` exits with an error.\n\nTo run a binary _other than_ the named binary, specify one or more\n`--package` options, which will prevent npm from inferring the package from\nthe first command argument.\n\n### `npx` vs `npm exec`\n\nWhen run via the `npx` binary, all flags and options *must* be set prior to\nany positional arguments.  When run via `npm exec`, a double-hyphen `--`\nflag can be used to suppress npm's parsing of switches and options that\nshould be sent to the executed command.\n\nFor example:\n\n```\n$ npx foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will resolve the `foo` package name, and run the\nfollowing command:\n\n```\n$ foo bar --package=@npmcli/foo\n```\n\nSince the `--package` option comes _after_ the positional arguments, it is\ntreated as an argument to the executed command.\n\nIn contrast, due to npm's argument parsing logic, running this command is\ndifferent:\n\n```\n$ npm exec foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will parse the `--package` option first, resolving the\n`@npmcli/foo` package.  Then, it will execute the following command in that\ncontext:\n\n```\n$ foo@latest bar\n```\n\nThe double-hyphen character is recommended to explicitly tell npm to stop\nparsing command line options and switches.  The following command would\nthus be equivalent to the `npx` command above:\n\n```\n$ npm exec -- foo@latest bar --package=@npmcli/foo\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `package`\n\n* Default:\n* Type: String (can be set multiple times)\n\nThe package to install for [`npm exec`](/cli/v7/commands/npm-exec)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `call`\n\n* Default: \"\"\n* Type: String\n\nOptional companion option for `npm exec`, `npx` that allows for specifying a\ncustom command to be run along with the installed packages.\n\n```bash\nnpm exec --package yo --package generator-node --call \"yo node\"\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Examples\n\nRun the version of `tap` in the local dependencies, with the provided\narguments:\n\n```\n$ npm exec -- tap --bail test/foo.js\n$ npx tap --bail test/foo.js\n```\n\nRun a command _other than_ the command whose name matches the package name\nby specifying a `--package` option:\n\n```\n$ npm exec --package=foo -- bar --bar-argument\n# ~ or ~\n$ npx --package=foo bar --bar-argument\n```\n\nRun an arbitrary shell script, in the context of the current project:\n\n```\n$ npm x -c 'eslint && say \"hooray, lint passed\"'\n$ npx -c 'eslint && say \"hooray, lint passed\"'\n```\n\n### Workspaces support\n\nYou may use the `workspace` or `workspaces` configs in order to run an\narbitrary command from an npm package (either one installed locally, or fetched\nremotely) in the context of the specified workspaces.\nIf no positional argument or `--call` option is provided, it will open an\ninteractive subshell in the context of each of these configured workspaces one\nat a time.\n\nGiven a project with configured workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   +-- b\n   |   `-- package.json\n   `-- c\n       `-- package.json\n```\n\nAssuming the workspace configuration is properly set up at the root level\n`package.json` file. e.g:\n\n```\n{\n    \"workspaces\": [ \"./packages/*\" ]\n}\n```\n\nYou can execute an arbitrary command from a package in the context of each of\nthe configured workspaces when using the `workspaces` configuration options,\nin this example we're using **eslint** to lint any js file found within each\nworkspace folder:\n\n```\nnpm exec --ws -- eslint ./*.js\n```\n\n#### Filtering workspaces\n\nIt's also possible to execute a command in a single workspace using the\n`workspace` config along with a name or directory path:\n\n```\nnpm exec --workspace=a -- eslint ./*.js\n```\n\nThe `workspace` config can also be specified multiple times in order to run a\nspecific script in the context of multiple workspaces. When defining values for\nthe `workspace` config in the command line, it also possible to use `-w` as a\nshorthand, e.g:\n\n```\nnpm exec -w a -w b -- eslint ./*.js\n```\n\nThis last command will run the `eslint` command in both `./packages/a` and\n`./packages/b` folders.\n\n### Compatibility with Older npx Versions\n\nThe `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`\npackage deprecated at that time.  `npx` uses the `npm exec`\ncommand instead of a separate argument parser and install process, with\nsome affordances to maintain backwards compatibility with the arguments it\naccepted in previous versions.\n\nThis resulted in some shifts in its functionality:\n\n- Any `npm` config value may be provided.\n- To prevent security and user-experience problems from mistyping package\n  names, `npx` prompts before installing anything.  Suppress this\n  prompt with the `-y` or `--yes` option.\n- The `--no-install` option is deprecated, and will be converted to `--no`.\n- Shell fallback functionality is removed, as it is not advisable.\n- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand\n  for `--package` in npx.  This is maintained, but only for the `npx`\n  executable.\n- The `--ignore-existing` option is removed.  Locally installed bins are\n  always present in the executed process `PATH`.\n- The `--npm` option is removed.  `npx` will always use the `npm` it ships\n  with.\n- The `--node-arg` and `-n` options are removed.\n- The `--always-spawn` option is redundant, and thus removed.\n- The `--shell` option is replaced with `--script-shell`, but maintained\n  in the `npx` executable for backwards compatibility.\n\n### A note on caching\n\nThe npm cli utilizes its internal package cache when using the package\nname specified.  You can use the following to change how and when the\ncli uses this cache. See [`npm cache`](/cli/v7/commands/npm-cache) for more on\nhow the cache works.\n\n#### prefer-online\n\nForces staleness checks for packages, making the cli look for updates\nimmediately even if the package is already in the cache.\n\n#### prefer-offline\n\nBypasses staleness checks for packages.  Missing data will still be\nrequested from the server. To force full offline mode, use `offline`.\n\n#### offline\n\nForces full offline mode. Any packages not locally cached will result in\nan error.\n\n#### workspace\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nThis value is not exported to the environment for child processes.\n\n#### workspaces\n\n* Alias: `--ws`\n* Type: Boolean\n* Default: `false`\n\nRun scripts in the context of all configured workspaces for the current\nproject.\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm restart](/cli/v7/commands/npm-restart)\n* [npm stop](/cli/v7/commands/npm-stop)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"7084f298-b09e-5777-9e51-535f7a5c5922","frontmatter":{"title":"npm-explain"},"rawBody":"---\ntitle: npm-explain\nsection: 1\ndescription: Explain installed packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-explain.md\n---\n\n### Synopsis\n\n```bash\nnpm explain <folder | specifier>\n\nalias: why\n```\n\n### Description\n\nThis command will print the chain of dependencies causing a given package\nto be installed in the current project.\n\nPositional arguments can be either folders within `node_modules`, or\n`name@version-range` specifiers, which will select the dependency\nrelationships to explain.\n\nFor example, running `npm explain glob` within npm's source tree will show:\n\n```bash\nglob@7.1.6\nnode_modules/glob\n  glob@\"^7.1.4\" from the root project\n\nglob@7.1.1 dev\nnode_modules/tacks/node_modules/glob\n  glob@\"^7.0.5\" from rimraf@2.6.2\n  node_modules/tacks/node_modules/rimraf\n    rimraf@\"^2.6.2\" from tacks@1.3.0\n    node_modules/tacks\n      dev tacks@\"^1.3.0\" from the root project\n```\n\nTo explain just the package residing at a specific folder, pass that as the\nargument to the command.  This can be useful when trying to figure out\nexactly why a given dependency is being duplicated to satisfy conflicting\nversion requirements within the project.\n\n```bash\n$ npm explain node_modules/nyc/node_modules/find-up\nfind-up@3.0.0 dev\nnode_modules/nyc/node_modules/find-up\n  find-up@\"^3.0.0\" from nyc@14.1.1\n  node_modules/nyc\n    nyc@\"^14.1.1\" from tap@14.10.8\n    node_modules/tap\n      dev tap@\"^14.10.8\" from the root project\n```\n\n### Configuration\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm ls](/cli/v7/commands/npm-ls)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm link](/cli/v7/commands/npm-link)\n* [npm prune](/cli/v7/commands/npm-prune)\n* [npm outdated](/cli/v7/commands/npm-outdated)\n* [npm update](/cli/v7/commands/npm-update)\n"},{"id":"f82da848-6eb9-5def-924f-d6f0001679ec","frontmatter":{"title":"npm-explore"},"rawBody":"---\ntitle: npm-explore\nsection: 1\ndescription: Browse an installed package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-explore.md\n---\n\n### Synopsis\n\n```bash\nnpm explore <pkg> [ -- <command>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSpawn a subshell in the directory of the installed package specified.\n\nIf a command is specified, then it is run in the subshell, which then\nimmediately terminates.\n\nThis is particularly handy in the case of git submodules in the\n`node_modules` folder:\n\n```bash\nnpm explore some-dependency -- git pull origin master\n```\n\nNote that the package is *not* automatically rebuilt afterwards, so be\nsure to use `npm rebuild <pkg>` if you make any changes.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `shell`\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd.exe\" on\n  Windows\n* Type: String\n\nThe shell to run for the `npm explore` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm edit](/cli/v7/commands/npm-edit)\n* [npm rebuild](/cli/v7/commands/npm-rebuild)\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"034a0e34-2dd2-5bf7-b5c1-7882160b4810","frontmatter":{"title":"npm-find-dupes"},"rawBody":"---\ntitle: npm-find-dupes\nsection: 1\ndescription: Find duplication in the package tree\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-find-dupes.md\n---\n\n### Synopsis\n\n```bash\nnpm find-dupes\n```\n\n### Description\n\nRuns `npm dedupe` in `--dry-run` mode, making npm only output the\nduplications, without actually changing the package tree.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm dedupe](/cli/v7/commands/npm-dedupe)\n* [npm ls](/cli/v7/commands/npm-ls)\n* [npm update](/cli/v7/commands/npm-update)\n* [npm install](/cli/v7/commands/npm-install)\n\n"},{"id":"31cd2341-b960-58f2-ba0b-2ba16bc02768","frontmatter":{"title":"npm-fund"},"rawBody":"---\ntitle: npm-fund\nsection: 1\ndescription: Retrieve funding information\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-fund.md\n---\n\n### Synopsis\n\n```bash\nnpm fund [<pkg>]\nnpm fund [-w <workspace-name>]\n```\n\n### Description\n\nThis command retrieves information on how to fund the dependencies of a\ngiven project. If no package name is provided, it will list all\ndependencies that are looking for funding in a tree structure, listing the\ntype of funding and the url to visit. If a package name is provided then it\ntries to open its funding url using the `--browser` config param; if there\nare multiple funding sources for the package, the user will be instructed\nto pass the `--which` option to disambiguate.\n\nThe list will avoid duplicated entries and will stack all packages that\nshare the same url as a single entry. Thus, the list does not have the same\nshape of the output from `npm ls`.\n\n#### Example\n\n### Workspaces support\n\nIt's possible to filter the results to only include a single workspace and its\ndependencies using the `workspace` config option.\n\n#### Example:\n\nHere's an example running `npm fund` in a project with a configured\nworkspace `a`:\n\n```bash\n$ npm fund\ntest-workspaces-fund@1.0.0\n+-- https://example.com/a\n| | `-- a@1.0.0\n| `-- https://example.com/maintainer\n|     `-- foo@1.0.0\n+-- https://example.com/npmcli-funding\n|   `-- @npmcli/test-funding\n`-- https://example.com/org\n    `-- bar@2.0.0\n```\n\nAnd here is an example of the expected result when filtering only by\na specific workspace `a` in the same project:\n\n```bash\n$ npm fund -w a\ntest-workspaces-fund@1.0.0\n`-- https://example.com/a\n  | `-- a@1.0.0\n  `-- https://example.com/maintainer\n      `-- foo@2.0.0\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `which`\n\n* Default: null\n* Type: null or Number\n\nIf there are multiple funding sources, which 1-indexed source URL to open.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n## See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm docs](/cli/v7/commands/npm-docs)\n* [npm ls](/cli/v7/commands/npm-ls)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"a3c74a66-d65a-57b6-bd74-1caebce4ac24","frontmatter":{"title":"npm-help-search"},"rawBody":"---\ntitle: npm-help-search\nsection: 1\ndescription: Search npm help documentation\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-help-search.md\n---\n\n### Synopsis\n\n```bash\nnpm help-search <text>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command will search the npm markdown documentation files for the terms\nprovided, and then list the results, sorted by relevance.\n\nIf only one result is found, then it will show that help topic.\n\nIf the argument to `npm help` is not a known help topic, then it will call\n`help-search`.  It is rarely if ever necessary to call this command\ndirectly.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm](/cli/v7/commands/npm)\n* [npm help](/cli/v7/commands/npm-help)\n"},{"id":"b457fa52-cbbf-5daf-8c17-1c0ccf2936f9","frontmatter":{"title":"npm-help"},"rawBody":"---\ntitle: npm-help\nsection: 1\ndescription: Get help on npm\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-help.md\n---\n\n### Synopsis\n\n```bash\nnpm help <term> [<terms..>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nIf supplied a topic, then show the appropriate documentation page.\n\nIf the topic does not exist, or if multiple terms are provided, then npm\nwill run the `help-search` command to find a match.  Note that, if\n`help-search` finds a single subject, then it will run `help` on that\ntopic, so unique matches are equivalent to specifying a topic name.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `viewer`\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: String\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm](/cli/v7/commands/npm)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm help-search](/cli/v7/commands/npm-help-search)\n"},{"id":"ff51f4c0-bed8-5cf5-a8a6-f4fc78a0b569","frontmatter":{"title":"npm-hook"},"rawBody":"---\ntitle: npm-hook\nsection: 1\ndescription: Manage registry hooks\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-hook.md\n---\n\n### Synopsis\n\n```bash\nnpm hook ls [pkg]\nnpm hook add <entity> <url> <secret>\nnpm hook update <id> <url> [secret]\nnpm hook rm <id>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nAllows you to manage [npm\nhooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),\nincluding adding, removing, listing, and updating.\n\nHooks allow you to configure URL endpoints that will be notified whenever a\nchange happens to any of the supported entity types. Three different types\nof entities can be watched by hooks: packages, owners, and scopes.\n\nTo create a package hook, simply reference the package name.\n\nTo create an owner hook, prefix the owner name with `~` (as in,\n`~youruser`).\n\nTo create a scope hook, prefix the scope name with `@` (as in,\n`@yourscope`).\n\nThe hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls`\nfor that particular hook.\n\nThe shared secret will be sent along to the URL endpoint so you can verify\nthe request came from your own configured hook.\n\n### Example\n\nAdd a hook to watch a package for changes:\n\n```bash\n$ npm hook add lodash https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages belonging to the user `substack`:\n\n```bash\n$ npm hook add ~substack https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages in the scope `@npm`\n\n```bash\n$ npm hook add @npm https://example.com/ my-shared-secret\n```\n\nList all your active hooks:\n\n```bash\n$ npm hook ls\n```\n\nList your active hooks for the `lodash` package:\n\n```bash\n$ npm hook ls lodash\n```\n\nUpdate an existing hook's url:\n\n```bash\n$ npm hook update id-deadbeef https://my-new-website.here/\n```\n\nRemove a hook:\n\n```bash\n$ npm hook rm id-deadbeef\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [\"Introducing Hooks\" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)\n"},{"id":"5f028df4-d395-54de-a625-f56a459bd808","frontmatter":{"title":"npm-init"},"rawBody":"---\ntitle: npm-init\nsection: 1\ndescription: Create a package.json file\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-init.md\n---\n\n### Synopsis\n\n```bash\nnpm init [--yes|-y|--scope]\nnpm init <@scope> (same as `npm exec <@scope>/create`)\nnpm init [<@scope>/]<name> (same as `npm exec [<@scope>/]create-<name>`)\nnpm init [-w <dir>] [args...]\n```\n\n### Description\n\n`npm init <initializer>` can be used to set up a new or existing npm\npackage.\n\n`initializer` in this case is an npm package named `create-<initializer>`,\nwhich will be installed by [`npm-exec`](/cli/v7/commands/npm-exec), and then have its\nmain bin executed -- presumably creating or updating `package.json` and\nrunning any other initialization-related operations.\n\nThe init command is transformed to a corresponding `npm exec` operation as\nfollows:\n\n* `npm init foo` -> `npm exec create-foo`\n* `npm init @usr/foo` -> `npm exec @usr/create-foo`\n* `npm init @usr` -> `npm exec @usr/create`\n\nIf the initializer is omitted (by just calling `npm init`), init will fall\nback to legacy init behavior. It will ask you a bunch of questions, and\nthen write a package.json for you. It will attempt to make reasonable\nguesses based on existing fields, dependencies, and options selected. It is\nstrictly additive, so it will keep any fields and values that were already\nset. You can also use `-y`/`--yes` to skip the questionnaire altogether. If\nyou pass `--scope`, it will create a scoped package.\n\n#### Forwarding additional options\n\nAny additional options will be passed directly to the command, so `npm init\nfoo -- --hello` will map to `npm exec -- create-foo --hello`.\n\nTo better illustrate how options are forwarded, here's a more evolved\nexample showing options passed to both the **npm cli** and a create package,\nboth following commands are equivalent:\n\n- `npm init foo -y --registry=<url> -- --hello -a`\n- `npm exec -y --registry=<url> -- create-foo --hello -a`\n\n### Examples\n\nCreate a new React-based project using\n[`create-react-app`](https://npm.im/create-react-app):\n\n```bash\n$ npm init react-app ./my-react-app\n```\n\nCreate a new `esm`-compatible package using\n[`create-esm`](https://npm.im/create-esm):\n\n```bash\n$ mkdir my-esm-lib && cd my-esm-lib\n$ npm init esm --yes\n```\n\nGenerate a plain old package.json using legacy init:\n\n```bash\n$ mkdir my-npm-pkg && cd my-npm-pkg\n$ git init\n$ npm init\n```\n\nGenerate it without having it ask any questions:\n\n```bash\n$ npm init -y\n```\n\n### Workspaces support\n\nIt's possible to create a new workspace within your project by using the\n`workspace` config option. When using `npm init -w <dir>` the cli will\ncreate the folders and boilerplate expected while also adding a reference\nto your project `package.json` `\"workspaces\": []` property in order to make\nsure that new generated **workspace** is properly set up as such.\n\nGiven a project with no workspaces, e.g:\n\n```\n.\n+-- package.json\n```\n\nYou may generate a new workspace using the legacy init:\n\n```bash\n$ npm init -w packages/a\n```\n\nThat will generate a new folder and `package.json` file, while also updating\nyour top-level `package.json` to add the reference to this new workspace:\n\n```\n.\n+-- package.json\n`-- packages\n   `-- a\n       `-- package.json\n```\n\nThe workspaces init also supports the `npm init <initializer> -w <dir>`\nsyntax, following the same set of rules explained earlier in the initial\n**Description** section of this page. Similar to the previous example of\ncreating a new React-based project using\n[`create-react-app`](https://npm.im/create-react-app), the following syntax\nwill make sure to create the new react app as a nested **workspace** within your\nproject and configure your `package.json` to recognize it as such:\n\n```bash\nnpm init -w packages/my-react-app react-app .\n```\n\nThis will make sure to generate your react app as expected, one important\nconsideration to have in mind is that `npm exec` is going to be run in the\ncontext of the newly created folder for that workspace, and that's the reason\nwhy in this example the initializer uses the initializer name followed with a\ndot to represent the current directory in that context, e.g: `react-app .`:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- my-react-app\n       +-- README\n       +-- package.json\n       `-- ...\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `yes`\n\n* Default: null\n* Type: null or Boolean\n\nAutomatically answer \"yes\" to any prompts that npm might print on the\ncommand line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [init-package-json module](http://npm.im/init-package-json)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm version](/cli/v7/commands/npm-version)\n* [npm scope](/cli/v7/using-npm/scope)\n* [npm exec](/cli/v7/commands/npm-exec)\n* [npm workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"c17fa124-8c80-50d6-84e8-f229dea529d2","frontmatter":{"title":"npm-install-ci-test"},"rawBody":"---\ntitle: npm-install-ci-test\nsection: 1\ndescription: Install a project with a clean slate and run tests\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-install-ci-test.md\n---\n\n### Synopsis\n\n```bash\nnpm install-ci-test\n\nalias: npm cit\n```\n\n### Description\n\nThis command runs `npm ci` followed immediately by `npm test`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install-test](/cli/v7/commands/npm-install-test)\n* [npm ci](/cli/v7/commands/npm-ci)\n* [npm test](/cli/v7/commands/npm-test)\n"},{"id":"161607ef-dbf8-5446-b9a5-d7663006a53e","frontmatter":{"title":"npm-install-test"},"rawBody":"---\ntitle: npm-install-test\nsection: 1\ndescription: Install package(s) and run tests\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-install-test.md\n---\n\n### Synopsis\n\n```bash\nnpm install-test (with no args, in package dir)\nnpm install-test [<@scope>/]<name>\nnpm install-test [<@scope>/]<name>@<tag>\nnpm install-test [<@scope>/]<name>@<version>\nnpm install-test [<@scope>/]<name>@<version range>\nnpm install-test <tarball file>\nnpm install-test <tarball url>\nnpm install-test <folder>\n\nalias: npm it\ncommon options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]\n```\n\n### Description\n\nThis command runs an `npm install` followed immediately by an `npm test`. It\ntakes exactly the same arguments as `npm install`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\npackage.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm install-ci-test](/cli/v7/commands/npm-install-ci-test)\n* [npm test](/cli/v7/commands/npm-test)\n"},{"id":"61fac420-dca8-51aa-8b3c-a071623a42ef","frontmatter":{"title":"npm-install"},"rawBody":"---\ntitle: npm-install\nsection: 1\ndescription: Install a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-install.md\n---\n\n### Synopsis\n\n```bash\nnpm install (with no args, in package dir)\nnpm install [<@scope>/]<name>\nnpm install [<@scope>/]<name>@<tag>\nnpm install [<@scope>/]<name>@<version>\nnpm install [<@scope>/]<name>@<version range>\nnpm install <alias>@npm:<name>\nnpm install <git-host>:<git-user>/<repo-name>\nnpm install <git repo url>\nnpm install <tarball file>\nnpm install <tarball url>\nnpm install <folder>\n\naliases: npm i, npm add\ncommon options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]\n```\n\n### Description\n\nThis command installs a package and any packages that it depends on. If the\npackage has a package-lock, or an npm shrinkwrap file, or a yarn lock file,\nthe installation of dependencies will be driven by that, respecting the\nfollowing order of precedence:\n\n* `npm-shrinkwrap.json`\n* `package-lock.json`\n* `yarn.lock`\n\nSee [package-lock.json](/cli/v7/configuring-npm/package-lock-json) and\n[`npm shrinkwrap`](/cli/v7/commands/npm-shrinkwrap).\n\nA `package` is:\n\n* a) a folder containing a program described by a\n  [`package.json`](/cli/v7/configuring-npm/package-json) file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry (see\n  [`registry`](/cli/v7/using-npm/registry)) with (c)\n* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v7/commands/npm-dist-tag)) that\n  points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `<git remote url>` that resolves to (a)\n\nEven if you never publish your package, you can still get a lot of benefits\nof using npm if you just want to write a node program (a), and perhaps if\nyou also want to be able to easily install it elsewhere after packing it up\ninto a tarball (b).\n\n\n* `npm install` (in a package directory, no arguments):\n\n    Install the dependencies in the local `node_modules` folder.\n\n    In global mode (ie, with `-g` or `--global` appended to the command),\n    it installs the current package context (ie, the current working\n    directory) as a global package.\n\n    By default, `npm install` will install all modules listed as\n    dependencies in [`package.json`](/cli/v7/configuring-npm/package-json).\n\n    With the `--production` flag (or when the `NODE_ENV` environment\n    variable is set to `production`), npm will not install modules listed\n    in `devDependencies`. To install all modules listed in both\n    `dependencies` and `devDependencies` when `NODE_ENV` environment\n    variable is set to `production`, you can use `--production=false`.\n\n    > NOTE: The `--production` flag has no particular meaning when adding a\n    dependency to a project.\n\n* `npm install <folder>`:\n\n    Install the package in the directory as a symlink in the current\n    project.  Its dependencies will be installed before it's linked. If\n    `<folder>` sits inside the root of your project, its dependencies may\n    be hoisted to the top-level `node_modules` as they would for other\n    types of dependencies.\n\n* `npm install <tarball file>`:\n\n    Install a package that is sitting on the filesystem.  Note: if you just\n    want to link a dev directory into your npm root, you can do this more\n    easily by using [`npm link`](/cli/v7/commands/npm-link).\n\n    Tarball requirements:\n    * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the\n      extension.\n    * The package contents should reside in a subfolder inside the tarball\n      (usually it is called `package/`). npm strips one directory layer\n      when installing the package (an equivalent of `tar x\n      --strip-components=1` is run).\n    * The package must contain a `package.json` file with `name` and\n      `version` properties.\n\n    Example:\n\n    ```bash\n    npm install ./package.tgz\n    ```\n\n* `npm install <tarball url>`:\n\n    Fetch the tarball url, and then install it.  In order to distinguish between\n    this and other options, the argument must start with \"http://\" or \"https://\"\n\n    Example:\n\n    ```bash\n    npm install https://github.com/indexzero/forever/tarball/v0.5.6\n    ```\n\n* `npm install [<@scope>/]<name>`:\n\n    Do a `<name>@<tag>` install, where `<tag>` is the \"tag\" config. (See\n    [`config`](/cli/v7/using-npm/config). The config's default value is `latest`.)\n\n    In most cases, this will install the version of the modules tagged as\n    `latest` on the npm registry.\n\n    Example:\n\n    ```bash\n    npm install sax\n    ```\n\n    `npm install` saves any specified packages into `dependencies` by default.\n    Additionally, you can control where and how they get saved with some\n    additional flags:\n\n    * `-P, --save-prod`: Package will appear in your `dependencies`. This\n      is the default unless `-D` or `-O` are present.\n\n    * `-D, --save-dev`: Package will appear in your `devDependencies`.\n\n    * `-O, --save-optional`: Package will appear in your\n      `optionalDependencies`.\n\n    * `--no-save`: Prevents saving to `dependencies`.\n\n    When using any of the above options to save dependencies to your\n    package.json, there are two additional, optional flags:\n\n    * `-E, --save-exact`: Saved dependencies will be configured with an\n      exact version rather than using npm's default semver range operator.\n\n    * `-B, --save-bundle`: Saved dependencies will also be added to your\n      `bundleDependencies` list.\n\n    Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`\n    then it will be updated as well.\n\n    `<scope>` is optional. The package will be downloaded from the registry\n    associated with the specified scope. If no registry is associated with\n    the given scope the default registry is assumed. See\n    [`scope`](/cli/v7/using-npm/scope).\n\n    Note: if you do not include the @-symbol on your scope name, npm will\n    interpret this as a GitHub repository instead, see below. Scopes names\n    must also be followed by a slash.\n\n    Examples:\n\n    ```bash\n    npm install sax\n    npm install githubname/reponame\n    npm install @myorg/privatepackage\n    npm install node-tap --save-dev\n    npm install dtrace-provider --save-optional\n    npm install readable-stream --save-exact\n    npm install ansi-regex --save-bundle\n    ```\n\n    **Note**: If there is a file or folder named `<name>` in the current\n    working directory, then it will try to install that, and only try to\n    fetch the package by name if it is not valid.\n\n* `npm install <alias>@npm:<name>`:\n\n    Install a package under a custom alias. Allows multiple versions of\n    a same-name package side-by-side, more convenient import names for\n    packages with otherwise long ones, and using git forks replacements\n    or forked npm packages as replacements. Aliasing works only on your\n    project and does not rename packages in transitive dependencies.\n    Aliases should follow the naming conventions stated in\n    [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).\n\n    Examples:\n\n    ```bash\n    npm install my-react@npm:react\n    npm install jquery2@npm:jquery@2\n    npm install jquery3@npm:jquery@3\n    npm install npa@npm:npm-package-arg\n    ```\n\n* `npm install [<@scope>/]<name>@<tag>`:\n\n    Install the version of the package that is referenced by the specified tag.\n    If the tag does not exist in the registry data for that package, then this\n    will fail.\n\n    Example:\n\n    ```bash\n    npm install sax@latest\n    npm install @myorg/mypackage@latest\n    ```\n\n* `npm install [<@scope>/]<name>@<version>`:\n\n    Install the specified version of the package.  This will fail if the\n    version has not been published to the registry.\n\n    Example:\n\n    ```bash\n    npm install sax@0.1.1\n    npm install @myorg/privatepackage@1.5.0\n    ```\n\n* `npm install [<@scope>/]<name>@<version range>`:\n\n    Install a version of the package matching the specified version range.\n    This will follow the same rules for resolving dependencies described in\n    [`package.json`](/cli/v7/configuring-npm/package-json).\n\n    Note that most version ranges must be put in quotes so that your shell\n    will treat it as a single argument.\n\n    Example:\n\n    ```bash\n    npm install sax@\">=0.1.0 <0.2.0\"\n    npm install @myorg/privatepackage@\"16 - 17\"\n    ```\n\n* `npm install <git remote url>`:\n\n    Installs the package from the hosted git provider, cloning it with\n    `git`.  For a full git remote url, only that URL will be attempted.\n\n    ```bash\n    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n    ```\n\n    `<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n    `git+file`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`\n    can be any valid semver range or exact version, and npm will look for\n    any tags or refs matching that range in the remote repository, much as\n    it would for a registry dependency. If neither `#<commit-ish>` or\n    `#semver:<semver>` is specified, then the default branch of the\n    repository is used.\n\n    If the repository makes use of submodules, those submodules will be\n    cloned as well.\n\n    If the package being installed contains a `prepare` script, its\n    `dependencies` and `devDependencies` will be installed, and the prepare\n    script will be run, before the package is packaged and installed.\n\n    The following git environment variables are recognized by npm and will\n    be added to the environment when running git:\n\n    * `GIT_ASKPASS`\n    * `GIT_EXEC_PATH`\n    * `GIT_PROXY_COMMAND`\n    * `GIT_SSH`\n    * `GIT_SSH_COMMAND`\n    * `GIT_SSL_CAINFO`\n    * `GIT_SSL_NO_VERIFY`\n\n    See the git man page for details.\n\n    Examples:\n\n    ```bash\n    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27\n    npm install git+ssh://git@github.com:npm/cli#pull/273\n    npm install git+ssh://git@github.com:npm/cli#semver:^5.0\n    npm install git+https://isaacs@github.com/npm/cli.git\n    npm install git://github.com/npm/cli.git#v1.0.27\n    GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git\n    ```\n\n* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:\n* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:\n\n    Install the package at `https://github.com/githubname/githubrepo` by\n    attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`\n    can be any valid semver range or exact version, and npm will look for\n    any tags or refs matching that range in the remote repository, much as\n    it would for a registry dependency. If neither `#<commit-ish>` or\n    `#semver:<semver>` is specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies`\n    will be installed if the package has a `prepare` script before the\n    package is done installing.\n\n    Examples:\n\n    ```bash\n    npm install mygithubuser/myproject\n    npm install github:mygithubuser/myproject\n   ```\n\n* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:\n\n    Install the package at `https://gist.github.com/gistID` by attempting to\n    clone it using `git`. The GitHub username associated with the gist is\n    optional and will not be saved in `package.json`.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install gist:101a11beef\n    ```\n\n* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:\n\n    Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install bitbucket:mybitbucketuser/myproject\n    ```\n\n* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:\n\n    Install the package at `https://gitlab.com/gitlabname/gitlabrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install gitlab:mygitlabuser/myproject\n    npm install gitlab:myusr/myproj#semver:^5.0\n    ```\n\nYou may combine multiple arguments and even multiple types of arguments.\nFor example:\n\n```bash\nnpm install sax@\">=0.1.0 <0.2.0\" bench supervisor\n```\n\nThe `--tag` argument will apply to all of the specified install targets. If\na tag with the given name exists, the tagged version is preferred over\nnewer versions.\n\nThe `--dry-run` argument will report in the usual way what the install\nwould have done without actually installing anything.\n\nThe `--package-lock-only` argument will only update the\n`package-lock.json`, instead of checking `node_modules` and downloading\ndependencies.\n\nThe `-f` or `--force` argument will force npm to fetch remote resources\neven if a local copy exists on disk.\n\n```bash\nnpm install sax --force\n```\n\n### Configuration\n\nSee the [`config`](/cli/v7/using-npm/config) help doc.  Many of the configuration\nparams have some effect on installation, since that's most of what npm\ndoes.\n\nThese are some of the most common options related to installation.\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\npackage.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Algorithm\n\nGiven a `package{dep}` structure: `A{B,C}, B{C}, C{D}`,\nthe npm install algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n+-- D\n```\n\nThat is, the dependency from B to C is satisfied by the fact that A already\ncaused C to be installed at a higher level. D is still installed at the top\nlevel because nothing conflicts with it.\n\nFor `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n   `-- D@2\n+-- D@1\n```\n\nBecause B's D@1 will be installed in the top-level, C now has to install\nD@2 privately for itself. This algorithm is deterministic, but different\ntrees may be produced if two dependencies are requested for installation in\na different order.\n\nSee [folders](/cli/v7/configuring-npm/folders) for a more detailed description of\nthe specific folder structures that npm creates.\n\n### See Also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm update](/cli/v7/commands/npm-update)\n* [npm audit](/cli/v7/commands/npm-audit)\n* [npm fund](/cli/v7/commands/npm-fund)\n* [npm link](/cli/v7/commands/npm-link)\n* [npm rebuild](/cli/v7/commands/npm-rebuild)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm dist-tag](/cli/v7/commands/npm-dist-tag)\n* [npm uninstall](/cli/v7/commands/npm-uninstall)\n* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"92e3e89d-7f22-5c8c-9620-87a1ffa782ad","frontmatter":{"title":"npm-link"},"rawBody":"---\ntitle: npm-link\nsection: 1\ndescription: Symlink a package folder\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-link.md\n---\n\n### Synopsis\n\n```bash\nnpm link (in package dir)\nnpm link [<@scope>/]<pkg>[@<version>]\n\nalias: npm ln\n```\n\n### Description\n\nThis is handy for installing your own stuff, so that you can work on it and\ntest iteratively without having to continually rebuild.\n\nPackage linking is a two-step process.\n\nFirst, `npm link` in a package folder will create a symlink in the global\nfolder `{prefix}/lib/node_modules/<package>` that links to the package\nwhere the `npm link` command was executed. It will also link any bins in\nthe package to `{prefix}/bin/{name}`.  Note that `npm link` uses the global\nprefix (see `npm prefix -g` for its value).\n\nNext, in some other location, `npm link package-name` will create a\nsymbolic link from globally-installed `package-name` to `node_modules/` of\nthe current folder.\n\nNote that `package-name` is taken from `package.json`, _not_ from the\ndirectory name.\n\nThe package name can be optionally prefixed with a scope. See\n[`scope`](/cli/v7/using-npm/scope).  The scope must be preceded by an @-symbol and\nfollowed by a slash.\n\nWhen creating tarballs for `npm publish`, the linked packages are\n\"snapshotted\" to their current state by resolving the symbolic links, if\nthey are included in `bundleDependencies`.\n\nFor example:\n\n```bash\ncd ~/projects/node-redis    # go into the package directory\nnpm link                    # creates global link\ncd ~/projects/node-bloggy   # go into some other package directory.\nnpm link redis              # link-install the package\n```\n\nNow, any changes to `~/projects/node-redis` will be reflected in\n`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link\nshould be to the package name, not the directory name for that package.\n\nYou may also shortcut the two steps in one.  For example, to do the\nabove use-case in a shorter way:\n\n```bash\ncd ~/projects/node-bloggy  # go into the dir of your main project\nnpm link ../node-redis     # link the dir of your dependency\n```\n\nThe second line is the equivalent of doing:\n\n```bash\n(cd ../node-redis; npm link)\nnpm link redis\n```\n\nThat is, it first creates a global link, and then links the global\ninstallation target into your project's `node_modules` folder.\n\nNote that in this case, you are referring to the directory name,\n`node-redis`, rather than the package name `redis`.\n\nIf your linked package is scoped (see [`scope`](/cli/v7/using-npm/scope)) your\nlink command must include that scope, e.g.\n\n```bash\nnpm link @myorg/privatepackage\n```\n\n### Caveat\n\nNote that package dependencies linked in this way are _not_ saved to\n`package.json` by default, on the assumption that the intention is to have\na link stand in for a regular non-link dependency.  Otherwise, for example,\nif you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace\nthe `^3.0.1` dependency with `file:../path/to/node-redis`, which you\nprobably don't want!  Additionally, other users or developers on your\nproject would run into issues if they do not have their folders set up\nexactly the same as yours.\n\nIf you are adding a _new_ dependency as a link, you should add it to the\nrelevant metadata by running `npm install <dep> --package-lock-only`.\n\nIf you _want_ to save the `file:` reference in your `package.json` and\n`package-lock.json` files, you can use `npm link <dep> --save` to do so.\n\n### Workspace Usage\n\n`npm link <pkg> --workspace <name>` will link the relevant package as a\ndependency of the specified workspace(s).  Note that It may actually be\nlinked into the parent project's `node_modules` folder, if there are no\nconflicting dependencies.\n\n`npm link --workspace <name>` will create a global link to the specified\nworkspace(s).\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\npackage.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm developers](/cli/v7/using-npm/developers)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"4a34b301-60e9-5e2c-98c9-e947c9c556b6","frontmatter":{"title":"npm-logout"},"rawBody":"---\ntitle: npm-logout\nsection: 1\ndescription: Log out of the registry\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-logout.md\n---\n\n### Synopsis\n\n```bash\nnpm logout [--registry=<url>] [--scope=<@scope>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nWhen logged into a registry that supports token-based authentication, tell\nthe server to end this token's session. This will invalidate the token\neverywhere you're using it, not just for the current environment.\n\nWhen logged into a legacy registry that uses username and password\nauthentication, this will clear the credentials in your user configuration.\nIn this case, it will _only_ affect the current environment.\n\nIf `--scope` is provided, this will find the credentials for the registry\nconnected to that scope, if set.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n"},{"id":"4af5ca60-bb04-5463-9403-3fca0b0f73b3","frontmatter":{"title":"npm-ls"},"rawBody":"---\ntitle: npm-ls\nsection: 1\ndescription: List installed packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-ls.md\n---\n\n### Synopsis\n\n```bash\nnpm ls [[<@scope>/]<pkg> ...]\n\naliases: list, la, ll\n```\n\n### Description\n\nThis command will print to stdout all the versions of packages that are\ninstalled, as well as their dependencies when `--all` is specified, in a\ntree structure.\n\nNote: to get a \"bottoms up\" view of why a given package is included in the\ntree at all, use [`npm explain`](/cli/v7/commands/npm-explain).\n\nPositional arguments are `name@version-range` identifiers, which will limit\nthe results to only the paths to the packages named.  Note that nested\npackages will *also* show the paths to the specified packages.  For\nexample, running `npm ls promzard` in npm's source tree will show:\n\n```bash\nnpm@7.24.2 /path/to/npm\n└─┬ init-package-json@0.0.4\n  └── promzard@0.1.5\n```\n\nIt will print out extraneous, missing, and invalid packages.\n\nIf a project specifies git urls for dependencies these are shown\nin parentheses after the name@version to make it easier for users to\nrecognize potential forks of a project.\n\nThe tree shown is the logical dependency tree, based on package\ndependencies, not the physical layout of your `node_modules` folder.\n\nWhen run as `ll` or `la`, it shows extended information by default.\n\n### Note: Design Changes Pending\n\nThe `npm ls` command's output and behavior made a _ton_ of sense when npm\ncreated a `node_modules` folder that naively nested every dependency.  In\nsuch a case, the logical dependency graph and physical tree of packages on\ndisk would be roughly identical.\n\nWith the advent of automatic install-time deduplication of dependencies in\nnpm v3, the `ls` output was modified to display the logical dependency\ngraph as a tree structure, since this was more useful to most users.\nHowever, without using `npm ls -l`, it became impossible show _where_ a\npackage was actually installed much of the time!\n\nWith the advent of automatic installation of `peerDependencies` in npm v7,\nthis gets even more curious, as `peerDependencies` are logically\n\"underneath\" their dependents in the dependency graph, but are always\nphysically at or above their location on disk.\n\nAlso, in the years since npm got an `ls` command (in version 0.0.2!),\ndependency graphs have gotten much larger as a general rule.  Therefore, in\norder to avoid dumping an excessive amount of content to the terminal, `npm\nls` now only shows the _top_ level dependencies, unless `--all` is\nprovided.\n\nA thorough re-examination of the use cases, intention, behavior, and output\nof this command, is currently underway.  Expect significant changes to at\nleast the default human-readable `npm ls` output in npm v8.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `depth`\n\n* Default: `Infinity` if `--all` is set, otherwise `1`\n* Type: null or Number\n\nThe depth to go when recursing packages for `npm ls`.\n\nIf not set, `npm ls` will show only the immediate dependencies of the root\nproject. If `--all` is set, then npm will show all dependencies by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `link`\n\n* Default: false\n* Type: Boolean\n\nUsed with `npm ls`, limiting output to only those packages that are linked.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm explain](/cli/v7/commands/npm-explain)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm explain](/cli/v7/commands/npm-explain)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm link](/cli/v7/commands/npm-link)\n* [npm prune](/cli/v7/commands/npm-prune)\n* [npm outdated](/cli/v7/commands/npm-outdated)\n* [npm update](/cli/v7/commands/npm-update)\n"},{"id":"c8b0e66a-af1d-5858-830e-0a4cdbbe44d2","frontmatter":{"title":"npm-org"},"rawBody":"---\ntitle: npm-org\nsection: 1\ndescription: Manage orgs\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-org.md\n---\n\n### Synopsis\n\n```bash\nnpm org set <orgname> <username> [developer | admin | owner]\nnpm org rm <orgname> <username>\nnpm org ls <orgname> [<username>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Example\n\nAdd a new developer to an org:\n\n```bash\n$ npm org set my-org @mx-smith\n```\n\nAdd a new admin to an org (or change a developer to an admin):\n\n```bash\n$ npm org set my-org @mx-santos admin\n```\n\nRemove a user from an org:\n\n```bash\n$ npm org rm my-org mx-santos\n```\n\nList all users in an org:\n\n```bash\n$ npm org ls my-org\n```\n\nList all users in JSON format:\n\n```bash\n$ npm org ls my-org --json\n```\n\nSee what role a user has in an org:\n\n```bash\n$ npm org ls my-org @mx-santos\n```\n\n### Description\n\nYou can use the `npm org` commands to manage and view users of an\norganization.  It supports adding and removing users, changing their roles,\nlisting them, and finding specific ones and their roles.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [using orgs](/cli/v7/using-npm/orgs)\n* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)\n"},{"id":"9beb317a-26e0-5015-be47-f4ee9420dbfd","frontmatter":{"title":"npm-outdated"},"rawBody":"---\ntitle: npm-outdated\nsection: 1\ndescription: Check for outdated packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-outdated.md\n---\n\n### Synopsis\n\n```bash\nnpm outdated [[<@scope>/]<pkg> ...]\n```\n\n### Description\n\nThis command will check the registry to see if any (or, specific) installed\npackages are currently outdated.\n\nBy default, only the direct dependencies of the root project and direct\ndependencies of your configured *workspaces* are shown.\nUse `--all` to find all outdated meta-dependencies as well.\n\nIn the output:\n\n* `wanted` is the maximum version of the package that satisfies the semver\n  range specified in `package.json`. If there's no available semver range\n  (i.e.  you're running `npm outdated --global`, or the package isn't\n  included in `package.json`), then `wanted` shows the currently-installed\n  version.\n* `latest` is the version of the package tagged as latest in the registry.\n  Running `npm publish` with no special configuration will publish the\n  package with a dist-tag of `latest`. This may or may not be the maximum\n  version of the package, or the most-recently published version of the\n  package, depending on how the package's developer manages the latest\n  [dist-tag](/cli/v7/commands/npm-dist-tag).\n* `location` is where in the physical tree the package is located.\n* `depended by` shows which package depends on the displayed dependency\n* `package type` (when using `--long` / `-l`) tells you whether this\n  package is a `dependency` or a dev/peer/optional dependency. Packages not\n  included in `package.json` are always marked `dependencies`.\n* `homepage` (when using `--long` / `-l`) is the `homepage` value contained\n  in the package's packument\n* Red means there's a newer version matching your semver requirements, so\n  you should update now.\n* Yellow indicates that there's a newer version _above_ your semver\n  requirements (usually new major, or new 0.x minor) so proceed with\n  caution.\n\n### An example\n\n```bash\n$ npm outdated\nPackage      Current   Wanted   Latest  Location                  Depended by\nglob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name\nnothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name\nnpm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name\nlocal-dev      0.0.3   linked   linked  local-dev                 dependent-package-name\nonce           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name\n```\n\nWith these `dependencies`:\n```json\n{\n  \"glob\": \"^5.0.15\",\n  \"nothingness\": \"github:othiym23/nothingness#master\",\n  \"npm\": \"^3.5.1\",\n  \"once\": \"^1.3.1\"\n}\n```\n\nA few things to note:\n\n* `glob` requires `^5`, which prevents npm from installing `glob@6`, which\n  is outside the semver range.\n* Git dependencies will always be reinstalled, because of how they're\n  specified.  The installed committish might satisfy the dependency\n  specifier (if it's something immutable, like a commit SHA), or it might\n  not, so `npm outdated` and `npm update` have to fetch Git repos to check.\n  This is why currently doing a reinstall of a Git dependency always forces\n  a new clone and install.\n* `npm@3.5.2` is marked as \"wanted\", but \"latest\" is `npm@3.5.1` because\n  npm uses dist-tags to manage its `latest` and `next` release channels.\n  `npm update` will install the _newest_ version, but `npm install npm`\n  (with no semver range) will install whatever's tagged as `latest`.\n* `once` is just plain out of date. Reinstalling `node_modules` from\n  scratch or running `npm update` will bring it up to spec.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm update](/cli/v7/commands/npm-update)\n* [npm dist-tag](/cli/v7/commands/npm-dist-tag)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"00d38971-3902-5c37-8bc5-7de956c879a3","frontmatter":{"title":"npm-owner"},"rawBody":"---\ntitle: npm-owner\nsection: 1\ndescription: Manage package owners\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-owner.md\n---\n\n### Synopsis\n\n```bash\nnpm owner add <user> [<@scope>/]<pkg>\nnpm owner rm <user> [<@scope>/]<pkg>\nnpm owner ls [<@scope>/]<pkg>\n\naliases: author\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nManage ownership of published packages.\n\n* ls: List all the users who have access to modify a package and push new\n  versions.  Handy when you need to know who to bug for help.\n* add: Add a new user as a maintainer of a package.  This user is enabled\n  to modify metadata, publish new versions, and add other owners.\n* rm: Remove a user from the package owner list.  This immediately revokes\n  their privileges.\n\nNote that there is only one level of access.  Either you can modify a package,\nor you can't.  Future versions may contain more fine-grained access levels, but\nthat is not implemented at this time.\n\nIf you have two-factor authentication enabled with `auth-and-writes` (see\n[`npm-profile`](/cli/v7/commands/npm-profile)) then you'll need to include an otp\non the command line when changing ownership with `--otp`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm profile](/cli/v7/commands/npm-profile)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n"},{"id":"464f419c-d9f4-57e7-b345-8f04bbbacbd9","frontmatter":{"title":"npm-pack"},"rawBody":"---\ntitle: npm-pack\nsection: 1\ndescription: Create a tarball from a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-pack.md\n---\n\n### Synopsis\n\n```bash\nnpm pack [[<@scope>/]<pkg>...] [--dry-run] [--json]\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `pack-destination`\n\n* Default: \".\"\n* Type: String\n\nDirectory in which `npm pack` will save tarballs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Description\n\nFor anything that's installable (that is, a package folder, tarball,\ntarball url, git url, name@tag, name@version, name, or scoped name), this\ncommand will fetch it to the cache, copy the tarball to the current working\ndirectory as `<name>-<version>.tgz`, and then write the filenames out to\nstdout.\n\nIf the same package is specified multiple times, then the file will be\noverwritten the second time.\n\nIf no arguments are supplied, then npm packs the current package folder.\n\n### See Also\n\n* [npm-packlist package](http://npm.im/npm-packlist)\n* [npm cache](/cli/v7/commands/npm-cache)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"0e4d156e-c5ad-59ba-8c39-277157e4d8ee","frontmatter":{"title":"npm-ping"},"rawBody":"---\ntitle: npm-ping\nsection: 1\ndescription: Ping npm registry\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-ping.md\n---\n\n### Synopsis\n\n```bash\nnpm ping [--registry <registry>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPing the configured or given npm registry and verify authentication.\nIf it works it will output something like:\n\n```bash\nPing success: {*Details about registry*}\n```\notherwise you will get:\n```bash\nPing error: {*Detail about error}\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm doctor](/cli/v7/commands/npm-doctor)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"a47600b4-6983-5f75-af01-f17a8383d648","frontmatter":{"title":"npm-prefix"},"rawBody":"---\ntitle: npm-prefix\nsection: 1\ndescription: Display prefix\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-prefix.md\n---\n\n### Synopsis\n\n```bash\nnpm prefix [-g]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPrint the local prefix to standard output. This is the closest parent directory\nto contain a `package.json` file or `node_modules` directory, unless `-g` is\nalso specified.\n\nIf `-g` is specified, this will be the value of the global prefix. See\n[`npm config`](/cli/v7/commands/npm-config) for more detail.\n\n### Example\n\n```bash\nnpm prefix\n/usr/local/projects/foo\n```\n\n```bash\nnpm prefix -g\n/usr/local\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm root](/cli/v7/commands/npm-root)\n* [npm bin](/cli/v7/commands/npm-bin)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"8eb922d0-525e-5d5d-9267-8881ee5e4274","frontmatter":{"title":"npm-profile"},"rawBody":"---\ntitle: npm-profile\nsection: 1\ndescription: Change settings on your registry profile\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-profile.md\n---\n\n### Synopsis\n\n```bash\nnpm profile get [--json|--parseable] [<property>]\nnpm profile set [--json|--parseable] <property> <value>\nnpm profile set password\nnpm profile enable-2fa [auth-and-writes|auth-only]\nnpm profile disable-2fa\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nChange your profile information on the registry.  Note that this command\ndepends on the registry implementation, so third-party registries may not\nsupport this interface.\n\n* `npm profile get [<property>]`: Display all of the properties of your\n  profile, or one or more specific properties.  It looks like:\n\n```bash\n+-----------------+---------------------------+\n| name            | example                   |\n+-----------------+---------------------------+\n| email           | me@example.com (verified) |\n+-----------------+---------------------------+\n| two factor auth | auth-and-writes           |\n+-----------------+---------------------------+\n| fullname        | Example User              |\n+-----------------+---------------------------+\n| homepage        |                           |\n+-----------------+---------------------------+\n| freenode        |                           |\n+-----------------+---------------------------+\n| twitter         |                           |\n+-----------------+---------------------------+\n| github          |                           |\n+-----------------+---------------------------+\n| created         | 2015-02-26T01:38:35.892Z  |\n+-----------------+---------------------------+\n| updated         | 2017-10-02T21:29:45.922Z  |\n+-----------------+---------------------------+\n```\n\n* `npm profile set <property> <value>`: Set the value of a profile\n  property. You can set the following properties this way: email, fullname,\n  homepage, freenode, twitter, github\n\n* `npm profile set password`: Change your password.  This is interactive,\n  you'll be prompted for your current password and a new password.  You'll\n  also be prompted for an OTP if you have two-factor authentication\n  enabled.\n\n* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor\n  authentication. Defaults to `auth-and-writes` mode. Modes are:\n  * `auth-only`: Require an OTP when logging in or making changes to your\n    account's authentication.  The OTP will be required on both the website\n    and the command line.\n  * `auth-and-writes`: Requires an OTP at all the times `auth-only` does,\n    and also requires one when publishing a module, setting the `latest`\n    dist-tag, or changing access via `npm access` and `npm owner`.\n\n* `npm profile disable-2fa`: Disables two-factor authentication.\n\n### Details\n\nSome of these commands may not be available on non npmjs.com registries.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm token](/cli/v7/commands/npm-token)\n"},{"id":"2b7c3fe7-6405-5a9e-892d-4ff8cea7eb9c","frontmatter":{"title":"npm-prune"},"rawBody":"---\ntitle: npm-prune\nsection: 1\ndescription: Remove extraneous packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-prune.md\n---\n\n### Synopsis\n\n```bash\nnpm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]\n```\n\n### Description\n\nThis command removes \"extraneous\" packages.  If a package name is provided,\nthen only packages matching one of the supplied names are removed.\n\nExtraneous packages are those present in the `node_modules` folder that are\nnot listed as any package's dependency list.\n\nIf the `--production` flag is specified or the `NODE_ENV` environment\nvariable is set to `production`, this command will remove the packages\nspecified in your `devDependencies`. Setting `--no-production` will negate\n`NODE_ENV` being set to `production`.\n\nIf the `--dry-run` flag is used then no changes will actually be made.\n\nIf the `--json` flag is used, then the changes `npm prune` made (or would\nhave made with `--dry-run`) are printed as a JSON object.\n\nIn normal operation, extraneous modules are pruned automatically, so you'll\nonly need this command with the `--production` flag.  However, in the real\nworld, operation is not always \"normal\".  When crashes or mistakes happen,\nthis command can help clean up any resulting garbage.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm uninstall](/cli/v7/commands/npm-uninstall)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm ls](/cli/v7/commands/npm-ls)\n"},{"id":"a743a29a-5b4f-559b-912f-7f05f7f26137","frontmatter":{"title":"npm-publish"},"rawBody":"---\ntitle: npm-publish\nsection: 1\ndescription: Publish a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-publish.md\n---\n\n### Synopsis\n\n```bash\nnpm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]\n\nPublishes '.' if no argument supplied\nSets tag 'latest' if no --tag specified\n```\n\n### Description\n\nPublishes a package to the registry so that it can be installed by name.\n\nBy default npm will publish to the public registry. This can be overridden\nby specifying a different default registry or using a\n[`scope`](/cli/v7/using-npm/scope) in the name (see\n[`package.json`](/cli/v7/configuring-npm/package-json)).\n\n* `<folder>`: A folder containing a package.json file\n\n* `<tarball>`: A url or file path to a gzipped tar archive containing a\n  single folder with a package.json file inside.\n\n* `[--tag <tag>]`: Registers the published package with the given tag, such\n  that `npm install <name>@<tag>` will install this version.  By default,\n  `npm publish` updates and `npm install` installs the `latest` tag. See\n  [`npm-dist-tag`](npm-dist-tag) for details about tags.\n\n* `[--access <public|restricted>]`: Tells the registry whether this package\n  should be published as public or restricted. Only applies to scoped\n  packages, which default to `restricted`.  If you don't have a paid\n  account, you must publish with `--access public` to publish scoped\n  packages.\n\n* `[--otp <otpcode>]`: If you have two-factor authentication enabled in\n  `auth-and-writes` mode then you can provide a code from your\n  authenticator with this. If you don't include this and you're running\n  from a TTY then you'll be prompted.\n\n* `[--dry-run]`: As of `npm@6`, does everything publish would do except\n  actually publishing to the registry. Reports the details of what would\n  have been published.\n\n* `[--workspaces]`: Enables workspace context while publishing. All\n  workspace packages will be published.\n\n* `[--workspace]`: Enables workspaces context and limits results to only\n  those specified by this config item.  Only the packages in the\n  workspaces given will be published.\n\nThe publish will fail if the package name and version combination already\nexists in the specified registry.\n\nOnce a package is published with a given name and version, that specific\nname and version combination can never be used again, even if it is removed\nwith [`npm unpublish`](/cli/v7/commands/npm-unpublish).\n\nAs of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the\ntarball will be submitted to the registry during publication. Subsequent\ninstalls will use the strongest supported algorithm to verify downloads.\n\nSimilar to `--dry-run` see [`npm pack`](/cli/v7/commands/npm-pack), which figures\nout the files to be included and packs them into a tarball to be uploaded\nto the registry.\n\n### Files included in package\n\nTo see what will be included in your package, run `npx npm-packlist`.  All\nfiles are included by default, with the following exceptions:\n\n- Certain files that are relevant to package installation and distribution\n  are always included.  For example, `package.json`, `README.md`,\n  `LICENSE`, and so on.\n\n- If there is a \"files\" list in\n  [`package.json`](/cli/v7/configuring-npm/package-json), then only the files\n  specified will be included.  (If directories are specified, then they\n  will be walked recursively and their contents included, subject to the\n  same ignore rules.)\n\n- If there is a `.gitignore` or `.npmignore` file, then ignored files in\n  that and all child directories will be excluded from the package.  If\n  _both_ files exist, then the `.gitignore` is ignored, and only the\n  `.npmignore` is used.\n\n  `.npmignore` files follow the [same pattern\n  rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)\n  as `.gitignore` files\n\n- If the file matches certain patterns, then it will _never_ be included,\n  unless explicitly added to the `\"files\"` list in `package.json`, or\n  un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file.\n\n- Symbolic links are never included in npm packages.\n\n\nSee [`developers`](/cli/v7/using-npm/developers) for full details on what's\nincluded in the published package, as well as details on how the package is\nbuilt.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `access`\n\n* Default: 'restricted' for scoped packages, 'public' for unscoped packages\n* Type: null, \"restricted\", or \"public\"\n\nWhen publishing scoped packages, the access level defaults to `restricted`.\nIf you want your scoped package to be publicly viewable (and installable)\nset `--access=public`. The only valid values for `access` are `public` and\n`restricted`. Unscoped packages _always_ have an access level of `public`.\n\nNote: Using the `--access` flag on the `npm publish` command will only set\nthe package access level on the initial publish of the package. Any\nsubsequent `npm publish` commands using the `--access` flag will not have an\neffect to the access level. To make changes to the access level after the\ninitial publish use `npm access`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm-packlist package](http://npm.im/npm-packlist)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm scope](/cli/v7/using-npm/scope)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm deprecate](/cli/v7/commands/npm-deprecate)\n* [npm dist-tag](/cli/v7/commands/npm-dist-tag)\n* [npm pack](/cli/v7/commands/npm-pack)\n* [npm profile](/cli/v7/commands/npm-profile)\n"},{"id":"3824ff58-799e-594e-bca9-776510c14b93","frontmatter":{"title":"npm-rebuild"},"rawBody":"---\ntitle: npm-rebuild\nsection: 1\ndescription: Rebuild a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-rebuild.md\n---\n\n### Synopsis\n\n```bash\nnpm rebuild [[<@scope>/]<name>[@<version>] ...]\n\nalias: rb\n```\n\n### Description\n\nThis command runs the `npm build` command on the matched folders.  This is\nuseful when you install a new version of node, and must recompile all your\nC++ addons with the new binary.  It is also useful when installing with\n`--ignore-scripts` and `--no-bin-links`, to explicitly choose which\npackages to build and/or link bins.\n\nIf one or more package names (and optionally version ranges) are provided,\nthen only packages with a name and version matching one of the specifiers\nwill be rebuilt.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"887969cc-7751-57a7-a5b5-9c462c18636a","frontmatter":{"title":"npm-repo"},"rawBody":"---\ntitle: npm-repo\nsection: 1\ndescription: Open package repository page in the browser\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-repo.md\n---\n\n### Synopsis\n\n```bash\nnpm repo [<pkgname> [<pkgname> ...]]\n```\n\n### Description\n\nThis command tries to guess at the likely location of a package's\nrepository URL, and then tries to open it using the `--browser` config\nparam. If no package name is provided, it will search for a `package.json`\nin the current folder and use the `repository` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm docs](/cli/v7/commands/npm-docs)\n* [npm config](/cli/v7/commands/npm-config)\n"},{"id":"6c79b87e-77d5-5aad-baed-567fddc64d8e","frontmatter":{"title":"npm-restart"},"rawBody":"---\ntitle: npm-restart\nsection: 1\ndescription: Restart a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-restart.md\n---\n\n### Synopsis\n\n```bash\nnpm restart [-- <args>]\n```\n\n### Description\n\nThis restarts a project.  It is equivalent to running `npm run-script\nrestart`.\n\nIf the current project has a `\"restart\"` script specified in\n`package.json`, then the following scripts will be run:\n\n1. prerestart\n2. restart\n3. postrestart\n\nIf it does _not_ have a `\"restart\"` script specified, but it does have\n`stop` and/or `start` scripts, then the following scripts will be run:\n\n1. prerestart\n2. prestop\n3. stop\n4. poststop\n6. prestart\n7. start\n8. poststart\n9. postrestart\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm stop](/cli/v7/commands/npm-stop)\n* [npm restart](/cli/v7/commands/npm-restart)\n"},{"id":"b39fa7c0-63f8-5144-847a-6c4e6aa8d8ae","frontmatter":{"title":"npm-root"},"rawBody":"---\ntitle: npm-root\nsection: 1\ndescription: Display npm root\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-root.md\n---\n\n### Synopsis\n\n```bash\nnpm root [-g]\n```\n\n### Description\n\nPrint the effective `node_modules` folder to standard out.\n\nUseful for using npm in shell scripts that do things with the\n`node_modules` folder.  For example:\n\n```bash\n#!/bin/bash\nglobal_node_modules=\"$(npm root --global)\"\necho \"Global packages installed in: ${global_node_modules}\"\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prefix](/cli/v7/commands/npm-prefix)\n* [npm bin](/cli/v7/commands/npm-bin)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"5c327b30-18ac-51da-bf25-edc965ba69d3","frontmatter":{"title":"npm-run-script"},"rawBody":"---\ntitle: npm-run-script\nsection: 1\ndescription: Run arbitrary package scripts\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-run-script.md\n---\n\n### Synopsis\n\n```bash\nnpm run-script <command> [--if-present] [--silent] [-- <args>]\nnpm run-script <command> [--workspace=<workspace-name>]\nnpm run-script <command> [--workspaces]\n\naliases: run, rum, urn\n```\n\n### Description\n\nThis runs an arbitrary command from a package's `\"scripts\"` object.  If no\n`\"command\"` is provided, it will list the available scripts.\n\n`run[-script]` is used by the test, start, restart, and stop commands, but\ncan be called directly, as well. When the scripts in the package are\nprinted out, they're separated into lifecycle (test, start, restart) and\ndirectly-run scripts.\n\nAny positional arguments are passed to the specified script.  Use `--` to\npass `-`-prefixed flags and options which would otherwise be parsed by npm.\n\nFor example:\n\n```bash\nnpm run test -- --grep=\"pattern\"\n```\n\nThe arguments will only be passed to the script specified after `npm run`\nand not to any `pre` or `post` script.\n\nThe `env` script is a special built-in command that can be used to list\nenvironment variables that will be available to the script at runtime. If an\n\"env\" command is defined in your package, it will take precedence over the\nbuilt-in.\n\nIn addition to the shell's pre-existing `PATH`, `npm run` adds\n`node_modules/.bin` to the `PATH` provided to scripts. Any binaries\nprovided by locally-installed dependencies can be used without the\n`node_modules/.bin` prefix. For example, if there is a `devDependency` on\n`tap` in your package, you should write:\n\n```bash\n\"scripts\": {\"test\": \"tap test/*.js\"}\n```\n\ninstead of\n\n```bash\n\"scripts\": {\"test\": \"node_modules/.bin/tap test/*.js\"}\n```\n\nThe actual shell your script is run within is platform dependent. By default,\non Unix-like systems it is the `/bin/sh` command, on Windows it is\n`cmd.exe`.\nThe actual shell referred to by `/bin/sh` also depends on the system.\nYou can customize the shell with the `script-shell` configuration.\n\nScripts are run from the root of the package folder, regardless of what the\ncurrent working directory is when `npm run` is called. If you want your\nscript to use different behavior based on what subdirectory you're in, you\ncan use the `INIT_CWD` environment variable, which holds the full path you\nwere in when you ran `npm run`.\n\n`npm run` sets the `NODE` environment variable to the `node` executable\nwith which `npm` is executed.\n\nIf you try to run a script without having a `node_modules` directory and it\nfails, you will be given a warning to run `npm install`, just in case you've\nforgotten.\n\n### Workspaces support\n\nYou may use the `workspace` or `workspaces` configs in order to run an\narbitrary command from a package's `\"scripts\"` object in the context of the\nspecified workspaces. If no `\"command\"` is provided, it will list the available\nscripts for each of these configured workspaces.\n\nGiven a project with configured workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   +-- b\n   |   `-- package.json\n   `-- c\n       `-- package.json\n```\n\nAssuming the workspace configuration is properly set up at the root level\n`package.json` file. e.g:\n\n```\n{\n    \"workspaces\": [ \"./packages/*\" ]\n}\n```\n\nAnd that each of the configured workspaces has a configured `test` script,\nwe can run tests in all of them using the `workspaces` config:\n\n```\nnpm test --workspaces\n```\n\n#### Filtering workspaces\n\nIt's also possible to run a script in a single workspace using the `workspace`\nconfig along with a name or directory path:\n\n```\nnpm test --workspace=a\n```\n\nThe `workspace` config can also be specified multiple times in order to run a\nspecific script in the context of multiple workspaces. When defining values for\nthe `workspace` config in the command line, it also possible to use `-w` as a\nshorthand, e.g:\n\n```\nnpm test -w a -w b\n```\n\nThis last command will run `test` in both `./packages/a` and `./packages/b`\npackages.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `if-present`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not exit with an error code when `run-script` is invoked\nfor a script that isn't defined in the `scripts` section of `package.json`.\nThis option can be used when it's desirable to optionally run a script when\nit's present and fail if the script fails. This is useful, for example, when\nrunning scripts that may only apply for some builds in an otherwise generic\nCI setup.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm restart](/cli/v7/commands/npm-restart)\n* [npm stop](/cli/v7/commands/npm-stop)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"836e67e5-a647-5aa9-87e8-27f56cfdf2e8","frontmatter":{"title":"npm-search"},"rawBody":"---\ntitle: npm-search\nsection: 1\ndescription: Search for packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-search.md\n---\n\n### Synopsis\n\n```bash\nnpm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]\n\naliases: s, se, find\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSearch the registry for packages matching the search terms. `npm search`\nperforms a linear, incremental, lexically-ordered search through package\nmetadata for all files in the registry. If your terminal has color\nsupport, it will further highlight the matches in the results.  This can\nbe disabled with the config item `color`\n\nAdditionally, using the `--searchopts` and `--searchexclude` options\npaired with more search terms will include and exclude further patterns.\nThe main difference between `--searchopts` and the standard search terms\nis that the former does not highlight results in the output and you can\nuse them more fine-grained filtering. Additionally, you can add both of\nthese to your config to change default search filtering behavior.\n\nSearch also allows targeting of maintainers in search results, by prefixing\ntheir npm username with `=`.\n\nIf a term starts with `/`, then it's interpreted as a regular expression\nand supports standard JavaScript RegExp syntax. In this case search will\nignore a trailing `/` .  (Note you must escape or quote many regular\nexpression characters in most shells.)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `color`\n\n* Default: true unless the NO_COLOR environ is set to something other than '0'\n* Type: \"always\" or Boolean\n\nIf false, never shows colors. If `\"always\"` then always shows colors. If\ntrue, then only prints color codes for tty file descriptors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `description`\n\n* Default: true\n* Type: Boolean\n\nShow the description in `npm search`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchopts`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchexclude`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-online`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be forced, making the CLI\nlook for updates immediately even for fresh package data.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-offline`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be bypassed, but missing data\nwill be requested from the server. To force full offline mode, use\n`--offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `offline`\n\n* Default: false\n* Type: Boolean\n\nForce offline mode: no network requests will be done during install. To\nallow the CLI to fill in missing cache data, see `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm view](/cli/v7/commands/npm-view)\n* [npm cache](/cli/v7/commands/npm-cache)\n* https://npm.im/npm-registry-fetch\n"},{"id":"31004e96-d9ed-5493-ad17-2aca30623efe","frontmatter":{"title":"npm-set-script"},"rawBody":"---\ntitle: npm-set-script\nsection: 1\ndescription: Set tasks in the scripts section of package.json\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-set-script.md\n---\n\n### Synopsis\nAn npm command that lets you create a task in the `scripts` section of the `package.json`.\n\n```bash\nnpm set-script [<script>] [<command>]\n```\n\n\n**Example:**\n\n* `npm set-script start \"http-server .\"`\n\n```json\n{\n  \"name\": \"my-project\",\n  \"scripts\": {\n    \"start\": \"http-server .\",\n    \"test\": \"some existing value\"\n  }\n}\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n"},{"id":"5920d16a-49e2-5581-8060-e9503d34982b","frontmatter":{"title":"npm-shrinkwrap"},"rawBody":"---\ntitle: npm-shrinkwrap\nsection: 1\ndescription: Lock down dependency versions for publication\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-shrinkwrap.md\n---\n\n### Synopsis\n\n```bash\nnpm shrinkwrap\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command repurposes `package-lock.json` into a publishable\n`npm-shrinkwrap.json` or simply creates a new one. The file created and\nupdated by this command will then take precedence over any other existing\nor future `package-lock.json` files. For a detailed explanation of the\ndesign and purpose of package locks in npm, see\n[package-lock-json](/cli/v7/configuring-npm/package-lock-json).\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)\n* [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json)\n* [npm ls](/cli/v7/commands/npm-ls)\n"},{"id":"6f29e981-b6f6-5362-b0d4-3352d9ea8e05","frontmatter":{"title":"npm-star"},"rawBody":"---\ntitle: npm-star\nsection: 1\ndescription: Mark your favorite packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-star.md\n---\n\n### Synopsis\n\n```bash\nnpm star [<pkg>...]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n\"Starring\" a package means that you have some interest in it.  It's\na vaguely positive way to show that you care.\n\nIt's a boolean thing. Starring repeatedly has no additional effect.\n\n### More\n\nThere's also these extra commands to help you manage your favorite packages:\n\n#### Unstar\n\nYou can also \"unstar\" a package using [`npm unstar`](/cli/v7/commands/npm-unstar)\n\n\"Unstarring\" is the same thing, but in reverse.\n\n#### Listing stars\n\nYou can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-stars)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm unstar](/cli/v7/commands/npm-unstar)\n* [npm stars](/cli/v7/commands/npm-stars)\n* [npm view](/cli/v7/commands/npm-view)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n"},{"id":"1d6acaae-7a38-5903-a434-336385d928f4","frontmatter":{"title":"npm-stars"},"rawBody":"---\ntitle: npm-stars\nsection: 1\ndescription: View packages marked as favorites\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-stars.md\n---\n\n### Synopsis\n```bash\nnpm stars [<user>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nIf you have starred a lot of neat things and want to find them again\nquickly this command lets you do just that.\n\nYou may also want to see your friend's favorite packages, in this case\nyou will most certainly enjoy this command.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm star](/cli/v7/commands/npm-star)\n* [npm unstar](/cli/v7/commands/npm-unstar)\n* [npm view](/cli/v7/commands/npm-view)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n"},{"id":"c3f4e901-ffcb-54cc-a011-42dc3067d44b","frontmatter":{"title":"npm-start"},"rawBody":"---\ntitle: npm-start\nsection: 1\ndescription: Start a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-start.md\n---\n\n### Synopsis\n\n```bash\nnpm start [-- <args>]\n```\n\n### Description\n\nThis runs a predefined command specified in the `\"start\"` property of\na package's `\"scripts\"` object.\n\nIf the `\"scripts\"` object does not define a  `\"start\"` property, npm\nwill run `node server.js`.\n\nNote that this is different from the default node behavior of running\nthe file specified in a package's `\"main\"` attribute when evoking with\n`node .`\n\nAs of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can\nuse custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v7/commands/npm-run-script) for more details.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node foo.js\"\n  }\n}\n```\n\n```bash\nnpm start\n\n> npm@x.x.x start\n> node foo.js\n\n(foo.js output would be here)\n\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm restart](/cli/v7/commands/npm-restart)\n* [npm stop](/cli/v7/commands/npm-stop)\n"},{"id":"1420fb3a-5e96-5216-a957-9c7aa4c1b1f9","frontmatter":{"title":"npm-stop"},"rawBody":"---\ntitle: npm-stop\nsection: 1\ndescription: Stop a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-stop.md\n---\n\n### Synopsis\n\n```bash\nnpm stop [-- <args>]\n```\n\n### Description\n\nThis runs a predefined command specified in the \"stop\" property of a\npackage's \"scripts\" object.\n\nUnlike with [npm start](/cli/v7/commands/npm-start), there is no default script\nthat will run if the `\"stop\"` property is not defined.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"stop\": \"node bar.js\"\n  }\n}\n```\n\n```bash\nnpm stop\n\n> npm@x.x.x stop\n> node bar.js\n\n(bar.js output would be here)\n\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm restart](/cli/v7/commands/npm-restart)\n"},{"id":"71e84cf3-4495-5f0d-bf37-f3eaaa6feb95","frontmatter":{"title":"npm-team"},"rawBody":"---\ntitle: npm-team\nsection: 1\ndescription: Manage organization teams and team memberships\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-team.md\n---\n\n### Synopsis\n\n```bash\nnpm team create <scope:team>\nnpm team destroy <scope:team>\n\nnpm team add <scope:team> <user>\nnpm team rm <scope:team> <user>\n\nnpm team ls <scope>|<scope:team>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nUsed to manage teams in organizations, and change team memberships. Does not\nhandle permissions for packages.\n\nTeams must always be fully qualified with the organization/scope they belong to\nwhen operating on them, separated by a colon (`:`). That is, if you have a\n`newteam` team in an `org` organization, you must always refer to that team\nas `@org:newteam` in these commands.\n\nIf you have two-factor authentication enabled in `auth-and-writes` mode, then\nyou can provide a code from your authenticator with `[--otp <otpcode>]`.\nIf you don't include this then you will be prompted.\n\n* create / destroy:\n  Create a new team, or destroy an existing one. Note: You cannot remove the\n  `developers` team, <a href=\"https://docs.npmjs.com/about-developers-team\" target=\"_blank\">learn more.</a>\n\n  Here's how to create a new team `newteam` under the `org` org:\n\n  ```bash\n  npm team create @org:newteam\n  ```\n\n  You should see a confirming message such as: `+@org:newteam` once the new\n  team has been created.\n\n* add:\n  Add a user to an existing team.\n\n  Adding a new user `username` to a team named `newteam` under the `org` org:\n\n  ```bash\n  npm team add @org:newteam username\n  ```\n\n  On success, you should see a message: `username added to @org:newteam`\n\n* rm:\n  Using `npm team rm` you can also remove users from a team they belong to.\n\n  Here's an example removing user `username` from `newteam` team\n  in `org` organization:\n\n  ```bash\n  npm team rm @org:newteam username\n  ```\n\n  Once the user is removed a confirmation message is displayed:\n  `username removed from @org:newteam`\n\n* ls:\n  If performed on an organization name, will return a list of existing teams\n  under that organization. If performed on a team, it will instead return a list\n  of all users belonging to that particular team.\n\n  Here's an example of how to list all teams from an org named `org`:\n\n  ```bash\n  npm team ls @org\n  ```\n\n  Example listing all members of a team named `newteam`:\n\n  ```bash\n  npm team ls @org:newteam\n  ```\n\n### Details\n\n`npm team` always operates directly on the current registry, configurable from\nthe command line using `--registry=<registry url>`.\n\nYou must be a *team admin* to create teams and manage team membership, under\nthe given organization. Listing teams and team memberships may be done by\nany member of the organization.\n\nOrganization creation and management of team admins and *organization* members\nis done through the website, not the npm CLI.\n\nTo use teams to manage permissions on packages belonging to your organization,\nuse the `npm access` command to grant or revoke the appropriate permissions.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm access](/cli/v7/commands/npm-access)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm registry](/cli/v7/using-npm/registry)\n"},{"id":"6c462675-8461-5cf4-8193-807919c74acb","frontmatter":{"title":"npm-token"},"rawBody":"---\ntitle: npm-token\nsection: 1\ndescription: Manage your authentication tokens\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-token.md\n---\n\n### Synopsis\n```bash\n  npm token list [--json|--parseable]\n  npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]\n  npm token revoke <id|token>\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis lets you list, create and revoke authentication tokens.\n\n* `npm token list`:\n  Shows a table of all active authentication tokens. You can request\n  this as JSON with `--json` or tab-separated values with `--parseable`.\n\n```bash\n+--------+---------+------------+----------+----------------+\n| id     | token   | created    | read-only | CIDR whitelist |\n+--------+---------+------------+----------+----------------+\n| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |\n+--------+---------+------------+----------+----------------+\n| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |\n+--------+---------+------------+----------+----------------+\n| e0cf92 | 3a436a… | 2017-10-02 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 63eb9d | 74ef35… | 2017-09-28 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 68c2fe | 127e51… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n```\n\n* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:\n  Create a new authentication token. It can be `--read-only`, or accept\n  a list of\n  [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\n  ranges with which to limit use of this token. This will prompt you for\n  your password, and, if you have two-factor authentication enabled, an\n  otp.\n\n  Currently, the cli can not generate automation tokens. Please refer to\n  the [docs\n  website](https://docs.npmjs.com/creating-and-viewing-access-tokens)\n  for more information on generating automation tokens.\n\n```bash\n+----------------+--------------------------------------+\n| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |\n+----------------+--------------------------------------+\n| cidr_whitelist |                                      |\n+----------------+--------------------------------------+\n| readonly       | false                                |\n+----------------+--------------------------------------+\n| created        | 2017-10-02T07:52:24.838Z             |\n+----------------+--------------------------------------+\n```\n\n* `npm token revoke <token|id>`:\n  Immediately removes an authentication token from the registry.  You\n  will no longer be able to use it.  This can accept both complete\n  tokens (such as those you get back from `npm token create`, and those\n  found in your `.npmrc`), and ids as seen in the parseable or json\n  output of `npm token list`.  This will NOT accept the truncated token\n  found in the normal `npm token list` output.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `read-only`\n\n* Default: false\n* Type: Boolean\n\nThis is used to mark a token as unable to publish when configuring limited\naccess tokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cidr`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThis is a list of CIDR address to be used when configuring limited access\ntokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm profile](/cli/v7/commands/npm-profile)\n"},{"id":"320ab1bd-2f0c-541e-ab61-7cf375bea282","frontmatter":{"title":"npm-uninstall"},"rawBody":"---\ntitle: npm-uninstall\nsection: 1\ndescription: Remove a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-uninstall.md\n---\n\n### Synopsis\n\n```bash\nnpm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|--no-save]\n\naliases: remove, rm, r, un, unlink\n```\n\n### Description\n\nThis uninstalls a package, completely removing everything npm installed\non its behalf.\n\nIt also removes the package from the `dependencies`, `devDependencies`,\n`optionalDependencies`, and `peerDependencies` objects in your\n`package.json`.\n\nFuther, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm\nwill update those files as well.\n\n`--no-save` will tell npm not to remove the package from your\n`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files.\n\n`--save` or `-S` will tell npm to remove the package from your\n`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files.\nThis is the default, but you may need to use this if you have for\ninstance `save=false` in your `npmrc` file\n\nIn global mode (ie, with `-g` or `--global` appended to the command),\nit uninstalls the current package context as a global package.\n`--no-save` is ignored in this case.\n\nScope is optional and follows the usual rules for [`scope`](/cli/v7/using-npm/scope).\n\n### Examples\n\n```bash\nnpm uninstall sax\n```\n\n`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or\n`package-lock.json` files.\n\n```bash\nnpm uninstall lodash --no-save\n```\n\n`lodash` will not be removed from your `package.json`,\n`npm-shrinkwrap.json`, or `package-lock.json` files.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\npackage.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prune](/cli/v7/commands/npm-prune)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n"},{"id":"114ebf38-6fbb-5e37-b4ed-194a9aa2c66a","frontmatter":{"title":"npm-pkg"},"rawBody":"---\ntitle: npm-pkg\nsection: 1\ndescription: Manages your package.json\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-pkg.md\n---\n\n### Synopsis\n\n```bash\nnpm pkg get [<field> [.<subfield> ...]]\nnpm pkg set <field>=<value> [.<subfield>=<value> ...]\nnpm pkg delete <field> [.<subfield> ...]\n```\n\n### Description\n\nA command that automates the management of `package.json` files.\n`npm pkg` provide 3 different sub commands that allow you to modify or retrieve\nvalues for given object keys in your `package.json`.\n\nThe syntax to retrieve and set fields is a dot separated representation of\nthe nested object properties to be found within your `package.json`, it's the\nsame notation used in [`npm view`](/cli/v7/commands/npm-view) to retrieve information\nfrom the registry manifest, below you can find more examples on how to use it.\n\nReturned values are always in **json** format.\n\n* `npm pkg get <field>`\n\n    Retrieves a value `key`, defined in your `package.json` file.\n\n    For example, in order to retrieve the name of the current package, you\n    can run:\n\n    ```bash\n    npm pkg get name\n    ```\n\n    It's also possible to retrieve multiple values at once:\n\n    ```bash\n    npm pkg get name version\n    ```\n\n    You can view child fields by separating them with a period. To retrieve\n    the value of a test `script` value, you would run the following command:\n\n    ```bash\n    npm pkg get scripts.test\n    ```\n\n    For fields that are arrays, requesting a non-numeric field will return\n    all of the values from the objects in the list. For example, to get all\n    the contributor emails for a package, you would run:\n\n    ```bash\n    npm pkg get contributors.email\n    ```\n\n    You may also use numeric indices in square braces to specifically select\n    an item in an array field. To just get the email address of the first\n    contributor in the list, you can run:\n\n    ```bash\n    npm pkg get contributors[0].email\n    ```\n\n* `npm pkg set <field>=<value>`\n\n    Sets a `value` in your `package.json` based on the `field` value. When\n    saving to your `package.json` file the same set of rules used during\n    `npm install` and other cli commands that touches the `package.json` file\n    are used, making sure to respect the existing indentation and possibly\n    applying some validation prior to saving values to the file.\n\n    The same syntax used to retrieve values from your package can also be used\n    to define new properties or overriding existing ones, below are some\n    examples of how the dot separated syntax can be used to edit your\n    `package.json` file.\n\n    Defining a new bin named `mynewcommand` in your `package.json` that points\n    to a file `cli.js`:\n\n    ```bash\n    npm pkg set bin.mynewcommand=cli.js\n    ```\n\n    Setting multiple fields at once is also possible:\n\n    ```bash\n    npm pkg set description='Awesome package' engines.node='>=10'\n    ```\n\n    It's also possible to add to array values, for example to add a new\n    contributor entry:\n\n    ```bash\n    npm pkg set contributors[0].name='Foo' contributors[0].email='foo@bar.ca'\n    ```\n\n    You may also append items to the end of an array using the special\n    empty bracket notation:\n\n    ```bash\n    npm pkg set contributors[].name='Foo' contributors[].name='Bar'\n    ```\n\n    It's also possible to parse values as json prior to saving them to your\n    `package.json` file, for example in order to set a `\"private\": true`\n    property:\n\n    ```bash\n    npm pkg set private=true --json\n    ```\n\n    It also enables saving values as numbers:\n\n    ```bash\n    npm pkg set tap.timeout=60 --json\n    ```\n\n* `npm pkg delete <key>`\n\n    Deletes a `key` from your `package.json`\n\n    The same syntax used to set values from your package can also be used\n    to remove existing ones. For example, in order to remove a script named\n    build:\n\n    ```bash\n    npm pkg delete scripts.build\n    ```\n\n### Workspaces support\n\nYou can set/get/delete items across your configured workspaces by using the\n`workspace` or `workspaces` config options.\n\nFor example, setting a `funding` value across all configured workspaces\nof a project:\n\n```bash\nnpm pkg set funding=https://example.com --ws\n```\n\nWhen using `npm pkg get` to retrieve info from your configured workspaces, the\nreturned result will be in a json format in which top level keys are the\nnames of each workspace, the values of these keys will be the result values\nreturned from each of the configured workspaces, e.g:\n\n```\nnpm pkg get name version --ws\n{\n  \"a\": {\n    \"name\": \"a\",\n    \"version\": \"1.0.0\"\n  },\n  \"b\": {\n    \"name\": \"b\",\n    \"version\": \"1.0.0\"\n  }\n}\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n## See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm init](/cli/v7/commands/npm-init)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm set-script](/cli/v7/commands/npm-set-script)\n* [workspaces](/cli/v7/using-npm/workspaces)\n"},{"id":"7462132d-117d-5537-bba0-863d414bae64","frontmatter":{"title":"npm-test"},"rawBody":"---\ntitle: npm-test\nsection: 1\ndescription: Test a package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-test.md\n---\n\n### Synopsis\n\n```bash\nnpm test [-- <args>]\n\naliases: t, tst\n```\n\n### Description\n\nThis runs a predefined command specified in the `\"test\"` property of\na package's `\"scripts\"` object.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"test\": \"node test.js\"\n  }\n}\n```\n\n```bash\nnpm test\n> npm@x.x.x test\n> node test.js\n\n(test.js output would be here)\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm restart](/cli/v7/commands/npm-restart)\n* [npm stop](/cli/v7/commands/npm-stop)\n"},{"id":"5baa5b13-d638-524f-96bc-51147bf7f43d","frontmatter":{"title":"npm-unpublish"},"rawBody":"---\ntitle: npm-unpublish\nsection: 1\ndescription: Remove a package from the registry\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-unpublish.md\n---\n\n### Synopsis\n\nTo learn more about how the npm registry treats unpublish, see our <a\nhref=\"https://docs.npmjs.com/policies/unpublish\" target=\"_blank\"\nrel=\"noopener noreferrer\"> unpublish policies</a>\n\n#### Unpublishing a single version of a package\n\n```bash\nnpm unpublish [<@scope>/]<pkg>@<version>\n```\n\n#### Unpublishing an entire package\n\n```bash\nnpm unpublish [<@scope>/]<pkg> --force\n```\n\n### Warning\n\nConsider using the [`deprecate`](/cli/v7/commands/npm-deprecate) command instead,\nif your intent is to encourage users to upgrade, or if you no longer\nwant to maintain a package.\n\n### Description\n\nThis removes a package version from the registry, deleting its entry and\nremoving the tarball.\n\nThe npm registry will return an error if you are not [logged\nin](/cli/v7/commands/npm-adduser).\n\nIf you do not specify a version or if you remove all of a package's\nversions then the registry will remove the root package entry entirely.\n\nEven if you unpublish a package version, that specific name and version\ncombination can never be reused. In order to publish the package again,\nyou must use a new version number. If you unpublish the entire package,\nyou may not publish any new versions of that package until 24 hours have\npassed.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm deprecate](/cli/v7/commands/npm-deprecate)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm owner](/cli/v7/commands/npm-owner)\n* [npm login](/cli/v7/commands/npm-adduser)\n"},{"id":"3beb4345-53ff-574c-831f-ebe19f6b6c73","frontmatter":{"title":"npm-unstar"},"rawBody":"---\ntitle: npm-unstar\nsection: 1\ndescription: Remove an item from your favorite packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-unstar.md\n---\n\n### Synopsis\n\n```bash\nnpm unstar [<pkg>...]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n\"Unstarring\" a package is the opposite of [`npm star`](/cli/v7/commands/npm-star),\nit removes an item from your list of favorite packages.\n\n### More\n\nThere's also these extra commands to help you manage your favorite packages:\n\n#### Star\n\nYou can \"star\" a package using [`npm star`](/cli/v7/commands/npm-star)\n\n#### Listing stars\n\nYou can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-stars)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm star](/cli/v7/commands/npm-star)\n* [npm stars](/cli/v7/commands/npm-stars)\n* [npm view](/cli/v7/commands/npm-view)\n* [npm whoami](/cli/v7/commands/npm-whoami)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n\n"},{"id":"81ab79d5-0d7d-58a5-8dbf-a967653433a5","frontmatter":{"title":"npm-update"},"rawBody":"---\ntitle: npm-update\nsection: 1\ndescription: Update packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-update.md\n---\n\n### Synopsis\n\n```bash\nnpm update [-g] [<pkg>...]\n\naliases: up, upgrade\n```\n\n### Description\n\nThis command will update all the packages listed to the latest version\n(specified by the `tag` config), respecting the semver constraints of\nboth your package and its dependencies (if they also require the same\npackage).\n\nIt will also install missing packages.\n\nIf the `-g` flag is specified, this command will update globally installed\npackages.\n\nIf no package name is specified, all packages in the specified location (global\nor local) will be updated.\n\n### Example\n\nFor the examples below, assume that the current package is `app` and it depends\non dependencies, `dep1` (`dep2`, .. etc.).  The published versions of `dep1`\nare:\n\n```json\n{\n  \"dist-tags\": { \"latest\": \"1.2.2\" },\n  \"versions\": [\n    \"1.2.2\",\n    \"1.2.1\",\n    \"1.2.0\",\n    \"1.1.2\",\n    \"1.1.1\",\n    \"1.0.0\",\n    \"0.4.1\",\n    \"0.4.0\",\n    \"0.2.0\"\n  ]\n}\n```\n\n#### Caret Dependencies\n\nIf `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^1.1.1\"\n}\n```\n\nThen `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and\n`1.2.2` satisfies `^1.1.1`.\n\n#### Tilde Dependencies\n\nHowever, if `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"~1.1.1\"\n}\n```\n\nIn this case, running `npm update` will install `dep1@1.1.2`.  Even though the\n`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is\nequivalent to `>=1.1.1 <1.2.0`.  So the highest-sorting version that satisfies\n`~1.1.1` is used, which is `1.1.2`.\n\n#### Caret Dependencies below 1.0.0\n\nSuppose `app` has a caret dependency on a version below `1.0.0`, for example:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.2.0\"\n}\n```\n\n`npm update` will install `dep1@0.2.0`, because there are no other\nversions which satisfy `^0.2.0`.\n\nIf the dependence were on `^0.4.0`:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.4.0\"\n}\n```\n\nThen `npm update` will install `dep1@0.4.1`, because that is the highest-sorting\nversion that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)\n\n\n#### Subdependencies\n\nSuppose your app now also has a dependency on `dep2`\n\n```json\n{\n  \"name\": \"my-app\",\n  \"dependencies\": {\n      \"dep1\": \"^1.0.0\",\n      \"dep2\": \"1.0.0\"\n  }\n}\n```\n\nand `dep2` itself depends on this limited range of `dep1`\n\n```json\n{\n\"name\": \"dep2\",\n  \"dependencies\": {\n    \"dep1\": \"~1.1.1\"\n  }\n}\n```\n\nThen `npm update` will install `dep1@1.1.2` because that is the highest\nversion that `dep2` allows.  npm will prioritize having a single version\nof `dep1` in your tree rather than two when that single version can\nsatisfy the semver requirements of multiple dependencies in your tree.\nIn this case if you really did need your package to use a newer version\nyou would need to use `npm install`.\n\n\n#### Updating Globally-Installed Packages\n\n`npm update -g` will apply the `update` action to each globally installed\npackage that is `outdated` -- that is, has a version that is different from\n`wanted`.\n\nNote: Globally installed packages are treated as if they are installed with a\ncaret semver range specified. So if you require to update to `latest` you may\nneed to run `npm install -g [<pkg>...]`\n\nNOTE: If a package has been upgraded to a version newer than `latest`, it will\nbe _downgraded_.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm outdated](/cli/v7/commands/npm-outdated)\n* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm ls](/cli/v7/commands/npm-ls)\n"},{"id":"68679a7c-6822-5f52-a542-2dd03dd9f9b7","frontmatter":{"title":"npm-version"},"rawBody":"---\ntitle: npm-version\nsection: 1\ndescription: Bump a package version\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-version.md\n---\n\n### Synopsis\n\n```bash\nnpm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]\n\n'npm [-v | --version]' to print npm version\n'npm view <pkg> version' to view a package's published version\n'npm ls' to inspect current package/dependency versions\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `allow-same-version`\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version\nto the same value as the current version.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `commit-hooks`\n\n* Default: true\n* Type: Boolean\n\nRun git commit hooks when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git-tag-version`\n\n* Default: true\n* Type: Boolean\n\nTag the commit when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `preid`\n\n* Default: \"\"\n* Type: String\n\nThe \"prerelease identifier\" to use as a prefix for the \"prerelease\" part of\na semver. Like the `rc` in `1.2.0-rc.8`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-tag`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will tag the version using\n`-s` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Description\n\nRun this in a package directory to bump the version and write the new data\nback to `package.json`, `package-lock.json`, and, if present,\n`npm-shrinkwrap.json`.\n\nThe `newversion` argument should be a valid semver string, a valid second\nargument to [semver.inc](https://github.com/npm/node-semver#functions) (one\nof `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`,\n`prerelease`), or `from-git`. In the second case, the existing version will\nbe incremented by 1 in the specified field.  `from-git` will try to read\nthe latest git tag, and use that as the new npm version.\n\nIf run in a git repo, it will also create a version commit and tag.  This\nbehavior is controlled by `git-tag-version` (see below), and can be\ndisabled on the command line by running `npm --no-git-tag-version version`.\nIt will fail if the working directory is not clean, unless the `-f` or\n`--force` flag is set.\n\nIf supplied with `-m` or `--message` config option, npm will use it as a\ncommit message when creating a version commit.  If the `message` config\ncontains `%s` then that will be replaced with the resulting version number.\nFor example:\n\n```bash\nnpm version patch -m \"Upgrade to %s for reasons\"\n```\n\nIf the `sign-git-tag` config is set, then the tag will be signed using the\n`-s` flag to git.  Note that you must have a default GPG key set up in your\ngit config for this to work properly.  For example:\n\n```bash\n$ npm config set sign-git-tag true\n$ npm version patch\n\nYou need a passphrase to unlock the secret key for\nuser: \"isaacs (http://blog.izs.me/) <i@izs.me>\"\n2048-bit RSA key, ID 6C481CF6, created 2010-08-31\n\nEnter passphrase:\n```\n\nIf `preversion`, `version`, or `postversion` are in the `scripts` property\nof the package.json, they will be executed as part of running `npm\nversion`.\n\nThe exact order of execution is as follows:\n\n1. Check to make sure the git working directory is clean before we get\n   started.  Your scripts may add files to the commit in future steps.\n   This step is skipped if the `--force` flag is set.\n2. Run the `preversion` script. These scripts have access to the old\n   `version` in package.json.  A typical use would be running your full\n   test suite before deploying.  Any files you want added to the commit\n   should be explicitly added using `git add`.\n3. Bump `version` in `package.json` as requested (`patch`, `minor`,\n   `major`, etc).\n4. Run the `version` script. These scripts have access to the new `version`\n   in package.json (so they can incorporate it into file headers in\n   generated files for example).  Again, scripts should explicitly add\n   generated files to the commit using `git add`.\n5. Commit and tag.\n6. Run the `postversion` script. Use it to clean up the file system or\n   automatically push the commit and/or tag.\n\nTake the following example:\n\n```json\n{\n  \"scripts\": {\n    \"preversion\": \"npm test\",\n    \"version\": \"npm run build && git add -A dist\",\n    \"postversion\": \"git push && git push --tags && rm -rf build/temp\"\n  }\n}\n```\n\nThis runs all your tests and proceeds only if they pass. Then runs your\n`build` script, and adds everything in the `dist` directory to the commit.\nAfter the commit, it pushes the new commit and tag up to the server, and\ndeletes the `build/temp` directory.\n\n### See Also\n\n* [npm init](/cli/v7/commands/npm-init)\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [config](/cli/v7/using-npm/config)\n"},{"id":"51fdf0d7-98e6-5e39-a5ed-72589974fcf4","frontmatter":{"title":"npm-view"},"rawBody":"---\ntitle: npm-view\nsection: 1\ndescription: View registry info\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-view.md\n---\n\n### Synopsis\n\n```bash\nnpm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]\n\naliases: info, show, v\n```\n\n### Description\n\nThis command shows data about a package and prints it to stdout.\n\nAs an example, to view information about the `connect` package from the registry, you would run:\n\n```bash\nnpm view connect\n```\n\nThe default version is `\"latest\"` if unspecified.\n\nField names can be specified after the package descriptor.\nFor example, to show the dependencies of the `ronn` package at version\n`0.3.5`, you could do the following:\n\n```bash\nnpm view ronn@0.3.5 dependencies\n```\n\nYou can view child fields by separating them with a period.\nTo view the git repository URL for the latest version of `npm`, you would run the following command:\n\n```bash\nnpm view npm repository.url\n```\n\nThis makes it easy to view information about a dependency with a bit of\nshell scripting. For example, to view all the data about the version of\n`opts` that `ronn` depends on, you could write the following:\n\n```bash\nnpm view opts@$(npm view ronn dependencies.opts)\n```\n\nFor fields that are arrays, requesting a non-numeric field will return\nall of the values from the objects in the list. For example, to get all\nthe contributor email addresses for the `express` package, you would run:\n\n```bash\nnpm view express contributors.email\n```\n\nYou may also use numeric indices in square braces to specifically select\nan item in an array field. To just get the email address of the first\ncontributor in the list, you can run:\n\n```bash\nnpm view express contributors[0].email\n```\n\nMultiple fields may be specified, and will be printed one after another.\nFor example, to get all the contributor names and email addresses, you\ncan do this:\n\n```bash\nnpm view express contributors.name contributors.email\n```\n\n\"Person\" fields are shown as a string if they would be shown as an\nobject.  So, for example, this will show the list of `npm` contributors in\nthe shortened string format.  (See [`package.json`](/cli/v7/configuring-npm/package-json) for more on this.)\n\n```bash\nnpm view npm contributors\n```\n\nIf a version range is provided, then data will be printed for every\nmatching version of the package.  This will show which version of `jsdom`\nwas required by each matching version of `yui3`:\n\n```bash\nnpm view yui3@'>0.5.4' dependencies.jsdom\n```\n\nTo show the `connect` package version history, you can do\nthis:\n\n```bash\nnpm view connect versions\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Output\n\nIf only a single string field for a single version is output, then it\nwill not be colorized or quoted, to enable piping the output to\nanother command. If the field is an object, it will be output as a JavaScript object literal.\n\nIf the `--json` flag is given, the outputted fields will be JSON.\n\nIf the version range matches multiple versions then each printed value\nwill be prefixed with the version it applies to.\n\nIf multiple fields are requested, then each of them is prefixed with\nthe field name.\n\n### See Also\n\n* [npm search](/cli/v7/commands/npm-search)\n* [npm registry](/cli/v7/using-npm/registry)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm docs](/cli/v7/commands/npm-docs)\n"},{"id":"9a411c16-6bdf-5624-86c4-530ad73d8737","frontmatter":{"title":"npm-whoami"},"rawBody":"---\ntitle: npm-whoami\nsection: 1\ndescription: Display npm username\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm-whoami.md\n---\n\n### Synopsis\n\n```bash\nnpm whoami [--registry <registry>]\n```\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nDisplay the npm username of the currently logged-in user.\n\nIf logged into a registry that provides token-based authentication, then\nconnect to the `/-/whoami` registry endpoint to find the username\nassociated with the token, and print to standard output.\n\nIf logged into a registry that uses Basic Auth, then simply print the\n`username` portion of the authentication string.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n"},{"id":"c67d2d8a-d4d7-5914-a105-b11284989c63","frontmatter":{"title":"npm"},"rawBody":"---\ntitle: npm\nsection: 1\ndescription: javascript package manager\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npm.md\n---\n\n### Synopsis\n\n```bash\nnpm <command> [args]\n```\n\n### Version\n\n7.24.2\n\n### Description\n\nnpm is the package manager for the Node JavaScript platform.  It puts\nmodules in place so that node can find them, and manages dependency\nconflicts intelligently.\n\nIt is extremely configurable to support a variety of use cases.  Most\ncommonly, you use it to publish, discover, install, and develop node\nprograms.\n\nRun `npm help` to get a list of available commands.\n\n### Important\n\nnpm comes preconfigured to use npm's public registry at\nhttps://registry.npmjs.org by default. Use of the npm public registry is\nsubject to terms of use available at\nhttps://docs.npmjs.com/policies/terms.\n\nYou can configure npm to use any compatible registry you like, and even\nrun your own registry. Use of someone else's registry is governed by\ntheir terms of use.\n\n### Introduction\n\nYou probably got npm because you want to install stuff.\n\nThe very first thing you will most likely want to run in any node\nprogram is `npm install` to install its dependencies.\n\nYou can also run `npm install blerg` to install the latest version of\n\"blerg\".  Check out [`npm install`](/cli/v7/commands/npm-install) for more\ninfo.  It can do a lot of stuff.\n\nUse the `npm search` command to show everything that's available in the\npublic registry.  Use `npm ls` to show everything you've installed.\n\n### Dependencies\n\nIf a package lists a dependency using a git URL, npm will install that\ndependency using the [`git`](https://github.com/git-guides/install-git)\ncommand and will generate an error if it is not installed.\n\nIf one of the packages npm tries to install is a native node module and\nrequires compiling of C++ Code, npm will use\n[node-gyp](https://github.com/nodejs/node-gyp) for that task.\nFor a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)\nneeds Python, make and a buildchain like GCC. On Windows,\nPython and Microsoft Visual Studio C++ are needed. For more information\nvisit [the node-gyp repository](https://github.com/nodejs/node-gyp) and\nthe [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).\n\n### Directories\n\nSee [`folders`](/cli/v7/configuring-npm/folders) to learn about where npm puts\nstuff.\n\nIn particular, npm has two modes of operation:\n\n* local mode:\n  npm installs packages into the current project directory, which\n  defaults to the current working directory.  Packages install to\n  `./node_modules`, and bins to `./node_modules/.bin`.\n* global mode:\n  npm installs packages into the install prefix at\n  `$npm_config_prefix/lib/node_modules` and bins to\n  `$npm_config_prefix/bin`.\n\nLocal mode is the default.  Use `-g` or `--global` on any command to\nrun in global mode instead.\n\n### Developer Usage\n\nIf you're using npm to develop and publish your code, check out the\nfollowing help topics:\n\n* json:\n  Make a package.json file.  See\n  [`package.json`](/cli/v7/configuring-npm/package-json).\n* link:\n  Links your current working code into Node's path, so that you don't\n  have to reinstall every time you make a change.  Use [`npm\n  link`](/cli/v7/commands/npm-link) to do this.\n* install:\n  It's a good idea to install things if you don't need the symbolic\n  link.  Especially, installing other peoples code from the registry is\n  done via [`npm install`](/cli/v7/commands/npm-install)\n* adduser:\n  Create an account or log in.  When you do this, npm will store\n  credentials in the user config file config file.\n* publish:\n  Use the [`npm publish`](/cli/v7/commands/npm-publish) command to upload your\n  code to the registry.\n\n#### Configuration\n\nnpm is extremely configurable.  It reads its configuration options from\n5 places.\n\n* Command line switches:\n  Set a config with `--key val`.  All keys take a value, even if they\n  are booleans (the config parser doesn't know what the options are at\n  the time of parsing).  If you do not provide a value (`--key`) then\n  the option is set to boolean `true`.\n* Environment Variables:\n  Set any config by prefixing the name in an environment variable with\n  `npm_config_`.  For example, `export npm_config_key=val`.\n* User Configs:\n  The file at `$HOME/.npmrc` is an ini-formatted list of configs.  If\n  present, it is parsed.  If the `userconfig` option is set in the cli\n  or env, that file will be used instead.\n* Global Configs:\n  The file found at `./etc/npmrc` (relative to the global prefix will be\n  parsed if it is found.  See [`npm prefix`](/cli/v7/commands/npm-prefix) for\n  more info on the global prefix.  If the `globalconfig` option is set\n  in the cli, env, or user config, then that file is parsed instead.\n* Defaults:\n  npm's default configuration options are defined in\n  lib/utils/config-defs.js.  These must not be changed.\n\nSee [`config`](/cli/v7/using-npm/config) for much much more information.\n\n### Contributions\n\nPatches welcome!\n\nIf you would like to help, but don't know what to work on, read the\n[contributing\nguidelines](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) and\ncheck the issues list.\n\n### Bugs\n\nWhen you find issues, please report them:\n<https://github.com/npm/cli/issues>\n\nPlease be sure to follow the template and bug reporting guidelines.\n\n### Feature Requests\n\nDiscuss new feature ideas on our discussion forum:\n\n* <https://github.com/npm/feedback>\n\nOr suggest formal RFC proposals:\n\n* <https://github.com/npm/rfcs>\n\n### See Also\n\n* [npm help](/cli/v7/commands/npm-help)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm prefix](/cli/v7/commands/npm-prefix)\n* [npm publish](/cli/v7/commands/npm-publish)\n"},{"id":"4951d9e9-e6f0-515f-919b-3b241a4a77df","frontmatter":{"title":"npx"},"rawBody":"---\ntitle: npx\nsection: 1\ndescription: Run a command from a local or remote npm package\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/commands/npx.md\n---\n\n### Synopsis\n\n```bash\nnpm exec -- <pkg>[@<version>] [args...]\nnpm exec --package=<pkg>[@<version>] -- <cmd> [args...]\nnpm exec -c '<cmd> [args...]'\nnpm exec --package=foo -c '<cmd> [args...]'\n\nnpx <pkg>[@<specifier>] [args...]\nnpx -p <pkg>[@<specifier>] <cmd> [args...]\nnpx -c '<cmd> [args...]'\nnpx -p <pkg>[@<specifier>] -c '<cmd> [args...]'\n\nalias: npm x, npx\n\n--package=<pkg> (may be specified multiple times)\n-p is a shorthand for --package only when using npx executable\n-c <cmd> --call=<cmd> (may not be mixed with positional arguments)\n```\n\n### Description\n\nThis command allows you to run an arbitrary command from an npm package\n(either one installed locally, or fetched remotely), in a similar context\nas running it via `npm run`.\n\nWhatever packages are specified by the `--package` option will be\nprovided in the `PATH` of the executed command, along with any locally\ninstalled package executables.  The `--package` option may be\nspecified multiple times, to execute the supplied command in an environment\nwhere all specified packages are available.\n\nIf any requested packages are not present in the local project\ndependencies, then they are installed to a folder in the npm cache, which\nis added to the `PATH` environment variable in the executed process.  A\nprompt is printed (which can be suppressed by providing either `--yes` or\n`--no`).\n\nPackage names provided without a specifier will be matched with whatever\nversion exists in the local project.  Package names with a specifier will\nonly be considered a match if they have the exact same name and version as\nthe local dependency.\n\nIf no `-c` or `--call` option is provided, then the positional arguments\nare used to generate the command string.  If no `--package` options\nare provided, then npm will attempt to determine the executable name from\nthe package specifier provided as the first positional argument according\nto the following heuristic:\n\n- If the package has a single entry in its `bin` field in `package.json`,\n  or if all entries are aliases of the same command, then that command\n  will be used.\n- If the package has multiple `bin` entries, and one of them matches the\n  unscoped portion of the `name` field, then that command will be used.\n- If this does not result in exactly one option (either because there are\n  no bin entries, or none of them match the `name` of the package), then\n  `npm exec` exits with an error.\n\nTo run a binary _other than_ the named binary, specify one or more\n`--package` options, which will prevent npm from inferring the package from\nthe first command argument.\n\n### `npx` vs `npm exec`\n\nWhen run via the `npx` binary, all flags and options *must* be set prior to\nany positional arguments.  When run via `npm exec`, a double-hyphen `--`\nflag can be used to suppress npm's parsing of switches and options that\nshould be sent to the executed command.\n\nFor example:\n\n```\n$ npx foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will resolve the `foo` package name, and run the\nfollowing command:\n\n```\n$ foo bar --package=@npmcli/foo\n```\n\nSince the `--package` option comes _after_ the positional arguments, it is\ntreated as an argument to the executed command.\n\nIn contrast, due to npm's argument parsing logic, running this command is\ndifferent:\n\n```\n$ npm exec foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will parse the `--package` option first, resolving the\n`@npmcli/foo` package.  Then, it will execute the following command in that\ncontext:\n\n```\n$ foo@latest bar\n```\n\nThe double-hyphen character is recommended to explicitly tell npm to stop\nparsing command line options and switches.  The following command would\nthus be equivalent to the `npx` command above:\n\n```\n$ npm exec -- foo@latest bar --package=@npmcli/foo\n```\n\n### Examples\n\nRun the version of `tap` in the local dependencies, with the provided\narguments:\n\n```\n$ npm exec -- tap --bail test/foo.js\n$ npx tap --bail test/foo.js\n```\n\nRun a command _other than_ the command whose name matches the package name\nby specifying a `--package` option:\n\n```\n$ npm exec --package=foo -- bar --bar-argument\n# ~ or ~\n$ npx --package=foo bar --bar-argument\n```\n\nRun an arbitrary shell script, in the context of the current project:\n\n```\n$ npm x -c 'eslint && say \"hooray, lint passed\"'\n$ npx -c 'eslint && say \"hooray, lint passed\"'\n```\n\n### Compatibility with Older npx Versions\n\nThe `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`\npackage deprecated at that time.  `npx` uses the `npm exec`\ncommand instead of a separate argument parser and install process, with\nsome affordances to maintain backwards compatibility with the arguments it\naccepted in previous versions.\n\nThis resulted in some shifts in its functionality:\n\n- Any `npm` config value may be provided.\n- To prevent security and user-experience problems from mistyping package\n  names, `npx` prompts before installing anything.  Suppress this\n  prompt with the `-y` or `--yes` option.\n- The `--no-install` option is deprecated, and will be converted to `--no`.\n- Shell fallback functionality is removed, as it is not advisable.\n- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand\n  for `--package` in npx.  This is maintained, but only for the `npx`\n  executable.\n- The `--ignore-existing` option is removed.  Locally installed bins are\n  always present in the executed process `PATH`.\n- The `--npm` option is removed.  `npx` will always use the `npm` it ships\n  with.\n- The `--node-arg` and `-n` options are removed.\n- The `--always-spawn` option is redundant, and thus removed.\n- The `--shell` option is replaced with `--script-shell`, but maintained\n  in the `npx` executable for backwards compatibility.\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm test](/cli/v7/commands/npm-test)\n* [npm start](/cli/v7/commands/npm-start)\n* [npm restart](/cli/v7/commands/npm-restart)\n* [npm stop](/cli/v7/commands/npm-stop)\n* [npm config](/cli/v7/commands/npm-config)\n"},{"id":"c3cdd065-8e5d-57c3-8c93-ffc8c7f2e3df","frontmatter":{"title":"folders"},"rawBody":"---\ntitle: folders\nsection: 5\ndescription: Folder Structures Used by npm\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/folders.md\n---\n\n### Description\n\nnpm puts various things on your computer.  That's its job.\n\nThis document will tell you what it puts where.\n\n#### tl;dr\n\n* Local install (default): puts stuff in `./node_modules` of the current\n  package root.\n* Global install (with `-g`): puts stuff in /usr/local or wherever node\n  is installed.\n* Install it **locally** if you're going to `require()` it.\n* Install it **globally** if you're going to run it on the command line.\n* If you need both, then install it in both places, or use `npm link`.\n\n#### prefix Configuration\n\nThe `prefix` config defaults to the location where node is installed.\nOn most systems, this is `/usr/local`. On Windows, it's `%AppData%\\npm`.\nOn Unix systems, it's one level up, since node is typically installed at\n`{prefix}/bin/node` rather than `{prefix}/node.exe`.\n\nWhen the `global` flag is set, npm installs things into this prefix.\nWhen it is not set, it uses the root of the current package, or the\ncurrent working directory if not in a package already.\n\n#### Node Modules\n\nPackages are dropped into the `node_modules` folder under the `prefix`.\nWhen installing locally, this means that you can\n`require(\"packagename\")` to load its main module, or\n`require(\"packagename/lib/path/to/sub/module\")` to load other modules.\n\nGlobal installs on Unix systems go to `{prefix}/lib/node_modules`.\nGlobal installs on Windows go to `{prefix}/node_modules` (that is, no\n`lib` folder.)\n\nScoped packages are installed the same way, except they are grouped together\nin a sub-folder of the relevant `node_modules` folder with the name of that\nscope prefix by the @ symbol, e.g. `npm install @myorg/package` would place\nthe package in `{prefix}/node_modules/@myorg/package`. See\n[`scope`](/cli/v7/using-npm/scope) for more details.\n\nIf you wish to `require()` a package, then install it locally.\n\n#### Executables\n\nWhen in global mode, executables are linked into `{prefix}/bin` on Unix,\nor directly into `{prefix}` on Windows.  Ensure that path is in your\nterminal's `PATH` environment to run them.\n\nWhen in local mode, executables are linked into\n`./node_modules/.bin` so that they can be made available to scripts run\nthrough npm.  (For example, so that a test runner will be in the path\nwhen you run `npm test`.)\n\n#### Man Pages\n\nWhen in global mode, man pages are linked into `{prefix}/share/man`.\n\nWhen in local mode, man pages are not installed.\n\nMan pages are not installed on Windows systems.\n\n#### Cache\n\nSee [`npm cache`](/cli/v7/commands/npm-cache).  Cache files are stored in `~/.npm` on Posix, or\n`%AppData%/npm-cache` on Windows.\n\nThis is controlled by the `cache` configuration param.\n\n#### Temp Files\n\nTemporary files are stored by default in the folder specified by the\n`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment\nvariables, or `/tmp` on Unix and `c:\\windows\\temp` on Windows.\n\nTemp files are given a unique folder under this root for each run of the\nprogram, and are deleted upon successful exit.\n\n### More Information\n\nWhen installing locally, npm first tries to find an appropriate\n`prefix` folder.  This is so that `npm install foo@1.2.3` will install\nto the sensible root of your package, even if you happen to have `cd`ed\ninto some other folder.\n\nStarting at the $PWD, npm will walk up the folder tree checking for a\nfolder that contains either a `package.json` file, or a `node_modules`\nfolder.  If such a thing is found, then that is treated as the effective\n\"current directory\" for the purpose of running npm commands.  (This\nbehavior is inspired by and similar to git's .git-folder seeking\nlogic when running git commands in a working dir.)\n\nIf no package root is found, then the current folder is used.\n\nWhen you run `npm install foo@1.2.3`, then the package is loaded into\nthe cache, and then unpacked into `./node_modules/foo`.  Then, any of\nfoo's dependencies are similarly unpacked into\n`./node_modules/foo/node_modules/...`.\n\nAny bin files are symlinked to `./node_modules/.bin/`, so that they may\nbe found by npm scripts when necessary.\n\n#### Global Installation\n\nIf the `global` configuration is set to true, then npm will\ninstall packages \"globally\".\n\nFor global installation, packages are installed roughly the same way,\nbut using the folders described above.\n\n#### Cycles, Conflicts, and Folder Parsimony\n\nCycles are handled using the property of node's module system that it\nwalks up the directories looking for `node_modules` folders.  So, at every\nstage, if a package is already installed in an ancestor `node_modules`\nfolder, then it is not installed at the current location.\n\nConsider the case above, where `foo -> bar -> baz`.  Imagine if, in\naddition to that, baz depended on bar, so you'd have:\n`foo -> bar -> baz -> bar -> baz ...`.  However, since the folder\nstructure is: `foo/node_modules/bar/node_modules/baz`, there's no need to\nput another copy of bar into `.../baz/node_modules`, since when it calls\nrequire(\"bar\"), it will get the copy that is installed in\n`foo/node_modules/bar`.\n\nThis shortcut is only used if the exact same\nversion would be installed in multiple nested `node_modules` folders.  It\nis still possible to have `a/node_modules/b/node_modules/a` if the two\n\"a\" packages are different versions.  However, without repeating the\nexact same package multiple times, an infinite regress will always be\nprevented.\n\nAnother optimization can be made by installing dependencies at the\nhighest level possible, below the localized \"target\" folder.\n\n#### Example\n\nConsider this dependency graph:\n\n```bash\nfoo\n+-- blerg@1.2.5\n+-- bar@1.2.3\n|   +-- blerg@1.x (latest=1.3.7)\n|   +-- baz@2.x\n|   |   `-- quux@3.x\n|   |       `-- bar@1.2.3 (cycle)\n|   `-- asdf@*\n`-- baz@1.2.3\n    `-- quux@3.x\n        `-- bar\n```\n\nIn this case, we might expect a folder structure like this:\n\n```bash\nfoo\n+-- node_modules\n    +-- blerg (1.2.5) <---[A]\n    +-- bar (1.2.3) <---[B]\n    |   `-- node_modules\n    |       +-- baz (2.0.2) <---[C]\n    |       |   `-- node_modules\n    |       |       `-- quux (3.2.0)\n    |       `-- asdf (2.3.4)\n    `-- baz (1.2.3) <---[D]\n        `-- node_modules\n            `-- quux (3.2.0) <---[E]\n```\n\nSince foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are\ninstalled in foo's `node_modules` folder.\n\nEven though the latest copy of blerg is 1.3.7, foo has a specific\ndependency on version 1.2.5.  So, that gets installed at [A].  Since the\nparent installation of blerg satisfies bar's dependency on `blerg@1.x`,\nit does not install another copy under [B].\n\nBar [B] also has dependencies on baz and asdf, so those are installed in\nbar's `node_modules` folder.  Because it depends on `baz@2.x`, it cannot\nre-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],\nand must install its own copy [C].\n\nUnderneath bar, the `baz -> quux -> bar` dependency creates a cycle.\nHowever, because bar is already in quux's ancestry [B], it does not\nunpack another copy of bar into that folder.\n\nUnderneath `foo -> baz` [D], quux's [E] folder tree is empty, because its\ndependency on bar is satisfied by the parent folder copy installed at [B].\n\nFor a graphical breakdown of what is installed where, use `npm ls`.\n\n#### Publishing\n\nUpon publishing, npm will look in the `node_modules` folder.  If any of\nthe items there are not in the `bundledDependencies` array, then they will\nnot be included in the package tarball.\n\nThis allows a package maintainer to install all of their dependencies\n(and dev dependencies) locally, but only re-publish those items that\ncannot be found elsewhere.  See [`package.json`](/cli/v7/configuring-npm/package-json) for more information.\n\n### See also\n\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm pack](/cli/v7/commands/npm-pack)\n* [npm cache](/cli/v7/commands/npm-cache)\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [config](/cli/v7/using-npm/config)\n* [npm publish](/cli/v7/commands/npm-publish)\n"},{"id":"c39a8ccf-31b9-54ad-8ec6-380771444e62","frontmatter":{"title":"Configuring npm"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/nav.yml\ntitle: Configuring npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"ac1f7eab-a8a2-596f-bbd5-80f54622556c","frontmatter":{"title":"install"},"rawBody":"---\ntitle: install\nsection: 5\ndescription: Download and install node and npm\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/install.md\n---\n\n### Description\n\nTo publish and install packages to and from the public npm registry, you\nmust install Node.js and the npm command line interface using either a Node\nversion manager or a Node installer. **We strongly recommend using a Node\nversion manager to install Node.js and npm.** We do not recommend using a\nNode installer, since the Node installation process installs npm in a\ndirectory with local permissions and can cause permissions errors when you\nrun npm packages globally.\n\n### Overview\n\n- [Checking your version of npm and\n  Node.js](#checking-your-version-of-npm-and-node-js)\n- [Using a Node version manager to install Node.js and\n  npm](#using-a-node-version-manager-to-install-node-js-and-npm)\n- [Using a Node installer to install Node.js and\n  npm](#using-a-node-installer-to-install-node-js-and-npm)\n\n### Checking your version of npm and Node.js\n\nTo see if you already have Node.js and npm installed and check the\ninstalled version, run the following commands:\n\n```\nnode -v\nnpm -v\n```\n\n### Using a Node version manager to install Node.js and npm\n\nNode version managers allow you to install and switch between multiple\nversions of Node.js and npm on your system so you can test your\napplications on multiple versions of npm to ensure they work for users on\ndifferent versions.\n\n#### OSX or Linux Node version managers\n\n* [nvm](https://github.com/creationix/nvm)\n* [n](https://github.com/tj/n)\n\n#### Windows Node version managers\n\n* [nodist](https://github.com/marcelklehr/nodist)\n* [nvm-windows](https://github.com/coreybutler/nvm-windows)\n\n### Using a Node installer to install Node.js and npm\n\nIf you are unable to use a Node version manager, you can use a Node\ninstaller to install both Node.js and npm on your system.\n\n* [Node.js installer](https://nodejs.org/en/download/)\n* [NodeSource installer](https://github.com/nodesource/distributions). If\n  you use Linux, we recommend that you use a NodeSource installer.\n\n#### OS X or Windows Node installers\n\nIf you're using OS X or Windows, use one of the installers from the\n[Node.js download page](https://nodejs.org/en/download/). Be sure to\ninstall the version labeled **LTS**. Other versions have not yet been\ntested with npm.\n\n#### Linux or other operating systems Node installers\n\nIf you're using Linux or another operating system, use one of the following\ninstallers:\n\n- [NodeSource installer](https://github.com/nodesource/distributions)\n  (recommended)\n- One of the installers on the [Node.js download\n  page](https://nodejs.org/en/download/)\n\nOr see [this page](https://nodejs.org/en/download/package-manager/) to\ninstall npm for Linux in the way many Linux developers prefer.\n\n#### Less-common operating systems\n\nFor more information on installing Node.js on a variety of operating\nsystems, see [this page][pkg-mgr].\n\n[pkg-mgr]: https://nodejs.org/en/download/package-manager/\n"},{"id":"02b4ec89-5fe3-55b0-b6d3-40c19a22b3cb","frontmatter":{"title":"npm-shrinkwrap.json"},"rawBody":"---\ntitle: npm-shrinkwrap.json\nsection: 5\ndescription: A publishable lockfile\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/npm-shrinkwrap-json.md\n---\n\n### Description\n\n`npm-shrinkwrap.json` is a file created by [`npm\nshrinkwrap`](/cli/v7/commands/npm-shrinkwrap). It is identical to\n`package-lock.json`, with one major caveat: Unlike `package-lock.json`,\n`npm-shrinkwrap.json` may be included when publishing a package.\n\nThe recommended use-case for `npm-shrinkwrap.json` is applications deployed\nthrough the publishing process on the registry: for example, daemons and\ncommand-line tools intended as global installs or `devDependencies`. It's\nstrongly discouraged for library authors to publish this file, since that\nwould prevent end users from having control over transitive dependency\nupdates.\n\nIf both `package-lock.json` and `npm-shrinkwrap.json` are present in a\npackage root, `npm-shrinkwrap.json` will be preferred over the\n`package-lock.json` file.\n\nFor full details and description of the `npm-shrinkwrap.json` file format,\nrefer to the manual page for\n[package-lock.json](/cli/v7/configuring-npm/package-lock-json).\n\n### See also\n\n* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)\n* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"2c704256-0af7-555a-9b64-7add3304297d","frontmatter":{"title":"npmrc"},"rawBody":"---\ntitle: npmrc\nsection: 5\ndescription: The npm config files\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/npmrc.md\n---\n\n### Description\n\nnpm gets its config settings from the command line, environment variables,\nand `npmrc` files.\n\nThe `npm config` command can be used to update and edit the contents of the\nuser and global npmrc files.\n\nFor a list of available configuration options, see\n[config](/cli/v7/using-npm/config).\n\n### Files\n\nThe four relevant files are:\n\n* per-project config file (/path/to/my/project/.npmrc)\n* per-user config file (~/.npmrc)\n* global config file ($PREFIX/etc/npmrc)\n* npm builtin config file (/path/to/npm/npmrc)\n\nAll npm config files are an ini-formatted list of `key = value` parameters.\nEnvironment variables can be replaced using `${VARIABLE_NAME}`. For\nexample:\n\n```bash\nprefix = ${HOME}/.npm-packages\n```\n\nEach of these files is loaded, and config options are resolved in priority\norder.  For example, a setting in the userconfig file would override the\nsetting in the globalconfig file.\n\nArray values are specified by adding \"[]\" after the key name. For example:\n\n```bash\nkey[] = \"first value\"\nkey[] = \"second value\"\n```\n\n#### Comments\n\nLines in `.npmrc` files are interpreted as comments when they begin with a\n`;` or `#` character. `.npmrc` files are parsed by\n[npm/ini](https://github.com/npm/ini), which specifies this comment syntax.\n\nFor example:\n\n```bash\n# last modified: 01 Jan 2016\n; Set a new registry for a scoped package\n@myscope:registry=https://mycustomregistry.example.org\n```\n\n#### Per-project config file\n\nWhen working locally in a project, a `.npmrc` file in the root of the\nproject (ie, a sibling of `node_modules` and `package.json`) will set\nconfig values specific to this project.\n\nNote that this only applies to the root of the project that you're running\nnpm in.  It has no effect when your module is published.  For example, you\ncan't publish a module that forces itself to install globally, or in a\ndifferent location.\n\nAdditionally, this file is not read in global mode, such as when running\n`npm install -g`.\n\n#### Per-user config file\n\n`$HOME/.npmrc` (or the `userconfig` param, if set in the environment or on\nthe command line)\n\n#### Global config file\n\n`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): This file\nis an ini-file formatted list of `key = value` parameters.  Environment\nvariables can be replaced as above.\n\n#### Built-in config file\n\n`path/to/npm/itself/npmrc`\n\nThis is an unchangeable \"builtin\" configuration file that npm keeps\nconsistent across updates.  Set fields in here using the `./configure`\nscript that comes with npm.  This is primarily for distribution maintainers\nto override default configs in a standard and consistent manner.\n\n### See also\n\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm config](/cli/v7/commands/npm-config)\n* [config](/cli/v7/using-npm/config)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm](/cli/v7/commands/npm)\n"},{"id":"a5e1ef81-4ddc-54f2-89b8-763371b37501","frontmatter":{"title":"package.json"},"rawBody":"---\ntitle: package.json\nsection: 5\ndescription: Specifics of npm's package.json handling\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/package-json.md\n---\n\n### Description\n\nThis document is all you need to know about what's required in your\npackage.json file.  It must be actual JSON, not just a JavaScript object\nliteral.\n\nA lot of the behavior described in this document is affected by the config\nsettings described in [`config`](/cli/v7/using-npm/config).\n\n### name\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The\nname and version together form an identifier that is assumed to be\ncompletely unique.  Changes to the package should come along with changes\nto the version. If you don't plan to publish your package, the name and\nversion fields are optional.\n\nThe name is what your thing is called.\n\nSome rules:\n\n* The name must be less than or equal to 214 characters. This includes the\n  scope for scoped packages.\n* The names of scoped packages can begin with a dot or an underscore. This\n  is not permitted without a scope.\n* New packages must not have uppercase letters in the name.\n* The name ends up being part of a URL, an argument on the command line,\n  and a folder name. Therefore, the name can't contain any non-URL-safe\n  characters.\n\nSome tips:\n\n* Don't use the same name as a core Node module.\n* Don't put \"js\" or \"node\" in the name.  It's assumed that it's js, since\n  you're writing a package.json file, and you can specify the engine using\n  the \"engines\" field.  (See below.)\n* The name will probably be passed as an argument to require(), so it\n  should be something short, but also reasonably descriptive.\n* You may want to check the npm registry to see if there's something by\n  that name already, before you get too attached to it.\n  <https://www.npmjs.com/>\n\nA name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See\n[`scope`](/cli/v7/using-npm/scope) for more detail.\n\n### version\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The\nname and version together form an identifier that is assumed to be\ncompletely unique.  Changes to the package should come along with changes\nto the version. If you don't plan to publish your package, the name and\nversion fields are optional.\n\nVersion must be parseable by\n[node-semver](https://github.com/npm/node-semver), which is bundled with\nnpm as a dependency.  (`npm install semver` to use it yourself.)\n\n### description\n\nPut a description in it.  It's a string.  This helps people discover your\npackage, as it's listed in `npm search`.\n\n### keywords\n\nPut keywords in it.  It's an array of strings.  This helps people discover\nyour package as it's listed in `npm search`.\n\n### homepage\n\nThe url to the project homepage.\n\nExample:\n\n```json\n\"homepage\": \"https://github.com/owner/project#readme\"\n```\n\n### bugs\n\nThe url to your project's issue tracker and / or the email address to which\nissues should be reported. These are helpful for people who encounter\nissues with your package.\n\nIt should look like this:\n\n```json\n{\n  \"url\" : \"https://github.com/owner/project/issues\",\n  \"email\" : \"project@hostname.com\"\n}\n```\n\nYou can specify either one or both values. If you want to provide only a\nurl, you can specify the value for \"bugs\" as a simple string instead of an\nobject.\n\nIf a url is provided, it will be used by the `npm bugs` command.\n\n### license\n\nYou should specify a license for your package so that people know how they\nare permitted to use it, and any restrictions you're placing on it.\n\nIf you're using a common license such as BSD-2-Clause or MIT, add a current\nSPDX license identifier for the license you're using, like this:\n\n```json\n{\n  \"license\" : \"BSD-3-Clause\"\n}\n```\n\nYou can check [the full list of SPDX license\nIDs](https://spdx.org/licenses/).  Ideally you should pick one that is\n[OSI](https://opensource.org/licenses/alphabetical) approved.\n\nIf your package is licensed under multiple common licenses, use an [SPDX\nlicense expression syntax version 2.0\nstring](https://www.npmjs.com/package/spdx), like this:\n\n```json\n{\n  \"license\" : \"(ISC OR GPL-3.0)\"\n}\n```\nIf you are using a license that hasn't been assigned an SPDX identifier, or if\nyou are using a custom license, use a string value like this one:\n\n```json\n{\n  \"license\" : \"SEE LICENSE IN <filename>\"\n}\n```\nThen include a file named `<filename>` at the top level of the package.\n\nSome old packages used license objects or a \"licenses\" property containing\nan array of license objects:\n\n```json\n// Not valid metadata\n{\n  \"license\" : {\n    \"type\" : \"ISC\",\n    \"url\" : \"https://opensource.org/licenses/ISC\"\n  }\n}\n\n// Not valid metadata\n{\n  \"licenses\" : [\n    {\n      \"type\": \"MIT\",\n      \"url\": \"https://www.opensource.org/licenses/mit-license.php\"\n    },\n    {\n      \"type\": \"Apache-2.0\",\n      \"url\": \"https://opensource.org/licenses/apache2.0.php\"\n    }\n  ]\n}\n```\n\nThose styles are now deprecated. Instead, use SPDX expressions, like this:\n\n```json\n{\n  \"license\": \"ISC\"\n}\n```\n\n```json\n{\n  \"license\": \"(MIT OR Apache-2.0)\"\n}\n```\n\nFinally, if you do not wish to grant others the right to use a private or\nunpublished package under any terms:\n\n```json\n{\n  \"license\": \"UNLICENSED\"\n}\n```\n\nConsider also setting `\"private\": true` to prevent accidental publication.\n\n### people fields: author, contributors\n\nThe \"author\" is one person.  \"contributors\" is an array of people.  A\n\"person\" is an object with a \"name\" field and optionally \"url\" and \"email\",\nlike this:\n\n```json\n{\n  \"name\" : \"Barney Rubble\",\n  \"email\" : \"b@rubble.com\",\n  \"url\" : \"http://barnyrubble.tumblr.com/\"\n}\n```\n\nOr you can shorten that all into a single string, and npm will parse it for\nyou:\n\n```json\n{\n  \"author\": \"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)\"\n}\n```\n\nBoth email and url are optional either way.\n\nnpm also sets a top-level \"maintainers\" field with your npm user info.\n\n### funding\n\nYou can specify an object containing an URL that provides up-to-date\ninformation about ways to help fund development of your package, or a\nstring URL, or an array of these:\n\n```json\n{\n  \"funding\": {\n    \"type\" : \"individual\",\n    \"url\" : \"http://example.com/donate\"\n  },\n\n  \"funding\": {\n    \"type\" : \"patreon\",\n    \"url\" : \"https://www.patreon.com/my-account\"\n  },\n\n  \"funding\": \"http://example.com/donate\",\n\n  \"funding\": [\n    {\n      \"type\" : \"individual\",\n      \"url\" : \"http://example.com/donate\"\n    },\n    \"http://example.com/donateAlso\",\n    {\n      \"type\" : \"patreon\",\n      \"url\" : \"https://www.patreon.com/my-account\"\n    }\n  ]\n}\n```\n\nUsers can use the `npm fund` subcommand to list the `funding` URLs of all\ndependencies of their project, direct and indirect. A shortcut to visit\neach funding url is also available when providing the project name such as:\n`npm fund <projectname>` (when there are multiple URLs, the first one will\nbe visited)\n\n### files\n\nThe optional `files` field is an array of file patterns that describes the\nentries to be included when your package is installed as a dependency. File\npatterns follow a similar syntax to `.gitignore`, but reversed: including a\nfile, directory, or glob pattern (`*`, `**/*`, and such) will make it so\nthat file is included in the tarball when it's packed. Omitting the field\nwill make it default to `[\"*\"]`, which means it will include all files.\n\nSome special files and directories are also included or excluded regardless\nof whether they exist in the `files` array (see below).\n\nYou can also provide a `.npmignore` file in the root of your package or in\nsubdirectories, which will keep files from being included. At the root of\nyour package it will not override the \"files\" field, but in subdirectories\nit will. The `.npmignore` file works just like a `.gitignore`. If there is\na `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents\nwill be used instead.\n\nFiles included with the \"package.json#files\" field _cannot_ be excluded\nthrough `.npmignore` or `.gitignore`.\n\nCertain files are always included, regardless of settings:\n\n* `package.json`\n* `README`\n* `LICENSE` / `LICENCE`\n* The file in the \"main\" field\n\n`README` & `LICENSE` can have any case and extension.\n\nConversely, some files are always ignored:\n\n* `.git`\n* `CVS`\n* `.svn`\n* `.hg`\n* `.lock-wscript`\n* `.wafpickle-N`\n* `.*.swp`\n* `.DS_Store`\n* `._*`\n* `npm-debug.log`\n* `.npmrc`\n* `node_modules`\n* `config.gypi`\n* `*.orig`\n* `package-lock.json` (use\n  [`npm-shrinkwrap.json`](/cli/v7/configuring-npm/npm-shrinkwrap-json) if you wish\n  it to be published)\n\n### main\n\nThe main field is a module ID that is the primary entry point to your\nprogram.  That is, if your package is named `foo`, and a user installs it,\nand then does `require(\"foo\")`, then your main module's exports object will\nbe returned.\n\nThis should be a module relative to the root of your package folder.\n\nFor most modules, it makes the most sense to have a main script and often\nnot much else.\n\nIf `main` is not set it defaults to `index.js` in the packages root folder.\n\n### browser\n\nIf your module is meant to be used client-side the browser field should be\nused instead of the main field. This is helpful to hint users that it might\nrely on primitives that aren't available in Node.js modules. (e.g.\n`window`)\n\n### bin\n\nA lot of packages have one or more executable files that they'd like to\ninstall into the PATH. npm makes this pretty easy (in fact, it uses this\nfeature to install the \"npm\" executable.)\n\nTo use this, supply a `bin` field in your package.json which is a map of\ncommand name to local file name. When this package is installed\nglobally, that file will be linked where global bins go so it is\navailable to run by name.  When this package is installed as a\ndependency in another package, the file will be linked where it will be\navailable to that package either directly by `npm exec` or by name in other\nscripts when invoking them via `npm run-script`.\n\n\nFor example, myapp could have this:\n\n```json\n{\n  \"bin\": {\n    \"myapp\": \"./cli.js\"\n  }\n}\n```\n\nSo, when you install myapp, it'll create a symlink from the `cli.js` script\nto `/usr/local/bin/myapp`.\n\nIf you have a single executable, and its name should be the name of the\npackage, then you can just supply it as a string.  For example:\n\n```json\n{\n  \"name\": \"my-program\",\n  \"version\": \"1.2.5\",\n  \"bin\": \"./path/to/program\"\n}\n```\n\nwould be the same as this:\n\n```json\n{\n  \"name\": \"my-program\",\n  \"version\": \"1.2.5\",\n  \"bin\": {\n    \"my-program\": \"./path/to/program\"\n  }\n}\n```\n\nPlease make sure that your file(s) referenced in `bin` starts with\n`#!/usr/bin/env node`, otherwise the scripts are started without the node\nexecutable!\n\nNote that you can also set the executable files using [directories.bin](#directoriesbin).\n\nSee [folders](/cli/v7/configuring-npm/folders#executables) for more info on\nexecutables.\n\n### man\n\nSpecify either a single file or an array of filenames to put in place for\nthe `man` program to find.\n\nIf only a single file is provided, then it's installed such that it is the\nresult from `man <pkgname>`, regardless of its actual filename.  For\nexample:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": \"./man/doc.1\"\n}\n```\n\nwould link the `./man/doc.1` file in such that it is the target for `man\nfoo`\n\nIf the filename doesn't start with the package name, then it's prefixed.\nSo, this:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": [\n    \"./man/foo.1\",\n    \"./man/bar.1\"\n  ]\n}\n```\n\nwill create files to do `man foo` and `man foo-bar`.\n\nMan files must end with a number, and optionally a `.gz` suffix if they are\ncompressed.  The number dictates which man section the file is installed\ninto.\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": [\n    \"./man/foo.1\",\n    \"./man/foo.2\"\n  ]\n}\n```\n\nwill create entries for `man foo` and `man 2 foo`\n\n### directories\n\nThe CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec\ndetails a few ways that you can indicate the structure of your package\nusing a `directories` object. If you look at [npm's\npackage.json](https://registry.npmjs.org/npm/latest), you'll see that it\nhas directories for doc, lib, and man.\n\nIn the future, this information may be used in other creative ways.\n\n#### directories.bin\n\nIf you specify a `bin` directory in `directories.bin`, all the files in\nthat folder will be added.\n\nBecause of the way the `bin` directive works, specifying both a `bin` path\nand setting `directories.bin` is an error. If you want to specify\nindividual files, use `bin`, and for all the files in an existing `bin`\ndirectory, use `directories.bin`.\n\n#### directories.man\n\nA folder that is full of man pages.  Sugar to generate a \"man\" array by\nwalking the folder.\n\n### repository\n\nSpecify the place where your code lives. This is helpful for people who\nwant to contribute.  If the git repo is on GitHub, then the `npm docs`\ncommand will be able to find you.\n\nDo it like this:\n\n```json\n{\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/npm/cli.git\"\n  }\n}\n```\n\nThe URL should be a publicly available (perhaps read-only) url that can be\nhanded directly to a VCS program without any modification.  It should not\nbe a url to an html project page that you put in your browser.  It's for\ncomputers.\n\nFor GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the\nsame shortcut syntax you use for `npm install`:\n\n```json\n{\n  \"repository\": \"npm/npm\",\n\n  \"repository\": \"github:user/repo\",\n\n  \"repository\": \"gist:11081aaa281\",\n\n  \"repository\": \"bitbucket:user/repo\",\n\n  \"repository\": \"gitlab:user/repo\"\n}\n```\n\nIf the `package.json` for your package is not in the root directory (for\nexample if it is part of a monorepo), you can specify the directory in\nwhich it lives:\n\n```json\n{\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/facebook/react.git\",\n    \"directory\": \"packages/react-dom\"\n  }\n}\n```\n\n### scripts\n\nThe \"scripts\" property is a dictionary containing script commands that are\nrun at various times in the lifecycle of your package.  The key is the\nlifecycle event, and the value is the command to run at that point.\n\nSee [`scripts`](/cli/v7/using-npm/scripts) to find out more about writing package\nscripts.\n\n### config\n\nA \"config\" object can be used to set configuration parameters used in\npackage scripts that persist across upgrades.  For instance, if a package\nhad the following:\n\n```json\n{\n  \"name\": \"foo\",\n  \"config\": {\n    \"port\": \"8080\"\n  }\n}\n```\n\nIt could also have a \"start\" command that referenced the\n`npm_package_config_port` environment variable.\n\n### dependencies\n\nDependencies are specified in a simple object that maps a package name to a\nversion range. The version range is a string which has one or more\nspace-separated descriptors.  Dependencies can also be identified with a\ntarball or git URL.\n\n**Please do not put test harnesses or transpilers or other \"development\"\ntime tools in your `dependencies` object.**  See `devDependencies`, below.\n\nSee [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges.\n\n* `version` Must match `version` exactly\n* `>version` Must be greater than `version`\n* `>=version` etc\n* `<version`\n* `<=version`\n* `~version` \"Approximately equivalent to version\"  See\n  [semver](https://github.com/npm/node-semver#versions)\n* `^version` \"Compatible with version\"  See [semver](https://github.com/npm/node-semver#versions)\n* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0\n* `http://...` See 'URLs as Dependencies' below\n* `*` Matches any version\n* `\"\"` (just an empty string) Same as `*`\n* `version1 - version2` Same as `>=version1 <=version2`.\n* `range1 || range2` Passes if either range1 or range2 are satisfied.\n* `git...` See 'Git URLs as Dependencies' below\n* `user/repo` See 'GitHub URLs' below\n* `tag` A specific version tagged and published as `tag`  See [`npm\n  dist-tag`](/cli/v7/commands/npm-dist-tag)\n* `path/path/path` See [Local Paths](#local-paths) below\n\nFor example, these are all valid:\n\n```json\n{\n  \"dependencies\": {\n    \"foo\": \"1.0.0 - 2.9999.9999\",\n    \"bar\": \">=1.0.2 <2.1.2\",\n    \"baz\": \">1.0.2 <=2.3.4\",\n    \"boo\": \"2.0.1\",\n    \"qux\": \"<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0\",\n    \"asd\": \"http://asdf.com/asdf.tar.gz\",\n    \"til\": \"~1.2\",\n    \"elf\": \"~1.2.3\",\n    \"two\": \"2.x\",\n    \"thr\": \"3.3.x\",\n    \"lat\": \"latest\",\n    \"dyl\": \"file:../dyl\"\n  }\n}\n```\n\n#### URLs as Dependencies\n\nYou may specify a tarball URL in place of a version range.\n\nThis tarball will be downloaded and installed locally to your package at\ninstall time.\n\n#### Git URLs as Dependencies\n\nGit urls are of the form:\n\n```bash\n<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n```\n\n`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n`git+file`.\n\nIf `#<commit-ish>` is provided, it will be used to clone exactly that\ncommit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\nbe any valid semver range or exact version, and npm will look for any tags\nor refs matching that range in the remote repository, much as it would for\na registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\nspecified, then `master` is used.\n\nExamples:\n\n```bash\ngit+ssh://git@github.com:npm/cli.git#v1.0.27\ngit+ssh://git@github.com:npm/cli#semver:^5.0\ngit+https://isaacs@github.com/npm/cli.git\ngit://github.com/npm/cli.git#v1.0.27\n```\n\n#### GitHub URLs\n\nAs of version 1.1.65, you can refer to GitHub urls as just \"foo\":\n\"user/foo-project\".  Just as with git URLs, a `commit-ish` suffix can be\nincluded.  For example:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"0.0.0\",\n  \"dependencies\": {\n    \"express\": \"expressjs/express\",\n    \"mocha\": \"mochajs/mocha#4727d357ea\",\n    \"module\": \"user/repo#feature\\/branch\"\n  }\n}\n```\n\n#### Local Paths\n\nAs of version 2.0.0 you can provide a path to a local directory that\ncontains a package. Local paths can be saved using `npm install -S` or `npm\ninstall --save`, using any of these forms:\n\n```bash\n../foo/bar\n~/foo/bar\n./foo/bar\n/foo/bar\n```\n\nin which case they will be normalized to a relative path and added to your\n`package.json`. For example:\n\n```json\n{\n  \"name\": \"baz\",\n  \"dependencies\": {\n    \"bar\": \"file:../foo/bar\"\n  }\n}\n```\n\nThis feature is helpful for local offline development and creating tests\nthat require npm installing where you don't want to hit an external server,\nbut should not be used when publishing packages to the public registry.\n\n### devDependencies\n\nIf someone is planning on downloading and using your module in their\nprogram, then they probably don't want or need to download and build the\nexternal test or documentation framework that you use.\n\nIn this case, it's best to map these additional items in a\n`devDependencies` object.\n\nThese things will be installed when doing `npm link` or `npm install` from\nthe root of a package, and can be managed like any other npm configuration\nparam.  See [`config`](/cli/v7/using-npm/config) for more on the topic.\n\nFor build steps that are not platform-specific, such as compiling\nCoffeeScript or other languages to JavaScript, use the `prepare` script to\ndo this, and make the required package a devDependency.\n\nFor example:\n\n```json\n{\n  \"name\": \"ethopia-waza\",\n  \"description\": \"a delightfully fruity coffee varietal\",\n  \"version\": \"1.2.3\",\n  \"devDependencies\": {\n    \"coffee-script\": \"~1.6.3\"\n  },\n  \"scripts\": {\n    \"prepare\": \"coffee -o lib/ -c src/waza.coffee\"\n  },\n  \"main\": \"lib/waza.js\"\n}\n```\n\nThe `prepare` script will be run before publishing, so that users can\nconsume the functionality without requiring them to compile it themselves.\nIn dev mode (ie, locally running `npm install`), it'll run this script as\nwell, so that you can test it easily.\n\n### peerDependencies\n\nIn some cases, you want to express the compatibility of your package with a\nhost tool or library, while not necessarily doing a `require` of this host.\nThis is usually referred to as a *plugin*. Notably, your module may be\nexposing a specific interface, expected and specified by the host\ndocumentation.\n\nFor example:\n\n```json\n{\n  \"name\": \"tea-latte\",\n  \"version\": \"1.3.5\",\n  \"peerDependencies\": {\n    \"tea\": \"2.x\"\n  }\n}\n```\n\nThis ensures your package `tea-latte` can be installed *along* with the\nsecond major version of the host package `tea` only. `npm install\ntea-latte` could possibly yield the following dependency graph:\n\n```bash\n├── tea-latte@1.3.5\n└── tea@2.2.0\n```\n\nIn npm versions 3 through 6, `peerDependencies` were not automatically\ninstalled, and would raise a warning if an invalid version of the peer\ndependency was found in the tree.  As of npm v7, peerDependencies _are_\ninstalled by default.\n\nTrying to install another plugin with a conflicting requirement may cause\nan error if the tree cannot be resolved correctly. For this reason, make\nsure your plugin requirement is as broad as possible, and not to lock it\ndown to specific patch versions.\n\nAssuming the host complies with [semver](https://semver.org/), only changes\nin the host package's major version will break your plugin. Thus, if you've\nworked with every 1.x version of the host package, use `\"^1.0\"` or `\"1.x\"`\nto express this. If you depend on features introduced in 1.5.2, use\n`\"^1.5.2\"`.\n\n### peerDependenciesMeta\n\nWhen a user installs your package, npm will emit warnings if packages\nspecified in `peerDependencies` are not already installed. The\n`peerDependenciesMeta` field serves to provide npm more information on how\nyour peer dependencies are to be used. Specifically, it allows peer\ndependencies to be marked as optional.\n\nFor example:\n\n```json\n{\n  \"name\": \"tea-latte\",\n  \"version\": \"1.3.5\",\n  \"peerDependencies\": {\n    \"tea\": \"2.x\",\n    \"soy-milk\": \"1.2\"\n  },\n  \"peerDependenciesMeta\": {\n    \"soy-milk\": {\n      \"optional\": true\n    }\n  }\n}\n```\n\nMarking a peer dependency as optional ensures npm will not emit a warning\nif the `soy-milk` package is not installed on the host. This allows you to\nintegrate and interact with a variety of host packages without requiring\nall of them to be installed.\n\n### bundledDependencies\n\nThis defines an array of package names that will be bundled when publishing\nthe package.\n\nIn cases where you need to preserve npm packages locally or have them\navailable through a single file download, you can bundle the packages in a\ntarball file by specifying the package names in the `bundledDependencies`\narray and executing `npm pack`.\n\nFor example:\n\nIf we define a package.json like this:\n\n```json\n{\n  \"name\": \"awesome-web-framework\",\n  \"version\": \"1.0.0\",\n  \"bundledDependencies\": [\n    \"renderized\",\n    \"super-streams\"\n  ]\n}\n```\n\nwe can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`.\nThis file contains the dependencies `renderized` and `super-streams` which\ncan be installed in a new project by executing `npm install\nawesome-web-framework-1.0.0.tgz`.  Note that the package names do not\ninclude any versions, as that information is specified in `dependencies`.\n\nIf this is spelled `\"bundleDependencies\"`, then that is also honored.\n\n### optionalDependencies\n\nIf a dependency can be used, but you would like npm to proceed if it cannot\nbe found or fails to install, then you may put it in the\n`optionalDependencies` object.  This is a map of package name to version or\nurl, just like the `dependencies` object.  The difference is that build\nfailures do not cause installation to fail.  Running `npm install\n--no-optional` will prevent these dependencies from being installed.\n\nIt is still your program's responsibility to handle the lack of the\ndependency.  For example, something like this:\n\n```js\ntry {\n  var foo = require('foo')\n  var fooVersion = require('foo/package.json').version\n} catch (er) {\n  foo = null\n}\nif ( notGoodFooVersion(fooVersion) ) {\n  foo = null\n}\n\n// .. then later in your program ..\n\nif (foo) {\n  foo.doFooThings()\n}\n```\n\nEntries in `optionalDependencies` will override entries of the same name in\n`dependencies`, so it's usually best to only put in one place.\n\n### engines\n\nYou can specify the version of node that your stuff works on:\n\n```json\n{\n  \"engines\": {\n    \"node\": \">=0.10.3 <15\"\n  }\n}\n```\n\nAnd, like with dependencies, if you don't specify the version (or if you\nspecify \"\\*\" as the version), then any version of node will do.\n\nYou can also use the \"engines\" field to specify which versions of npm are\ncapable of properly installing your program.  For example:\n\n```json\n{\n  \"engines\": {\n    \"npm\": \"~1.0.20\"\n  }\n}\n```\n\nUnless the user has set the `engine-strict` config flag, this field is\nadvisory only and will only produce warnings when your package is installed\nas a dependency.\n\n### os\n\nYou can specify which operating systems your\nmodule will run on:\n\n```json\n{\n  \"os\": [\n    \"darwin\",\n    \"linux\"\n  ]\n}\n```\n\nYou can also block instead of allowing operating systems, just prepend the\nblocked os with a '!':\n\n```json\n{\n  \"os\": [\n    \"!win32\"\n  ]\n}\n```\n\nThe host operating system is determined by `process.platform`\n\nIt is allowed to both block and allow an item, although there isn't any\ngood reason to do this.\n\n### cpu\n\nIf your code only runs on certain cpu architectures,\nyou can specify which ones.\n\n```json\n{\n  \"cpu\": [\n    \"x64\",\n    \"ia32\"\n  ]\n}\n```\n\nLike the `os` option, you can also block architectures:\n\n```json\n{\n  \"cpu\": [\n    \"!arm\",\n    \"!mips\"\n  ]\n}\n```\n\nThe host architecture is determined by `process.arch`\n\n### private\n\nIf you set `\"private\": true` in your package.json, then npm will refuse to\npublish it.\n\nThis is a way to prevent accidental publication of private repositories.\nIf you would like to ensure that a given package is only ever published to\na specific registry (for example, an internal registry), then use the\n`publishConfig` dictionary described below to override the `registry`\nconfig param at publish-time.\n\n### publishConfig\n\nThis is a set of config values that will be used at publish-time. It's\nespecially handy if you want to set the tag, registry or access, so that\nyou can ensure that a given package is not tagged with \"latest\", published\nto the global public registry or that a scoped module is private by\ndefault.\n\nSee [`config`](/cli/v7/using-npm/config) to see the list of config options that\ncan be overridden.\n\n### workspaces\n\nThe optional `workspaces` field is an array of file patterns that describes\nlocations within the local file system that the install client should look\nup to find each [workspace](/cli/v7/using-npm/workspaces) that needs to be\nsymlinked to the top level `node_modules` folder.\n\nIt can describe either the direct paths of the folders to be used as\nworkspaces or it can define globs that will resolve to these same folders.\n\nIn the following example, all folders located inside the folder\n`./packages` will be treated as workspaces as long as they have valid\n`package.json` files inside them:\n\n```json\n{\n  \"name\": \"workspace-example\",\n  \"workspaces\": [\n    \"./packages/*\"\n  ]\n}\n```\n\nSee [`workspaces`](/cli/v7/using-npm/workspaces) for more examples.\n\n### DEFAULT VALUES\n\nnpm will default some values based on package contents.\n\n* `\"scripts\": {\"start\": \"node server.js\"}`\n\n  If there is a `server.js` file in the root of your package, then npm will\n  default the `start` command to `node server.js`.\n\n* `\"scripts\":{\"install\": \"node-gyp rebuild\"}`\n\n  If there is a `binding.gyp` file in the root of your package and you have\n  not defined an `install` or `preinstall` script, npm will default the\n  `install` command to compile using node-gyp.\n\n* `\"contributors\": [...]`\n\n  If there is an `AUTHORS` file in the root of your package, npm will treat\n  each line as a `Name <email> (url)` format, where email and url are\n  optional.  Lines which start with a `#` or are blank, will be ignored.\n\n### SEE ALSO\n\n* [semver](https://github.com/npm/node-semver#versions)\n* [workspaces](/cli/v7/using-npm/workspaces)\n* [npm init](/cli/v7/commands/npm-init)\n* [npm version](/cli/v7/commands/npm-version)\n* [npm config](/cli/v7/commands/npm-config)\n* [npm help](/cli/v7/commands/npm-help)\n* [npm install](/cli/v7/commands/npm-install)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm uninstall](/cli/v7/commands/npm-uninstall)\n"},{"id":"a6319cac-d605-58c7-8b74-92fca056d166","frontmatter":{"title":"package-lock.json"},"rawBody":"---\ntitle: package-lock.json\nsection: 5\ndescription: A manifestation of the manifest\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/configuring-npm/package-lock-json.md\n---\n\n### Description\n\n`package-lock.json` is automatically generated for any operations where npm\nmodifies either the `node_modules` tree, or `package.json`. It describes the\nexact tree that was generated, such that subsequent installs are able to\ngenerate identical trees, regardless of intermediate dependency updates.\n\nThis file is intended to be committed into source repositories, and serves\nvarious purposes:\n\n* Describe a single representation of a dependency tree such that\n  teammates, deployments, and continuous integration are guaranteed to\n  install exactly the same dependencies.\n\n* Provide a facility for users to \"time-travel\" to previous states of\n  `node_modules` without having to commit the directory itself.\n\n* Facilitate greater visibility of tree changes through readable source\n  control diffs.\n\n* Optimize the installation process by allowing npm to skip repeated\n  metadata resolutions for previously-installed packages.\n\n* As of npm v7, lockfiles include enough information to gain a complete\n  picture of the package tree, reducing the need to read `package.json`\n  files, and allowing for significant performance improvements.\n\n### `package-lock.json` vs `npm-shrinkwrap.json`\n\nBoth of these files have the same format, and perform similar functions in\nthe root of a project.\n\nThe difference is that `package-lock.json` cannot be published, and it will \nbe ignored if found in any place other than the root project.\n\nIn contrast, [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json) allows\npublication, and defines the dependency tree from the point encountered.\nThis is not recommended unless deploying a CLI tool or otherwise using the\npublication process for producing production packages.\n\nIf both `package-lock.json` and `npm-shrinkwrap.json` are present in the\nroot of a project, `npm-shrinkwrap.json` will take precedence and\n`package-lock.json` will be ignored.\n\n### Hidden Lockfiles\n\nIn order to avoid processing the `node_modules` folder repeatedly, npm as\nof v7 uses a \"hidden\" lockfile present in\n`node_modules/.package-lock.json`.  This contains information about the\ntree, and is used in lieu of reading the entire `node_modules` hierarchy\nprovided that the following conditions are met:\n\n- All package folders it references exist in the `node_modules` hierarchy.\n- No package folders exist in the `node_modules` hierarchy that are not\n  listed in the lockfile.\n- The modified time of the file is at least as recent as all of the package\n  folders it references.\n\nThat is, the hidden lockfile will only be relevant if it was created as\npart of the most recent update to the package tree.  If another CLI mutates\nthe tree in any way, this will be detected, and the hidden lockfile will be\nignored.\n\nNote that it _is_ possible to manually change the _contents_ of a package\nin such a way that the modified time of the package folder is unaffected.\nFor example, if you add a file to `node_modules/foo/lib/bar.js`, then the\nmodified time on `node_modules/foo` will not reflect this change.  If you\nare manually editing files in `node_modules`, it is generally best to\ndelete the file at `node_modules/.package-lock.json`.\n\nAs the hidden lockfile is ignored by older npm versions, it does not\ncontain the backwards compatibility affordances present in \"normal\"\nlockfiles.  That is, it is `lockfileVersion: 3`, rather than\n`lockfileVersion: 2`.\n\n### Handling Old Lockfiles\n\nWhen npm detects a lockfile from npm v6 or before during the package\ninstallation process, it is automatically updated to fetch missing\ninformation from either the `node_modules` tree or (in the case of empty\n`node_modules` trees or very old lockfile formats) the npm registry.\n\n### File Format\n\n#### `name`\n\nThe name of the package this is a package-lock for. This will match what's\nin `package.json`.\n\n#### `version`\n\nThe version of the package this is a package-lock for. This will match\nwhat's in `package.json`.\n\n#### `lockfileVersion`\n\nAn integer version, starting at `1` with the version number of this\ndocument whose semantics were used when generating this\n`package-lock.json`.\n\nNote that the file format changed significantly in npm v7 to track\ninformation that would have otherwise required looking in `node_modules` or\nthe npm registry.  Lockfiles generated by npm v7 will contain\n`lockfileVersion: 2`.\n\n* No version provided: an \"ancient\" shrinkwrap file from a version of npm\n  prior to npm v5.\n* `1`: The lockfile version used by npm v5 and v6.\n* `2`: The lockfile version used by npm v7, which is backwards compatible\n  to v1 lockfiles.\n* `3`: The lockfile version used by npm v7, _without_ backwards\n  compatibility affordances.  This is used for the hidden lockfile at\n  `node_modules/.package-lock.json`, and will likely be used in a future\n  version of npm, once support for npm v6 is no longer relevant.\n\nnpm will always attempt to get whatever data it can out of a lockfile, even\nif it is not a version that it was designed to support.\n\n#### `packages`\n\nThis is an object that maps package locations to an object containing the\ninformation about that package.\n\nThe root project is typically listed with a key of `\"\"`, and all other\npackages are listed with their relative paths from the root project folder.\n\nPackage descriptors have the following fields:\n\n* version: The version found in `package.json`\n\n* resolved: The place where the package was actually resolved from.  In\n  the case of packages fetched from the registry, this will be a url to a\n  tarball.  In the case of git dependencies, this will be the full git url\n  with commit sha.  In the case of link dependencies, this will be the\n  location of the link target. `registry.npmjs.org` is a magic value meaning\n  \"the currently configured registry\".\n\n* integrity: A `sha512` or `sha1` [Standard Subresource\n  Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)\n  string for the artifact that was unpacked in this location.\n\n* link: A flag to indicate that this is a symbolic link.  If this is\n  present, no other fields are specified, since the link target will also\n  be included in the lockfile.\n\n* dev, optional, devOptional: If the package is strictly part of the\n  `devDependencies` tree, then `dev` will be true.  If it is strictly part\n  of the `optionalDependencies` tree, then `optional` will be set.  If it\n  is both a `dev` dependency _and_ an `optional` dependency of a non-dev\n  dependency, then `devOptional` will be set.  (An `optional` dependency of\n  a `dev` dependency will have both `dev` and `optional` set.)\n\n* inBundle: A flag to indicate that the package is a bundled dependency.\n\n* hasInstallScript: A flag to indicate that the package has a `preinstall`,\n  `install`, or `postinstall` script.\n\n* hasShrinkwrap: A flag to indicate that the package has an\n  `npm-shrinkwrap.json` file.\n\n* bin, license, engines, dependencies, optionalDependencies: fields from\n  `package.json`\n\n#### dependencies\n\nLegacy data for supporting versions of npm that use `lockfileVersion: 1`.\nThis is a mapping of package names to dependency objects.  Because the\nobject structure is strictly hierarchical, symbolic link dependencies are\nsomewhat challenging to represent in some cases.\n\nnpm v7 ignores this section entirely if a `packages` section is present,\nbut does keep it up to date in order to support switching between npm v6\nand npm v7.\n\nDependency objects have the following fields:\n\n* version: a specifier that varies depending on the nature of the package,\n  and is usable in fetching a new copy of it.\n\n    * bundled dependencies: Regardless of source, this is a version number\n      that is purely for informational purposes.\n    * registry sources: This is a version number. (eg, `1.2.3`)\n    * git sources: This is a git specifier with resolved committish. (eg,\n      `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`)\n    * http tarball sources: This is the URL of the tarball. (eg,\n      `https://example.com/example-1.3.0.tgz`)\n    * local tarball sources: This is the file URL of the tarball. (eg\n      `file:///opt/storage/example-1.3.0.tgz`)\n    * local link sources: This is the file URL of the link. (eg\n      `file:libs/our-module`)\n\n* integrity: A `sha512` or `sha1` [Standard Subresource\n  Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)\n  string for the artifact that was unpacked in this location.  For git\n  dependencies, this is the commit sha.\n\n* resolved: For registry sources this is path of the tarball relative to\n  the registry URL.  If the tarball URL isn't on the same server as the\n  registry URL then this is a complete URL. `registry.npmjs.org` is a magic\n  value meaning \"the currently configured registry\".\n\n* bundled:  If true, this is the bundled dependency and will be installed\n  by the parent module.  When installing, this module will be extracted\n  from the parent module during the extract phase, not installed as a\n  separate dependency.\n\n* dev: If true then this dependency is either a development dependency ONLY\n  of the top level module or a transitive dependency of one.  This is false\n  for dependencies that are both a development dependency of the top level\n  and a transitive dependency of a non-development dependency of the top\n  level.\n\n* optional: If true then this dependency is either an optional dependency\n  ONLY of the top level module or a transitive dependency of one.  This is\n  false for dependencies that are both an optional dependency of the top\n  level and a transitive dependency of a non-optional dependency of the top\n  level.\n\n* requires: This is a mapping of module name to version.  This is a list of\n  everything this module requires, regardless of where it will be\n  installed.  The version should match via normal matching rules a\n  dependency either in our `dependencies` or in a level higher than us.\n\n* dependencies: The dependencies of this dependency, exactly as at the top\n  level.\n\n### See also\n\n* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)\n* [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"37e8c8d2-e100-5dd8-be22-072bd9b82ec0","frontmatter":{"title":"config"},"rawBody":"---\ntitle: config\nsection: 7\ndescription: More than you probably want to know about npm configuration\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/config.md\n---\n\n### Description\n\nnpm gets its configuration values from the following sources, sorted by priority:\n\n#### Command Line Flags\n\nPutting `--foo bar` on the command line sets the `foo` configuration\nparameter to `\"bar\"`.  A `--` argument tells the cli parser to stop\nreading flags.  Using `--flag` without specifying any value will set\nthe value to `true`.\n\nExample: `--flag1 --flag2` will set both configuration parameters\nto `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,\nand `flag2` to `bar`.  Finally, `--flag1 --flag2 -- bar` will set\nboth configuration parameters to `true`, and the `bar` is taken\nas a command argument.\n\n#### Environment Variables\n\nAny environment variables that start with `npm_config_` will be\ninterpreted as a configuration parameter.  For example, putting\n`npm_config_foo=bar` in your environment will set the `foo`\nconfiguration parameter to `bar`.  Any environment configurations that\nare not given a value will be given the value of `true`.  Config\nvalues are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the\nsame. However, please note that inside [`scripts`](/cli/v7/using-npm/scripts)\nnpm will set its own environment variables and Node will prefer\nthose lowercase versions over any uppercase ones that you might set.\nFor details see [this issue](https://github.com/npm/npm/issues/14528).\n\nNotice that you need to use underscores instead of dashes, so `--allow-same-version`\nwould become `npm_config_allow_same_version=true`.\n\n#### npmrc Files\n\nThe four relevant files are:\n\n* per-project configuration file (`/path/to/my/project/.npmrc`)\n* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI\n  option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)\n* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via\n  CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)\n* npm's built-in configuration file (`/path/to/npm/npmrc`)\n\nSee [npmrc](/cli/v7/configuring-npm/npmrc) for more details.\n\n#### Default Configs\n\nRun `npm config ls -l` to see a set of configuration parameters that are\ninternal to npm, and are defaults if nothing else is specified.\n\n### Shorthands and Other CLI Niceties\n\nThe following shorthands are parsed on the command-line:\n\n<!-- AUTOGENERATED CONFIG SHORTHANDS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n* `-a`: `--all`\n* `--enjoy-by`: `--before`\n* `-c`: `--call`\n* `--desc`: `--description`\n* `-f`: `--force`\n* `-g`: `--global`\n* `-L`: `--location`\n* `-d`: `--loglevel info`\n* `-s`: `--loglevel silent`\n* `--silent`: `--loglevel silent`\n* `--ddd`: `--loglevel silly`\n* `--dd`: `--loglevel verbose`\n* `--verbose`: `--loglevel verbose`\n* `-q`: `--loglevel warn`\n* `--quiet`: `--loglevel warn`\n* `-l`: `--long`\n* `-m`: `--message`\n* `--local`: `--no-global`\n* `-n`: `--no-yes`\n* `--no`: `--no-yes`\n* `-p`: `--parseable`\n* `--porcelain`: `--parseable`\n* `-C`: `--prefix`\n* `--readonly`: `--read-only`\n* `--reg`: `--registry`\n* `-S`: `--save`\n* `-B`: `--save-bundle`\n* `-D`: `--save-dev`\n* `-E`: `--save-exact`\n* `-O`: `--save-optional`\n* `-P`: `--save-prod`\n* `-?`: `--usage`\n* `-h`: `--usage`\n* `-H`: `--usage`\n* `--help`: `--usage`\n* `-v`: `--version`\n* `-w`: `--workspace`\n* `--ws`: `--workspaces`\n* `-y`: `--yes`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n<!-- AUTOGENERATED CONFIG SHORTHANDS END -->\n\nIf the specified configuration param resolves unambiguously to a known\nconfiguration parameter, then it is expanded to that configuration\nparameter.  For example:\n\n```bash\nnpm ls --par\n# same as:\nnpm ls --parseable\n```\n\nIf multiple single-character shorthands are strung together, and the\nresulting combination is unambiguously not some other configuration\nparam, then it is expanded to its various component pieces.  For\nexample:\n\n```bash\nnpm ls -gpld\n# same as:\nnpm ls --global --parseable --long --loglevel info\n```\n\n### Config Settings\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `_auth`\n\n* Default: null\n* Type: null or String\n\nA basic-auth string to use when authenticating against the npm registry.\n\nWarning: This should generally not be set via a command-line option. It is\nsafer to use a registry-provided authentication bearer token stored in the\n~/.npmrc file by running `npm login`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `access`\n\n* Default: 'restricted' for scoped packages, 'public' for unscoped packages\n* Type: null, \"restricted\", or \"public\"\n\nWhen publishing scoped packages, the access level defaults to `restricted`.\nIf you want your scoped package to be publicly viewable (and installable)\nset `--access=public`. The only valid values for `access` are `public` and\n`restricted`. Unscoped packages _always_ have an access level of `public`.\n\nNote: Using the `--access` flag on the `npm publish` command will only set\nthe package access level on the initial publish of the package. Any\nsubsequent `npm publish` commands using the `--access` flag will not have an\neffect to the access level. To make changes to the access level after the\ninitial publish use `npm access`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `allow-same-version`\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version\nto the same value as the current version.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit-level`\n\n* Default: null\n* Type: null, \"info\", \"low\", \"moderate\", \"high\", \"critical\", or \"none\"\n\nThe minimum level of vulnerability for `npm audit` to exit with a non-zero\nexit code.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `before`\n\n* Default: null\n* Type: null or Date\n\nIf passed to `npm install`, will rebuild the npm tree such that only\nversions that were available **on or before** the `--before` time get\ninstalled. If there's no versions available for the current set of direct\ndependencies, the command will error.\n\nIf the requested version is a `dist-tag` and the given tag does not pass the\n`--before` filter, the most recent version less than or equal to that tag\nwill be used. For example, `foo@latest` might install `foo@1.2` even though\n`latest` is `2.0`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ca`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThe Certificate Authority signing certificate that is trusted for SSL\nconnections to the registry. Values should be in PEM format (Windows calls\nit \"Base-64 encoded X.509 (.CER)\") with newlines replaced by the string\n\"\\n\". For example:\n\n```ini\nca=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nSet to `null` to only allow \"known\" registrars, or to a specific CA cert to\ntrust only that specific signing authority.\n\nMultiple CAs can be trusted by specifying an array of certificates:\n\n```ini\nca[]=\"...\"\nca[]=\"...\"\n```\n\nSee also the `strict-ssl` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache`\n\n* Default: Windows: `%LocalAppData%\\npm-cache`, Posix: `~/.npm`\n* Type: Path\n\nThe location of npm's cache directory. See [`npm\ncache`](/cli/v7/commands/npm-cache)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cafile`\n\n* Default: null\n* Type: Path\n\nA path to a file containing one or multiple Certificate Authority signing\ncertificates. Similar to the `ca` setting, but allows for multiple CA's, as\nwell as for the CA information to be stored in a file on disk.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `call`\n\n* Default: \"\"\n* Type: String\n\nOptional companion option for `npm exec`, `npx` that allows for specifying a\ncustom command to be run along with the installed packages.\n\n```bash\nnpm exec --package yo --package generator-node --call \"yo node\"\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cert`\n\n* Default: null\n* Type: null or String\n\nA client certificate to pass when accessing the registry. Values should be\nin PEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with\nnewlines replaced by the string \"\\n\". For example:\n\n```ini\ncert=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nIt is _not_ the path to a certificate file (and there is no \"certfile\"\noption).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ci-name`\n\n* Default: The name of the current CI system, or `null` when not on a known CI\n  platform.\n* Type: null or String\n\nThe name of a continuous integration system. If not set explicitly, npm will\ndetect the current CI environment using the\n[`@npmcli/ci-detect`](http://npm.im/@npmcli/ci-detect) module.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cidr`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThis is a list of CIDR address to be used when configuring limited access\ntokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `color`\n\n* Default: true unless the NO_COLOR environ is set to something other than '0'\n* Type: \"always\" or Boolean\n\nIf false, never shows colors. If `\"always\"` then always shows colors. If\ntrue, then only prints color codes for tty file descriptors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `commit-hooks`\n\n* Default: true\n* Type: Boolean\n\nRun git commit hooks when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `depth`\n\n* Default: `Infinity` if `--all` is set, otherwise `1`\n* Type: null or Number\n\nThe depth to go when recursing packages for `npm ls`.\n\nIf not set, `npm ls` will show only the immediate dependencies of the root\nproject. If `--all` is set, then npm will show all dependencies by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `description`\n\n* Default: true\n* Type: Boolean\n\nShow the description in `npm search`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff`\n\n* Default:\n* Type: String (can be set multiple times)\n\nDefine arguments to compare in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-dst-prefix`\n\n* Default: \"b/\"\n* Type: String\n\nDestination prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-ignore-all-space`\n\n* Default: false\n* Type: Boolean\n\nIgnore whitespace when comparing lines in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-name-only`\n\n* Default: false\n* Type: Boolean\n\nPrints only filenames when using `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-no-prefix`\n\n* Default: false\n* Type: Boolean\n\nDo not show any source or destination prefix in `npm diff` output.\n\nNote: this causes `npm diff` to ignore the `--diff-src-prefix` and\n`--diff-dst-prefix` configs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-src-prefix`\n\n* Default: \"a/\"\n* Type: String\n\nSource prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-text`\n\n* Default: false\n* Type: Boolean\n\nTreat all files as text in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-unified`\n\n* Default: 3\n* Type: Number\n\nThe number of lines of context to print in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `engine-strict`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then npm will stubbornly refuse to install (or even consider\ninstalling) any package that claims to not be compatible with the current\nNode.js version.\n\nThis can be overridden by setting the `--force` flag.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retries`\n\n* Default: 2\n* Type: Number\n\nThe \"retries\" config for the `retry` module to use when fetching packages\nfrom the registry.\n\nnpm will retry idempotent read requests to the registry in the case of\nnetwork failures or 5xx HTTP errors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-factor`\n\n* Default: 10\n* Type: Number\n\nThe \"factor\" config for the `retry` module to use when fetching packages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-maxtimeout`\n\n* Default: 60000 (1 minute)\n* Type: Number\n\nThe \"maxTimeout\" config for the `retry` module to use when fetching\npackages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-mintimeout`\n\n* Default: 10000 (10 seconds)\n* Type: Number\n\nThe \"minTimeout\" config for the `retry` module to use when fetching\npackages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-timeout`\n\n* Default: 300000 (5 minutes)\n* Type: Number\n\nThe maximum amount of time to wait for HTTP requests to complete.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `format-package-lock`\n\n* Default: true\n* Type: Boolean\n\nFormat `package-lock.json` or `npm-shrinkwrap.json` as a human readable\nfile.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v7/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git`\n\n* Default: \"git\"\n* Type: String\n\nThe command to use for git commands. If git is installed on the computer,\nbut is not in the `PATH`, then set this to the full path to the git binary.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git-tag-version`\n\n* Default: true\n* Type: Boolean\n\nTag the commit when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `globalconfig`\n\n* Default: The global --prefix setting plus 'etc/npmrc'. For example,\n  '/usr/local/etc/npmrc'\n* Type: Path\n\nThe config file to read for global config options.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `heading`\n\n* Default: \"npm\"\n* Type: String\n\nThe string that starts all the debugging log output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `https-proxy`\n\n* Default: null\n* Type: null or URL\n\nA proxy to use for outgoing https requests. If the `HTTPS_PROXY` or\n`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,\nproxy settings will be honored by the underlying `make-fetch-happen`\nlibrary.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `if-present`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not exit with an error code when `run-script` is invoked\nfor a script that isn't defined in the `scripts` section of `package.json`.\nThis option can be used when it's desirable to optionally run a script when\nit's present and fail if the script fails. This is useful, for example, when\nrunning scripts that may only apply for some builds in an otherwise generic\nCI setup.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include`\n\n* Default:\n* Type: \"prod\", \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nOption that allows for defining which types of dependencies to install.\n\nThis is the inverse of `--omit=<type>`.\n\nDependency types specified in `--include` will not be omitted, regardless of\nthe order in which omit/include are specified on the command-line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-staged`\n\n* Default: false\n* Type: Boolean\n\nAllow installing \"staged\" published packages, as defined by [npm RFC PR\n#92](https://github.com/npm/rfcs/pull/92).\n\nThis is experimental, and not implemented by the npm public registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-email`\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's email.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-name`\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's name.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-url`\n\n* Default: \"\"\n* Type: \"\" or URL\n\nThe value `npm init` should use by default for the package author's\nhomepage.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-license`\n\n* Default: \"ISC\"\n* Type: String\n\nThe value `npm init` should use by default for the package license.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-module`\n\n* Default: \"~/.npm-init.js\"\n* Type: Path\n\nA module that will be loaded by the `npm init` command. See the\ndocumentation for the\n[init-package-json](https://github.com/npm/init-package-json) module for\nmore information, or [npm init](/cli/v7/commands/npm-init).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-version`\n\n* Default: \"1.0.0\"\n* Type: SemVer string\n\nThe value that `npm init` should use by default for the package version\nnumber, if not already set in package.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `key`\n\n* Default: null\n* Type: null or String\n\nA client key to pass when accessing the registry. Values should be in PEM\nformat with newlines replaced by the string \"\\n\". For example:\n\n```ini\nkey=\"-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----\"\n```\n\nIt is _not_ the path to a key file (and there is no \"keyfile\" option).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to completely ignore `peerDependencies` when building a package\ntree, as in npm versions 3 through 6.\n\nIf a package cannot be installed because of overly strict `peerDependencies`\nthat collide, it provides a way to move forward resolving the situation.\n\nThis differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking\n`peerDependencies` on disk, but will still design a tree such that\n`peerDependencies` _could_ be unpacked in a correct place.\n\nUse of `legacy-peer-deps` is not recommended, as it will not enforce the\n`peerDependencies` contract that meta-dependencies may rely on.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `link`\n\n* Default: false\n* Type: Boolean\n\nUsed with `npm ls`, limiting output to only those packages that are linked.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `local-address`\n\n* Default: null\n* Type: IP Address\n\nThe IP address of the local interface to use when making connections to the\nnpm registry. Must be IPv4 in versions of Node prior to 0.12.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `location`\n\n* Default: \"user\" unless `--global` is passed, which will also set this value\n  to \"global\"\n* Type: \"global\", \"user\", or \"project\"\n\nWhen passed to `npm config` this refers to which config file to use.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `loglevel`\n\n* Default: \"notice\"\n* Type: \"silent\", \"error\", \"warn\", \"notice\", \"http\", \"timing\", \"info\",\n  \"verbose\", or \"silly\"\n\nWhat level of logs to report. On failure, *all* logs are written to\n`npm-debug.log` in the current working directory.\n\nAny logs of a higher level than the setting are shown. The default is\n\"notice\".\n\nSee also the `foreground-scripts` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `logs-max`\n\n* Default: 10\n* Type: Number\n\nThe maximum number of log files to store.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `maxsockets`\n\n* Default: 15\n* Type: Number\n\nThe maximum number of connections to use per origin (protocol/host/port\ncombination).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `message`\n\n* Default: \"%s\"\n* Type: String\n\nCommit message which is used by `npm version` when creating version commit.\n\nAny \"%s\" in the message will be replaced with the version number.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `node-options`\n\n* Default: null\n* Type: null or String\n\nOptions to pass through to Node.js via the `NODE_OPTIONS` environment\nvariable. This does not impact how npm itself is executed but it does impact\nhow lifecycle scripts are called.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `node-version`\n\n* Default: Node.js `process.version` value\n* Type: SemVer string\n\nThe node version to use when checking a package's `engines` setting.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `noproxy`\n\n* Default: The value of the NO_PROXY environment variable\n* Type: String (can be set multiple times)\n\nDomain extensions that should bypass any proxies.\n\nAlso accepts a comma-delimited string.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `npm-version`\n\n* Default: Output of `npm --version`\n* Type: SemVer string\n\nThe npm version to use when checking a package's `engines` setting.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `offline`\n\n* Default: false\n* Type: Boolean\n\nForce offline mode: no network requests will be done during install. To\nallow the CLI to fill in missing cache data, see `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `pack-destination`\n\n* Default: \".\"\n* Type: String\n\nDirectory in which `npm pack` will save tarballs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package`\n\n* Default:\n* Type: String (can be set multiple times)\n\nThe package to install for [`npm exec`](/cli/v7/commands/npm-exec)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nWhen package package-locks are disabled, automatic pruning of extraneous\nmodules will also be disabled. To remove extraneous modules with\npackage-locks disabled use `npm prune`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-offline`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be bypassed, but missing data\nwill be requested from the server. To force full offline mode, use\n`--offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-online`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be forced, making the CLI\nlook for updates immediately even for fresh package data.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefix`\n\n* Default: In global mode, the folder where the node executable is installed.\n  In local mode, the nearest parent folder containing either a package.json\n  file or a node_modules folder.\n* Type: Path\n\nThe location to install global items. If set on the command line, then it\nforces non-global commands to run in the specified folder.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `preid`\n\n* Default: \"\"\n* Type: String\n\nThe \"prerelease identifier\" to use as a prefix for the \"prerelease\" part of\na semver. Like the `rc` in `1.2.0-rc.8`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `progress`\n\n* Default: `true` unless running in a known CI system\n* Type: Boolean\n\nWhen set to `true`, npm will display a progress bar during time intensive\noperations, if `process.stderr` is a TTY.\n\nSet to `false` to suppress the progress bar.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `proxy`\n\n* Default: null\n* Type: null, false, or URL\n\nA proxy to use for outgoing http requests. If the `HTTP_PROXY` or\n`http_proxy` environment variables are set, proxy settings will be honored\nby the underlying `request` library.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `read-only`\n\n* Default: false\n* Type: Boolean\n\nThis is used to mark a token as unable to publish when configuring limited\naccess tokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `rebuild-bundle`\n\n* Default: true\n* Type: Boolean\n\nRebuild bundled dependencies after installation.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save`\n\n* Default: true\n* Type: Boolean\n\nSave installed packages to a package.json file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\npackage.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-bundle`\n\n* Default: false\n* Type: Boolean\n\nIf a package would be saved at install time by the use of `--save`,\n`--save-dev`, or `--save-optional`, then also put it in the\n`bundleDependencies` list.\n\nIgnore if `--save-peer` is set, since peerDependencies cannot be bundled.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-dev`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `devDependencies`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-optional`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `optionalDependencies`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-peer`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages. to a package.json file as `peerDependencies`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-prefix`\n\n* Default: \"^\"\n* Type: String\n\nConfigure how versions of packages installed to a package.json file via\n`--save` or `--save-dev` get prefixed.\n\nFor example if a package has version `1.2.3`, by default its version is set\nto `^1.2.3` which allows minor upgrades for that package, but after `npm\nconfig set save-prefix='~'` it would be set to `~1.2.3` which only allows\npatch upgrades.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-prod`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages into `dependencies` specifically. This is useful if\na package already exists in `devDependencies` or `optionalDependencies`, but\nyou want to move it to be a non-optional production dependency.\n\nThis is the default behavior if `--save` is true, and neither `--save-dev`\nor `--save-optional` are true.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <pkg>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchexclude`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchlimit`\n\n* Default: 20\n* Type: Number\n\nNumber of items to limit search results to. Will not apply at all to legacy\nsearches.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchopts`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchstaleness`\n\n* Default: 900\n* Type: Number\n\nThe age of the cache, in seconds, before another registry request is made if\nusing legacy search endpoint.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `shell`\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd.exe\" on\n  Windows\n* Type: String\n\nThe shell to run for the `npm explore` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-commit`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will commit the new package\nversion using `-S` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-tag`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will tag the version using\n`-s` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-ssl`\n\n* Default: true\n* Type: Boolean\n\nWhether or not to do SSL key validation when making requests to the registry\nvia https.\n\nSee also the `ca` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag-version-prefix`\n\n* Default: \"v\"\n* Type: String\n\nIf set, alters the prefix used when tagging a new version when performing a\nversion increment using `npm-version`. To remove the prefix altogether, set\nit to the empty string: `\"\"`.\n\nBecause other tools may rely on the convention that npm version tags look\nlike `v1.0.0`, _only use this property if it is absolutely necessary_. In\nparticular, use care when overriding this setting for public packages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `timing`\n\n* Default: false\n* Type: Boolean\n\nIf true, writes an `npm-debug` log to `_logs` and timing information to\n`_timing.json`, both in your cache, even if the command completes\nsuccessfully. `_timing.json` is a newline delimited list of JSON objects.\n\nYou can quickly view it with this [json](https://npm.im/json) command line:\n`npm exec -- json -g < ~/.npm/_timing.json`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `umask`\n\n* Default: 0\n* Type: Octal numeric string in range 0000..0777 (0..511)\n\nThe \"umask\" value to use when setting the file creation mode on files and\nfolders.\n\nFolders and executables are given a mode which is `0o777` masked against\nthis value. Other files are given a mode which is `0o666` masked against\nthis value.\n\nNote that the underlying system will _also_ apply its own umask value to\nfiles and folders that are created, and npm does not circumvent this, but\nrather adds the `--umask` config to it.\n\nThus, the effective default umask value on most POSIX systems is 0o22,\nmeaning that folders and executables are created with a mode of 0o755 and\nother files are created with a mode of 0o644.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `update-notifier`\n\n* Default: true\n* Type: Boolean\n\nSet to false to suppress the update notification when using an older version\nof npm than the latest.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `usage`\n\n* Default: false\n* Type: Boolean\n\nShow short usage output about the command specified.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `user-agent`\n\n* Default: \"npm/{npm-version} node/{node-version} {platform} {arch}\n  workspaces/{workspaces} {ci}\"\n* Type: String\n\nSets the User-Agent request header. The following fields are replaced with\ntheir actual counterparts:\n\n* `{npm-version}` - The npm version in use\n* `{node-version}` - The Node.js version in use\n* `{platform}` - The value of `process.platform`\n* `{arch}` - The value of `process.arch`\n* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options\n  are set.\n* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or\n  an empty string if `ci-name` is empty.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `userconfig`\n\n* Default: \"~/.npmrc\"\n* Type: Path\n\nThe location of user-level configuration settings.\n\nThis may be overridden by the `npm_config_userconfig` environment variable\nor the `--userconfig` command line option, but may _not_ be overridden by\nsettings in the `globalconfig` file.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `version`\n\n* Default: false\n* Type: Boolean\n\nIf true, output the npm version and exit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `versions`\n\n* Default: false\n* Type: Boolean\n\nIf true, output the npm version as well as node's `process.versions` map and\nthe version in the current working directory's `package.json` file if one\nexists, and exit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `viewer`\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: String\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `which`\n\n* Default: null\n* Type: null or Number\n\nIf there are multiple funding sources, which 1-indexed source URL to open.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: false\n* Type: Boolean\n\nEnable running a command in the context of **all** the configured\nworkspaces.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `yes`\n\n* Default: null\n* Type: null or Boolean\n\nAutomatically answer \"yes\" to any prompts that npm might print on the\ncommand line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `also`\n\n* Default: null\n* Type: null, \"dev\", or \"development\"\n* DEPRECATED: Please use --include=dev instead.\n\nWhen set to `dev` or `development`, this is an alias for `--include=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `auth-type`\n\n* Default: \"legacy\"\n* Type: \"legacy\", \"sso\", \"saml\", or \"oauth\"\n* DEPRECATED: This method of SSO/SAML/OAuth is deprecated and will be removed\n  in a future version of npm in favor of web-based login.\n\nWhat authentication strategy to use with `adduser`/`login`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache-max`\n\n* Default: Infinity\n* Type: Number\n* DEPRECATED: This option has been deprecated in favor of `--prefer-online`\n\n`--cache-max=0` is an alias for `--prefer-online`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache-min`\n\n* Default: 0\n* Type: Number\n* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`.\n\n`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dev`\n\n* Default: false\n* Type: Boolean\n* DEPRECATED: Please use --include=dev instead.\n\nAlias for `--include=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.email`\n\n* Default: \"\"\n* Type: String\n* DEPRECATED: Use `--init-author-email` instead.\n\nAlias for `--init-author-email`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.name`\n\n* Default: \"\"\n* Type: String\n* DEPRECATED: Use `--init-author-name` instead.\n\nAlias for `--init-author-name`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.url`\n\n* Default: \"\"\n* Type: \"\" or URL\n* DEPRECATED: Use `--init-author-url` instead.\n\nAlias for `--init-author-url`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.license`\n\n* Default: \"ISC\"\n* Type: String\n* DEPRECATED: Use `--init-license` instead.\n\nAlias for `--init-license`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.module`\n\n* Default: \"~/.npm-init.js\"\n* Type: Path\n* DEPRECATED: Use `--init-module` instead.\n\nAlias for `--init-module`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.version`\n\n* Default: \"1.0.0\"\n* Type: SemVer string\n* DEPRECATED: Use `--init-version` instead.\n\nAlias for `--init-version`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `only`\n\n* Default: null\n* Type: null, \"prod\", or \"production\"\n* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install.\n\nWhen set to `prod` or `production`, this is an alias for `--omit=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `optional`\n\n* Default: null\n* Type: null or Boolean\n* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or\n  `--include=optional` to include them.\n\nDefault value does install optional deps unless otherwise omitted.\n\nAlias for --include=optional or --omit=optional\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `production`\n\n* Default: null\n* Type: null or Boolean\n* DEPRECATED: Use `--omit=dev` instead.\n\nAlias for `--omit=dev`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `shrinkwrap`\n\n* Default: true\n* Type: Boolean\n* DEPRECATED: Use the --package-lock setting instead.\n\nAlias for --package-lock\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sso-poll-frequency`\n\n* Default: 500\n* Type: Number\n* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a\n  future version of npm in favor of web-based login.\n\nWhen used with SSO-enabled `auth-type`s, configures how regularly the\nregistry should be polled while the user is completing authentication.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sso-type`\n\n* Default: \"oauth\"\n* Type: null, \"oauth\", or \"saml\"\n* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a\n  future version of npm in favor of web-based login.\n\nIf `--auth-type=sso`, the type of SSO type to use.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tmp`\n\n* Default: The value returned by the Node.js `os.tmpdir()` method\n  <https://nodejs.org/api/os.html#os_os_tmpdir>\n* Type: Path\n* DEPRECATED: This setting is no longer used. npm stores temporary files in a\n  special location in the cache, and they are managed by\n  [`cacache`](http://npm.im/cacache).\n\nHistorically, the location where temporary files were stored. No longer\nrelevant.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See also\n\n* [npm config](/cli/v7/commands/npm-config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm folders](/cli/v7/configuring-npm/folders)\n* [npm](/cli/v7/commands/npm)\n"},{"id":"a5d1b33b-39ab-5eed-85eb-5b47a6bed611","frontmatter":{"title":"developers"},"rawBody":"---\ntitle: developers\nsection: 7\ndescription: Developer Guide\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/developers.md\n---\n\n### Description\n\nSo, you've decided to use npm to develop (and maybe publish/deploy)\nyour project.\n\nFantastic!\n\nThere are a few things that you need to do above the simple steps\nthat your users will do to install your program.\n\n### About These Documents\n\nThese are man pages.  If you install npm, you should be able to\nthen do `man npm-thing` to get the documentation on a particular\ntopic, or `npm help thing` to see the same information.\n\n### What is a Package\n\nA package is:\n\n* a) a folder containing a program described by a package.json file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry with (c)\n* e) a `<name>@<tag>` that points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `git` url that, when cloned, results in (a).\n\nEven if you never publish your package, you can still get a lot of\nbenefits of using npm if you just want to write a node program (a), and\nperhaps if you also want to be able to easily install it elsewhere\nafter packing it up into a tarball (b).\n\nGit urls can be of the form:\n\n```bash\ngit://github.com/user/project.git#commit-ish\ngit+ssh://user@hostname:project.git#commit-ish\ngit+http://user@hostname/project/blah.git#commit-ish\ngit+https://user@hostname/project/blah.git#commit-ish\n```\n\nThe `commit-ish` can be any tag, sha, or branch which can be supplied as\nan argument to `git checkout`.  The default is whatever the repository uses\nas its default branch.\n\n### The package.json File\n\nYou need to have a `package.json` file in the root of your project to do\nmuch of anything with npm.  That is basically the whole interface.\n\nSee [`package.json`](/cli/v7/configuring-npm/package-json) for details about what\ngoes in that file.  At the very least, you need:\n\n* name: This should be a string that identifies your project.  Please do\n  not use the name to specify that it runs on node, or is in JavaScript.\n  You can use the \"engines\" field to explicitly state the versions of node\n  (or whatever else) that your program requires, and it's pretty well\n  assumed that it's JavaScript.\n\n  It does not necessarily need to match your github repository name.\n\n  So, `node-foo` and `bar-js` are bad names.  `foo` or `bar` are better.\n\n* version: A semver-compatible version.\n\n* engines: Specify the versions of node (or whatever else) that your\n  program runs on.  The node API changes a lot, and there may be bugs or\n  new functionality that you depend on.  Be explicit.\n\n* author: Take some credit.\n\n* scripts: If you have a special compilation or installation script, then\n  you should put it in the `scripts` object.  You should definitely have at\n  least a basic smoke-test command as the \"scripts.test\" field.  See\n  [scripts](/cli/v7/using-npm/scripts).\n\n* main: If you have a single module that serves as the entry point to your\n  program (like what the \"foo\" package gives you at require(\"foo\")), then\n  you need to specify that in the \"main\" field.\n\n* directories: This is an object mapping names to folders.  The best ones\n  to include are \"lib\" and \"doc\", but if you use \"man\" to specify a folder\n  full of man pages, they'll get installed just like these ones.\n\nYou can use `npm init` in the root of your package in order to get you\nstarted with a pretty basic package.json file.  See [`npm\ninit`](/cli/v7/commands/npm-init) for more info.\n\n### Keeping files *out* of your Package\n\nUse a `.npmignore` file to keep stuff out of your package.  If there's no\n`.npmignore` file, but there *is* a `.gitignore` file, then npm will ignore\nthe stuff matched by the `.gitignore` file.  If you *want* to include\nsomething that is excluded by your `.gitignore` file, you can create an\nempty `.npmignore` file to override it. Like `git`, `npm` looks for\n`.npmignore` and `.gitignore` files in all subdirectories of your package,\nnot only the root directory.\n\n`.npmignore` files follow the [same pattern\nrules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)\nas `.gitignore` files:\n\n* Blank lines or lines starting with `#` are ignored.\n* Standard glob patterns work.\n* You can end patterns with a forward slash `/` to specify a directory.\n* You can negate a pattern by starting it with an exclamation point `!`.\n\nBy default, the following paths and files are ignored, so there's no\nneed to add them to `.npmignore` explicitly:\n\n* `.*.swp`\n* `._*`\n* `.DS_Store`\n* `.git`\n* `.hg`\n* `.npmrc`\n* `.lock-wscript`\n* `.svn`\n* `.wafpickle-*`\n* `config.gypi`\n* `CVS`\n* `npm-debug.log`\n\nAdditionally, everything in `node_modules` is ignored, except for\nbundled dependencies. npm automatically handles this for you, so don't\nbother adding `node_modules` to `.npmignore`.\n\nThe following paths and files are never ignored, so adding them to\n`.npmignore` is pointless:\n\n* `package.json`\n* `README` (and its variants)\n* `CHANGELOG` (and its variants)\n* `LICENSE` / `LICENCE`\n\nIf, given the structure of your project, you find `.npmignore` to be a\nmaintenance headache, you might instead try populating the `files`\nproperty of `package.json`, which is an array of file or directory names\nthat should be included in your package. Sometimes manually picking\nwhich items to allow is easier to manage than building a block list.\n\n#### Testing whether your `.npmignore` or `files` config works\n\nIf you want to double check that your package will include only the files\nyou intend it to when published, you can run the `npm pack` command locally\nwhich will generate a tarball in the working directory, the same way it\ndoes for publishing.\n\n### Link Packages\n\n`npm link` is designed to install a development package and see the\nchanges in real time without having to keep re-installing it.  (You do\nneed to either re-link or `npm rebuild -g` to update compiled packages,\nof course.)\n\nMore info at [`npm link`](/cli/v7/commands/npm-link).\n\n### Before Publishing: Make Sure Your Package Installs and Works\n\n**This is important.**\n\nIf you can not install it locally, you'll have\nproblems trying to publish it.  Or, worse yet, you'll be able to\npublish it, but you'll be publishing a broken or pointless package.\nSo don't do that.\n\nIn the root of your package, do this:\n\n```bash\nnpm install . -g\n```\n\nThat'll show you that it's working.  If you'd rather just create a symlink\npackage that points to your working directory, then do this:\n\n```bash\nnpm link\n```\n\nUse `npm ls -g` to see if it's there.\n\nTo test a local install, go into some other folder, and then do:\n\n```bash\ncd ../some-other-folder\nnpm install ../my-package\n```\n\nto install it locally into the node_modules folder in that other place.\n\nThen go into the node-repl, and try using require(\"my-thing\") to\nbring in your module's main module.\n\n### Create a User Account\n\nCreate a user with the adduser command.  It works like this:\n\n```bash\nnpm adduser\n```\n\nand then follow the prompts.\n\nThis is documented better in [npm adduser](/cli/v7/commands/npm-adduser).\n\n### Publish your Package\n\nThis part's easy.  In the root of your folder, do this:\n\n```bash\nnpm publish\n```\n\nYou can give publish a url to a tarball, or a filename of a tarball,\nor a path to a folder.\n\nNote that pretty much **everything in that folder will be exposed**\nby default.  So, if you have secret stuff in there, use a\n`.npmignore` file to list out the globs to ignore, or publish\nfrom a fresh checkout.\n\n### Brag about it\n\nSend emails, write blogs, blab in IRC.\n\nTell the world how easy it is to install your program!\n\n### See also\n\n* [npm](/cli/v7/commands/npm)\n* [npm init](/cli/v7/commands/npm-init)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm scripts](/cli/v7/using-npm/scripts)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm adduser](/cli/v7/commands/npm-adduser)\n* [npm registry](/cli/v7/using-npm/registry)\n"},{"id":"164ebdc3-0327-5e83-a3eb-eb7c7ece7890","frontmatter":{"title":"Using npm"},"rawBody":"---\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/nav.yml\ntitle: Using npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"69ffd118-9ebd-5bbf-89a2-e2a06aab83f8","frontmatter":{"title":"orgs"},"rawBody":"---\ntitle: orgs\nsection: 7\ndescription: Working with Teams & Orgs\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/orgs.md\n---\n\n### Description\n\nThere are three levels of org users:\n\n1. Super admin, controls billing & adding people to the org.\n2. Team admin, manages team membership & package access.\n3. Developer, works on packages they are given access to.  \n\nThe super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to.\n\nThe team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.\n\nThe developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.\n\nThere are two main commands:\n\n1. `npm team` see [npm team](/cli/v7/commands/npm-team) for more details\n2. `npm access` see [npm access](/cli/v7/commands/npm-access) for more details\n\n### Team Admins create teams\n\n* Check who you’ve added to your org:\n\n```bash\nnpm team ls <org>:developers\n```\n\n* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command.\n\n* Create a new team:\n\n```bash\nnpm team create <org:team>\n```\n\n* Add members to that team:\n\n```bash\nnpm team add <org:team> <user>\n```\n\n### Publish a package and adjust package access\n\n* In package directory, run\n\n```bash\nnpm init --scope=<org>\n```\nto scope it for your org & publish as usual\n\n* Grant access:  \n\n```bash\nnpm access grant <read-only|read-write> <org:team> [<package>]\n```\n\n* Revoke access:\n\n```bash\nnpm access revoke <org:team> [<package>]\n```\n\n### Monitor your package access\n\n* See what org packages a team member can access:\n\n```bash\nnpm access ls-packages <org> <user>\n```\n\n* See packages available to a specific team:\n\n```bash\nnpm access ls-packages <org:team>\n```\n\n* Check which teams are collaborating on a package:\n\n```bash\nnpm access ls-collaborators <pkg>\n```\n\n### See also\n\n* [npm team](/cli/v7/commands/npm-team)\n* [npm access](/cli/v7/commands/npm-access)\n* [npm scope](/cli/v7/using-npm/scope)\n"},{"id":"6e5f4e6c-c2cd-5a18-8afb-8822b2510cac","frontmatter":{"title":"registry"},"rawBody":"---\ntitle: registry\nsection: 7\ndescription: The JavaScript Package Registry\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/registry.md\n---\n\n### Description\n\nTo resolve packages by name and version, npm talks to a registry website\nthat implements the CommonJS Package Registry specification for reading\npackage info.\n\nnpm is configured to use the **npm public registry** at\n<https://registry.npmjs.org> by default. Use of the npm public registry is\nsubject to terms of use available at <https://docs.npmjs.com/policies/terms>.\n\nYou can configure npm to use any compatible registry you like, and even run\nyour own registry. Use of someone else's registry may be governed by their\nterms of use.\n\nnpm's package registry implementation supports several\nwrite APIs as well, to allow for publishing packages and managing user\naccount information.\n\nThe npm public registry is powered by a CouchDB database,\nof which there is a public mirror at <https://skimdb.npmjs.com/registry>.\n\nThe registry URL used is determined by the scope of the package (see\n[`scope`](/cli/v7/using-npm/scope). If no scope is specified, the default registry is used, which is\nsupplied by the `registry` config parameter.  See [`npm config`](/cli/v7/commands/npm-config),\n[`npmrc`](/cli/v7/configuring-npm/npmrc), and [`config`](/cli/v7/using-npm/config) for more on managing npm's configuration.\n\nWhen the default registry is used in a package-lock or shrinkwrap is has the\nspecial meaning of \"the currently configured registry\". If you create a lock\nfile while using the default registry you can switch to another registry and\nnpm will install packages from the new registry, but if you create a lock\nfile while using a custom registry packages will be installed from that\nregistry even after you change to another registry.\n\n### Does npm send any information about me back to the registry?\n\nYes.\n\nWhen making requests of the registry npm adds two headers with information\nabout your environment:\n\n* `Npm-Scope` – If your project is scoped, this header will contain its\n  scope. In the future npm hopes to build registry features that use this\n  information to allow you to customize your experience for your\n  organization.\n* `Npm-In-CI` – Set to \"true\" if npm believes this install is running in a\n  continuous integration environment, \"false\" otherwise. This is detected by\n  looking for the following environment variables: `CI`, `TDDIUM`,\n  `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find\n  the [original PR](https://github.com/npm/npm-registry-client/pull/129)\n  interesting.\n  This is used to gather better metrics on how npm is used by humans, versus\n  build farms.\n\nThe npm registry does not try to correlate the information in these headers\nwith any authenticated accounts that may be used in the same requests.\n\n### How can I prevent my package from being published in the official registry?\n\nSet `\"private\": true` in your `package.json` to prevent it from being\npublished at all, or\n`\"publishConfig\":{\"registry\":\"http://my-internal-registry.local\"}`\nto force it to be published only to your internal/private registry.\n\nSee [`package.json`](/cli/v7/configuring-npm/package-json) for more info on what goes in the package.json file.\n\n### Where can I find my own, & other's, published packages?\n\n<https://www.npmjs.com/>\n\n### See also\n\n* [npm config](/cli/v7/commands/npm-config)\n* [config](/cli/v7/using-npm/config)\n* [npmrc](/cli/v7/configuring-npm/npmrc)\n* [npm developers](/cli/v7/using-npm/developers)\n"},{"id":"ebb1f7c2-3f53-5025-afd4-4ad0d15d5e09","frontmatter":{"title":"removal"},"rawBody":"---\ntitle: removal\nsection: 7\ndescription: Cleaning the Slate\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/removal.md\n---\n\n### Synopsis\n\nSo sad to see you go.\n\n```bash\nsudo npm uninstall npm -g\n```\n\nOr, if that fails, get the npm source code, and do:\n\n```bash\nsudo make uninstall\n```\n\n### More Severe Uninstalling\n\nUsually, the above instructions are sufficient.  That will remove\nnpm, but leave behind anything you've installed.\n\nIf that doesn't work, or if you require more drastic measures,\ncontinue reading.\n\nNote that this is only necessary for globally-installed packages.  Local\ninstalls are completely contained within a project's `node_modules`\nfolder.  Delete that folder, and everything is gone less a package's\ninstall script is particularly ill-behaved).\n\nThis assumes that you installed node and npm in the default place.  If\nyou configured node with a different `--prefix`, or installed npm with a\ndifferent prefix setting, then adjust the paths accordingly, replacing\n`/usr/local` with your install prefix.\n\nTo remove everything npm-related manually:\n\n```bash\nrm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*\n```\n\nIf you installed things *with* npm, then your best bet is to uninstall\nthem with npm first, and then install them again once you have a\nproper install.  This can help find any symlinks that are lying\naround:\n\n```bash\nls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm\n```\n\nPrior to version 0.3, npm used shim files for executables and node\nmodules.  To track those down, you can do the following:\n\n```bash\nfind /usr/local/{lib/node,bin} -exec grep -l npm \\{\\} \\; ;\n```\n\n### See also\n\n* [npm uninstall](/cli/v7/commands/npm-uninstall)\n* [npm prune](/cli/v7/commands/npm-prune)\n"},{"id":"c44adc73-8011-526b-96ac-ab542498101a","frontmatter":{"title":"scope"},"rawBody":"---\ntitle: scope\nsection: 7\ndescription: Scoped packages\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/scope.md\n---\n\n### Description\n\nAll npm packages have a name. Some package names also have a scope. A scope\nfollows the usual rules for package names (URL-safe characters, no leading dots\nor underscores). When used in package names, scopes are preceded by an `@` symbol\nand followed by a slash, e.g.\n\n```bash\n@somescope/somepackagename\n```\n\nScopes are a way of grouping related packages together, and also affect a few\nthings about the way npm treats the package.\n\nEach npm user/organization has their own scope, and only you can add packages\nin your scope. This means you don't have to worry about someone taking your\npackage name ahead of you. Thus it is also a good way to signal official packages\nfor organizations.\n\nScoped packages can be published and installed as of `npm@2` and are supported\nby the primary npm registry. Unscoped packages can depend on scoped packages and\nvice versa. The npm client is backwards-compatible with unscoped registries,\nso it can be used to work with scoped and unscoped registries at the same time.\n\n### Installing scoped packages\n\nScoped packages are installed to a sub-folder of the regular installation\nfolder, e.g. if your other packages are installed in `node_modules/packagename`,\nscoped modules will be installed in `node_modules/@myorg/packagename`. The scope\nfolder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can\ncontain any number of scoped packages.\n\nA scoped package is installed by referencing it by name, preceded by an\n`@` symbol, in `npm install`:\n\n```bash\nnpm install @myorg/mypackage\n```\n\nOr in `package.json`:\n\n```json\n\"dependencies\": {\n  \"@myorg/mypackage\": \"^1.3.0\"\n}\n```\n\nNote that if the `@` symbol is omitted, in either case, npm will instead attempt to\ninstall from GitHub; see [`npm install`](/cli/v7/commands/npm-install).\n\n### Requiring scoped packages\n\nBecause scoped packages are installed into a scope folder, you have to\ninclude the name of the scope when requiring them in your code, e.g.\n\n```javascript\nrequire('@myorg/mypackage')\n```\n\nThere is nothing special about the way Node treats scope folders. This\nsimply requires the `mypackage` module in the folder named `@myorg`.\n\n### Publishing scoped packages\n\nScoped packages can be published from the CLI as of `npm@2` and can be\npublished to any registry that supports them, including the primary npm\nregistry.\n\n(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry\n**does** support scoped packages.)\n\nIf you wish, you may associate a scope with a registry; see below.\n\n#### Publishing public scoped packages to the primary npm registry\n\nTo publish a public scoped package, you must specify `--access public` with\nthe initial publication. This will publish the package and set access\nto `public` as if you had run `npm access public` after publishing.\n\n#### Publishing private scoped packages to the npm registry\n\nTo publish a private scoped package to the npm registry, you must have\nan [npm Private Modules](https://docs.npmjs.com/private-modules/intro)\naccount.\n\nYou can then publish the module with `npm publish` or `npm publish\n--access restricted`, and it will be present in the npm registry, with\nrestricted access. You can then change the access permissions, if\ndesired, with `npm access` or on the npmjs.com website.\n\n### Associating a scope with a registry\n\nScopes can be associated with a separate registry. This allows you to\nseamlessly use a mix of packages from the primary npm registry and one or more\nprivate registries, such as [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org)\nproject.\n\nYou can associate a scope with a registry at login, e.g.\n\n```bash\nnpm login --registry=http://reg.example.com --scope=@myco\n```\n\nScopes have a many-to-one relationship with registries: one registry can\nhost multiple scopes, but a scope only ever points to one registry.\n\nYou can also associate a scope with a registry using `npm config`:\n\n```bash\nnpm config set @myco:registry http://reg.example.com\n```\n\nOnce a scope is associated with a registry, any `npm install` for a package\nwith that scope will request packages from that registry instead. Any\n`npm publish` for a package name that contains the scope will be published to\nthat registry instead.\n\n### See also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm access](/cli/v7/commands/npm-access)\n* [npm registry](/cli/v7/using-npm/registry)\n"},{"id":"89e71711-8ca2-5444-9e80-3009de874c75","frontmatter":{"title":"scripts"},"rawBody":"---\ntitle: scripts\nsection: 7\ndescription: How npm handles the \"scripts\" field\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/scripts.md\n---\n\n### Description\n\nThe `\"scripts\"` property of your `package.json` file supports a number\nof built-in scripts and their preset life cycle events as well as\narbitrary scripts. These all can be executed by running\n`npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post*\ncommands with matching names will be run for those as well (e.g. `premyscript`,\n`myscript`, `postmyscript`). Scripts from dependencies can be run with\n`npm explore <pkg> -- npm run <stage>`.\n\n### Pre & Post Scripts\n\nTo create \"pre\" or \"post\" scripts for any scripts defined in the\n`\"scripts\"` section of the `package.json`, simply create another script\n*with a matching name* and add \"pre\" or \"post\" to the beginning of them.\n\n```json\n{\n  \"scripts\": {\n    \"precompress\": \"{{ executes BEFORE the `compress` script }}\",\n    \"compress\": \"{{ run command to compress files }}\",\n    \"postcompress\": \"{{ executes AFTER `compress` script }}\"\n  }\n}\n```\n\nIn this example `npm run compress` would execute these scripts as\ndescribed.\n\n### Life Cycle Scripts\n\nThere are some special life cycle scripts that happen only in certain\nsituations. These scripts happen in addition to the `pre<event>`, `post<event>`, and\n`<event>` scripts.\n\n* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`\n\n**prepare** (since `npm@4.0.0`)\n* Runs any time before the package is packed, i.e. during `npm publish`\n    and `npm pack`\n* Runs BEFORE the package is packed\n* Runs BEFORE the package is published\n* Runs on local `npm install` without any arguments\n* Run AFTER `prepublish`, but BEFORE `prepublishOnly`\n\n* NOTE: If a package being installed through git contains a `prepare`\n script, its `dependencies` and `devDependencies` will be installed, and\n the prepare script will be run, before the package is packaged and\n installed.\n\n* As of `npm@7` these scripts run in the background.\n  To see the output, run with: `--foreground-scripts`.\n\n**prepublish** (DEPRECATED)\n* Does not run during `npm publish`, but does run during `npm ci`\n  and `npm install`. See below for more info.\n\n**prepublishOnly**\n* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.\n\n**prepack**\n* Runs BEFORE a tarball is packed (on \"`npm pack`\", \"`npm publish`\", and when installing a git dependencies).\n* NOTE: \"`npm run pack`\" is NOT the same as \"`npm pack`\". \"`npm run pack`\" is an arbitrary user defined script name, where as, \"`npm pack`\" is a CLI defined command.\n\n**postpack**\n* Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally)\n\n#### Prepare and Prepublish\n\n**Deprecation Note: prepublish**\n\nSince `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below).  It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074).  As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape).\n\nSee <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further reading, for this change.\n\n**Use Cases**\n\nIf you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as:\n\n* Compiling CoffeeScript source code into JavaScript.\n* Creating minified versions of JavaScript source code.\n* Fetching remote resources that your package will use.\n\nThe advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:\n\n* You can depend on `coffee-script` as a `devDependency`, and thus\n  your users don't need to have it installed.\n* You don't need to include minifiers in your package, reducing\n  the size for your users.\n* You don't need to rely on your users having `curl` or `wget` or\n  other system tools on the target machines.\n\n### Life Cycle Operation Order\n\n#### [`npm cache add`](/cli/v7/commands/npm-cache)\n\n* `prepare`\n\n#### [`npm ci`](/cli/v7/commands/npm-ci)\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepublish`\n* `preprepare`\n* `prepare`\n* `postprepare`\n\n These all run after the actual installation of modules into\n `node_modules`, in order, with no internal actions happening in between\n\n#### [`npm diff`](/cli/v7/commands/npm-diff)\n\n* `prepare`\n\n#### [`npm install`](/cli/v7/commands/npm-install)\n\nThese also run when you run `npm install -g <pkg-name>`\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepublish`\n* `preprepare`\n* `prepare`\n* `postprepare`\n\nIf there is a `binding.gyp` file in the root of your package and you\nhaven't defined your own `install` or `preinstall` scripts, npm will\ndefault the `install` command to compile using node-gyp via `node-gyp\nrebuild`\n\nThese are run from the scripts of `<pkg-name>`\n\n#### [`npm pack`](/cli/v7/commands/npm-pack)\n\n* `prepack`\n* `prepare`\n* `postpack`\n\n#### [`npm publish`](/cli/v7/commands/npm-publish)\n\n* `prepublishOnly`\n* `prepack`\n* `prepare`\n* `postpack`\n* `publish`\n* `postpublish`\n\n`prepare` will not run during `--dry-run`\n\n#### [`npm rebuild`](/cli/v7/commands/npm-rebuild)\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepare`\n\n`prepare` is only run if the current directory is a symlink (e.g. with\nlinked packages)\n\n#### [`npm restart`](/cli/v7/commands/npm-restart)\n\nIf there is a `restart` script defined, these events are run, otherwise\n`stop` and `start` are both run if present, including their `pre` and\n`post` iterations)\n\n* `prerestart`\n* `restart`\n* `postrestart`\n\n#### [`npm run <user defined>`](/cli/v7/commands/npm-run-script)\n\n* `pre<user-defined>`\n* `<user-defined>`\n* `post<user-defined>`\n\n#### [`npm start`](/cli/v7/commands/npm-start)\n\n* `prestart`\n* `start`\n* `poststart`\n\nIf there is a `server.js` file in the root of your package, then npm\nwill default the `start` command to `node server.js`.  `prestart` and\n`poststart` will still run in this case.\n\n#### [`npm stop`](/cli/v7/commands/npm-stop)\n\n* `prestop`\n* `stop`\n* `poststop`\n\n#### [`npm test`](/cli/v7/commands/npm-test)\n\n* `pretest`\n* `test`\n* `posttest`\n\n#### A Note on a lack of [`npm uninstall`](/cli/v7/commands/npm-uninstall) scripts\n\nWhile npm v6 had `uninstall` lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful. \n\nReasons for a package removal include:\n\n* a user directly uninstalled this package\n* a user uninstalled a dependant package and so this dependency is being uninstalled\n* a user uninstalled a dependant package but another package also depends on this version\n* this version has been merged as a duplicate with another version\n* etc.\n\nDue to the lack of necessary context, `uninstall` lifecycle scripts are not implemented and will not function.\n\n### User\n\nWhen npm is run as root, scripts are always run with the effective uid\nand gid of the working directory owner.\n\n### Environment\n\nPackage scripts run in an environment where many pieces of information\nare made available regarding the setup of npm and the current state of\nthe process.\n\n#### path\n\nIf you depend on modules that define executable scripts, like test\nsuites, then those executables will be added to the `PATH` for\nexecuting the scripts.  So, if your package.json has this:\n\n```json\n{\n  \"name\" : \"foo\",\n  \"dependencies\" : {\n    \"bar\" : \"0.1.x\"\n  },\n  \"scripts\": {\n    \"start\" : \"bar ./test\"\n  }\n}\n```\n\nthen you could run `npm start` to execute the `bar` script, which is\nexported into the `node_modules/.bin` directory on `npm install`.\n\n#### package.json vars\n\nThe package.json fields are tacked onto the `npm_package_` prefix. So,\nfor instance, if you had `{\"name\":\"foo\", \"version\":\"1.2.5\"}` in your\npackage.json file, then your package scripts would have the\n`npm_package_name` environment variable set to \"foo\", and the\n`npm_package_version` set to \"1.2.5\".  You can access these variables\nin your code with `process.env.npm_package_name` and\n`process.env.npm_package_version`, and so on for other fields.\n\nSee [`package-json.md`](/cli/v7/configuring-npm/package-json) for more on package configs.\n\n#### current lifecycle event\n\nLastly, the `npm_lifecycle_event` environment variable is set to\nwhichever stage of the cycle is being executed. So, you could have a\nsingle script used for different parts of the process which switches\nbased on what's currently happening.\n\nObjects are flattened following this format, so if you had\n`{\"scripts\":{\"install\":\"foo.js\"}}` in your package.json, then you'd\nsee this in the script:\n\n```bash\nprocess.env.npm_package_scripts_install === \"foo.js\"\n```\n\n### Examples\n\nFor example, if your package.json contains this:\n\n```json\n{\n  \"scripts\" : {\n    \"install\" : \"scripts/install.js\",\n    \"postinstall\" : \"scripts/install.js\",\n    \"uninstall\" : \"scripts/uninstall.js\"\n  }\n}\n```\n\nthen `scripts/install.js` will be called for the install\nand post-install stages of the lifecycle, and `scripts/uninstall.js`\nwill be called when the package is uninstalled.  Since\n`scripts/install.js` is running for two different phases, it would\nbe wise in this case to look at the `npm_lifecycle_event` environment\nvariable.\n\nIf you want to run a make command, you can do so.  This works just\nfine:\n\n```json\n{\n  \"scripts\" : {\n    \"preinstall\" : \"./configure\",\n    \"install\" : \"make && make install\",\n    \"test\" : \"make test\"\n  }\n}\n```\n\n### Exiting\n\nScripts are run by passing the line as a script argument to `sh`.\n\nIf the script exits with a code other than 0, then this will abort the\nprocess.\n\nNote that these script files don't have to be Node.js or even\nJavaScript programs. They just have to be some kind of executable\nfile.\n\n### Best Practices\n\n* Don't exit with a non-zero error code unless you *really* mean it.\n  Except for uninstall scripts, this will cause the npm action to\n  fail, and potentially be rolled back.  If the failure is minor or\n  only will prevent some optional features, then it's better to just\n  print a warning and exit successfully.\n* Try not to use scripts to do what npm can do for you.  Read through\n  [`package.json`](/cli/v7/configuring-npm/package-json) to see all the things that you can specify and enable\n  by simply describing your package appropriately.  In general, this\n  will lead to a more robust and consistent state.\n* Inspect the env to determine where to put things.  For instance, if\n  the `npm_config_binroot` environment variable is set to `/home/user/bin`, then\n  don't try to install executables into `/usr/local/bin`.  The user\n  probably set it up that way for a reason.\n* Don't prefix your script commands with \"sudo\".  If root permissions\n  are required for some reason, then it'll fail with that error, and\n  the user will sudo the npm command in question.\n* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`\n  for anything else. You should almost never have to explicitly set a\n  preinstall or install script. If you are doing this, please consider if\n  there is another option. The only valid use of `install` or `preinstall`\n  scripts is for compilation which must be done on the target architecture.\n\n### See Also\n\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [package.json](/cli/v7/configuring-npm/package-json)\n* [npm developers](/cli/v7/using-npm/developers)\n* [npm install](/cli/v7/commands/npm-install)\n"},{"id":"e4d99073-6d94-5970-a315-ffd475a8a6f4","frontmatter":{"title":"workspaces"},"rawBody":"---\ntitle: workspaces\nsection: 7\ndescription: Working with workspaces\ngithub_repo: npm/cli\ngithub_branch: v7\ngithub_path: docs/content/using-npm/workspaces.md\n---\n\n### Description\n\n**Workspaces** is a generic term that refers to the set of features in the\nnpm cli that provides support to managing multiple packages from your local\nfiles system from within a singular top-level, root package.\n\nThis set of features makes up for a much more streamlined workflow handling\nlinked packages from the local file system. Automating the linking process\nas part of `npm install` and avoiding manually having to use `npm link` in\norder to add references to packages that should be symlinked into the current\n`node_modules` folder.\n\nWe also refer to these packages being auto-symlinked during `npm install` as a\nsingle **workspace**, meaning it's a nested package within the current local\nfile system that is explicitly defined in the [`package.json`](/cli/v7/configuring-npm/package-json#workspaces)\n`workspaces` configuration.\n\n### Defining workspaces\n\nWorkspaces are usually defined via the `workspaces` property of the\n[`package.json`](/cli/v7/configuring-npm/package-json#workspaces) file, e.g:\n\n```json\n{\n  \"name\": \"my-workspaces-powered-project\",\n  \"workspaces\": [\n    \"workspace-a\"\n  ]\n}\n```\n\nGiven the above `package.json` example living at a current working\ndirectory `.` that contains a folder named `workspace-a` that itself contains\na `package.json` inside it, defining a Node.js package, e.g:\n\n```\n.\n+-- package.json\n`-- workspace-a\n   `-- package.json\n```\n\nThe expected result once running `npm install` in this current working\ndirectory `.` is that the folder `workspace-a` will get symlinked to the\n`node_modules` folder of the current working dir.\n\nBelow is a post `npm install` example, given that same previous example\nstructure of files and folders:\n\n```\n.\n+-- node_modules\n|  `-- workspace-a -> ../workspace-a\n+-- package-lock.json\n+-- package.json\n`-- workspace-a\n   `-- package.json\n```\n\n### Getting started with workspaces\n\nYou may automate the required steps to define a new workspace using\n[npm init](/cli/v7/commands/npm-init). For example in a project that already has a\n`package.json` defined you can run:\n\n```\nnpm init -w ./packages/a\n```\n\nThis command will create the missing folders and a new `package.json`\nfile (if needed) while also making sure to properly configure the\n`\"workspaces\"` property of your root project `package.json`.\n\n### Adding dependencies to a workspace\n\nIt's possible to directly add/remove/update dependencies of your workspaces\nusing the [`workspace` config](/cli/v7/using-npm/config#workspace).\n\nFor example, assuming the following structure:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- b\n       `-- package.json\n```\n\nIf you want to add a dependency named `abbrev` from the registry as a\ndependency of your workspace **a**, you may use the workspace config to tell\nthe npm installer that package should be added as a dependency of the provided\nworkspace:\n\n```\nnpm install abbrev -w a\n```\n\nNote: other installing commands such as `uninstall`, `ci`, etc will also\nrespect the provided `workspace` configuration.\n\n### Using workspaces\n\nGiven the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace\nby it's declared `package.json` `name`. Continuing from the example defined\nabove, let's also create a Node.js script that will require the `workspace-a`\nexample module, e.g:\n\n```\n// ./workspace-a/index.js\nmodule.exports = 'a'\n\n// ./lib/index.js\nconst moduleA = require('workspace-a')\nconsole.log(moduleA) // -> a\n```\n\nWhen running it with:\n\n`node lib/index.js`\n\nThis demonstrates how the nature of `node_modules` resolution allows for\n**workspaces** to enable a portable workflow for requiring each **workspace**\nin such a way that is also easy to [publish](/cli/v7/commands/npm-publish) these\nnested workspaces to be consumed elsewhere.\n\n### Running commands in the context of workspaces\n\nYou can use the `workspace` configuration option to run commands in the context\nof a configured workspace.\n\nFollowing is a quick example on how to use the `npm run` command in the context\nof nested workspaces. For a project containing multiple workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- b\n       `-- package.json\n```\n\nBy running a command using the `workspace` option, it's possible to run the\ngiven command in the context of that specific workspace. e.g:\n\n```\nnpm run test --workspace=a\n```\n\nThis will run the `test` script defined within the\n`./packages/a/package.json` file.\n\nPlease note that you can also specify this argument multiple times in the\ncommand-line in order to target multiple workspaces, e.g:\n\n```\nnpm run test --workspace=a --workspace=b\n```\n\nIt's also possible to use the `workspaces` (plural) configuration option to\nenable the same behavior but running that command in the context of **all**\nconfigured workspaces. e.g:\n\n```\nnpm run test --workspaces\n```\n\nWill run the `test` script in both `./packages/a` and `./packages/b`.\n\nCommands will be run in each workspace in the order they appear in your `package.json`\n\n```\n{\n  \"workspaces\": [ \"packages/a\", \"packages/b\" ]\n}\n```\n\nOrder of run is different with:\n\n```\n{\n  \"workspaces\": [ \"packages/b\", \"packages/a\" ]\n}\n```\n\n### Ignoring missing scripts\n\nIt is not required for all of the workspaces to implement scripts run with the `npm run` command.\n\nBy running the command with the `--if-present` flag, npm will ignore workspaces missing target script.\n\n```\nnpm run test --workspaces --if-present\n```\n\n### See also\n\n* [npm install](/cli/v7/commands/npm-install)\n* [npm publish](/cli/v7/commands/npm-publish)\n* [npm run-script](/cli/v7/commands/npm-run-script)\n* [config](/cli/v7/using-npm/config)\n\n"},{"id":"143c4a34-fcea-5e3c-a658-700920630a83","frontmatter":{"title":"CLI Commands"},"rawBody":"---\nredirect_from:\n  - commands\n  - /cli/commands\n  - /cli-documentation/cli\n  - /cli-documentation/cli-commands\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/nav.yml\ntitle: CLI Commands\n---\n\n<Index depth=\"1\" />\n"},{"id":"9e1cf2b7-8077-5a2b-baad-d541874371f8","frontmatter":{"title":"npm-access"},"rawBody":"---\ntitle: npm-access\nsection: 1\ndescription: Set access level on published packages\nredirect_from:\n  - /cli/access\n  - /cli/access.html\n  - /cli/commands/access\n  - /cli-commands/access\n  - /cli-commands/access.html\n  - /cli-commands/npm-access\n  - /cli-documentation/access\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-access.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/access.js -->\n\n```bash\nnpm access public [<package>]\nnpm access restricted [<package>]\nnpm access grant <read-only|read-write> <scope:team> [<package>]\nnpm access revoke <scope:team> [<package>]\nnpm access 2fa-required [<package>]\nnpm access 2fa-not-required [<package>]\nnpm access ls-packages [<user>|<scope>|<scope:team>]\nnpm access ls-collaborators [<package> [<user>]]\nnpm access edit [<package>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/access.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nUsed to set access controls on private packages.\n\nFor all of the subcommands, `npm access` will perform actions on the packages\nin the current working directory if no package name is passed to the\nsubcommand.\n\n* public / restricted (deprecated):\n  Set a package to be either publicly accessible or restricted.\n\n* grant / revoke (deprecated):\n  Add or remove the ability of users and teams to have read-only or read-write\n  access to a package.\n\n* 2fa-required / 2fa-not-required (deprecated):\n  Configure whether a package requires that anyone publishing it have two-factor\n  authentication enabled on their account.\n\n* ls-packages (deprecated):\n  Show all of the packages a user or a team is able to access, along with the\n  access level, except for read-only public packages (it won't print the whole\n  registry listing)\n\n* ls-collaborators (deprecated):\n  Show all of the access privileges for a package. Will only show permissions\n  for packages to which you have at least read access. If `<user>` is passed in,\n  the list is filtered only to teams _that_ user happens to belong to.\n\n* edit (not implemented)\n\n### Details\n\n`npm access` always operates directly on the current registry, configurable\nfrom the command line using `--registry=<registry url>`.\n\nUnscoped packages are *always public*.\n\nScoped packages *default to restricted*, but you can either publish them as\npublic using `npm publish --access=public`, or set their access as public using\n`npm access public` after the initial publish.\n\nYou must have privileges to set the access of a package:\n\n* You are an owner of an unscoped or scoped package.\n* You are a member of the team that owns a scope.\n* You have been given read-write privileges for a package, either as a member\n  of a team or directly as an owner.\n\nIf you have two-factor authentication enabled then you'll be prompted to\nprovide an otp token, or may use the `--otp=...` option to specify it on\nthe command line.\n\nIf your account is not paid, then attempts to publish scoped packages will\nfail with an HTTP 402 status code (logically enough), unless you use\n`--access=public`.\n\nManagement of teams and team memberships is done with the `npm team` command.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [`libnpmaccess`](https://npm.im/libnpmaccess)\n* [npm team](/cli/v8/commands/npm-team)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm registry](/cli/v8/using-npm/registry)\n"},{"id":"807ad805-e0fa-5a67-b915-fc66bb5765dc","frontmatter":{"title":"npm-adduser"},"rawBody":"---\ntitle: npm-adduser\nsection: 1\ndescription: Add a registry user account\nredirect_from:\n  - /cli/adduser\n  - /cli/adduser.html\n  - /cli/commands/adduser\n  - /cli-commands/adduser\n  - /cli-commands/adduser.html\n  - /cli-commands/npm-adduser\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-adduser.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/adduser.js -->\n\n```bash\nnpm adduser\n\naliases: login, add-user\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/adduser.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nCreate or verify a user named `<username>` in the specified registry, and\nsave the credentials to the `.npmrc` file. If no registry is specified,\nthe default registry will be used (see [`config`](/cli/v8/using-npm/config)).\n\nThe username, password, and email are read in from prompts.\n\nTo reset your password, go to <https://www.npmjs.com/forgot>\n\nTo change your email address, go to <https://www.npmjs.com/email-edit>\n\nYou may use this command multiple times with the same user account to\nauthorize on a new machine.  When authenticating on a new machine,\nthe username, password and email address must all match with\nyour existing record.\n\n`npm login` is an alias to `adduser` and behaves exactly the same way.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `auth-type`\n\n* Default: \"legacy\"\n* Type: \"legacy\", \"web\", \"sso\", \"saml\", \"oauth\", or \"webauthn\"\n\nNOTE: auth-type values \"sso\", \"saml\", \"oauth\", and \"webauthn\" will be\nremoved in a future version.\n\nWhat authentication strategy to use with `login`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm token](/cli/v8/commands/npm-token)\n* [npm profile](/cli/v8/commands/npm-profile)\n"},{"id":"f45751f0-5017-59fa-ab57-24c8032f38ae","frontmatter":{"title":"npm-audit"},"rawBody":"---\ntitle: npm-audit\nsection: 1\ndescription: Run a security audit\nredirect_from:\n  - /cli/audit\n  - /cli/audit.html\n  - /cli/commands/audit\n  - /cli-commands/audit\n  - /cli-commands/audit.html\n  - /cli-commands/npm-audit\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-audit.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/audit.js -->\n\n```bash\nnpm audit [fix|signatures]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/audit.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThe audit command submits a description of the dependencies configured in\nyour project to your default registry and asks for a report of known\nvulnerabilities.  If any vulnerabilities are found, then the impact and\nappropriate remediation will be calculated.  If the `fix` argument is\nprovided, then remediations will be applied to the package tree.\n\nThe command will exit with a 0 exit code if no vulnerabilities were found.\n\nNote that some vulnerabilities cannot be fixed automatically and will\nrequire manual intervention or review.  Also note that since `npm audit\nfix` runs a full-fledged `npm install` under the hood, all configs that\napply to the installer will also apply to `npm install` -- so things like\n`npm audit fix --package-lock-only` will work as expected.\n\nBy default, the audit command will exit with a non-zero code if any\nvulnerability is found. It may be useful in CI environments to include the\n`--audit-level` parameter to specify the minimum vulnerability level that\nwill cause the command to fail. This option does not filter the report\noutput, it simply changes the command's failure threshold.\n\n### Audit Signatures\n\nTo ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI.\n\nRegistry signatures can be verified using the following `audit` command:\n\n```bash\n$ npm audit signatures\n```\n\nThe npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed:\n\n1. Signatures are provided in the package's `packument` in each published version within the `dist` object:\n\n```json\n\"dist\":{\n  \"..omitted..\": \"..omitted..\",\n  \"signatures\": [{\n    \"keyid\": \"SHA256:{{SHA256_PUBLIC_KEY}}\",\n    \"sig\": \"a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809...\"\n  }]\n}\n```\n\nSee this [example](https://registry.npmjs.org/light-cycle/1.4.3) of a signed package from the public npm registry.\n\nThe `sig` is generated using the following template: `${package.name}@${package.version}:${package.dist.integrity}` and the `keyid` has to match one of the public signing keys below.\n\n2. Public signing keys are provided at `registry-host.tld/-/npm/v1/keys` in the following format:\n\n```\n{\n  \"keys\": [{\n    \"expires\": null,\n    \"keyid\": \"SHA256:{{SHA256_PUBLIC_KEY}}\",\n    \"keytype\": \"ecdsa-sha2-nistp256\",\n    \"scheme\": \"ecdsa-sha2-nistp256\",\n    \"key\": \"{{B64_PUBLIC_KEY}}\"\n  }]\n}\n```\n\nKeys response:\n\n- `expires`: null or a simplified extended <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ`\n- `keydid`: sha256 fingerprint of the public key\n- `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI\n- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI\n- `key`: base64 encoded public key\n\nSee this <a href=\"https://registry.npmjs.org/-/npm/v1/keys\" target=\"_blank\">example key's response from the public npm registry</a>.\n\n### Audit Endpoints\n\nThere are two audit endpoints that npm may use to fetch vulnerability\ninformation: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint.\n\n#### Bulk Advisory Endpoint\n\nAs of version 7, npm uses the much faster `Bulk Advisory` endpoint to\noptimize the speed of calculating audit results.\n\nnpm will generate a JSON payload with the name and list of versions of each\npackage in the tree, and POST it to the default configured registry at\nthe path `/-/npm/v1/security/advisories/bulk`.\n\nAny packages in the tree that do not have a `version` field in their\npackage.json file will be ignored.  If any `--omit` options are specified\n(either via the `--omit` config, or one of the shorthands such as\n`--production`, `--only=dev`, and so on), then packages will be omitted\nfrom the submitted payload as appropriate.\n\nIf the registry responds with an error, or with an invalid response, then\nnpm will attempt to load advisory data from the `Quick Audit` endpoint.\n\nThe expected result will contain a set of advisory objects for each\ndependency that matches the advisory range.  Each advisory object contains\na `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`.\n\nnpm then uses these advisory objects to calculate vulnerabilities and\nmeta-vulnerabilities of the dependencies within the tree.\n\n#### Quick Audit Endpoint\n\nIf the `Bulk Advisory` endpoint returns an error, or invalid data, npm will\nattempt to load advisory data from the `Quick Audit` endpoint, which is\nconsiderably slower in most cases.\n\nThe full package tree as found in `package-lock.json` is submitted, along\nwith the following pieces of additional metadata:\n\n* `npm_version`\n* `node_version`\n* `platform`\n* `arch`\n* `node_env`\n\nAll packages in the tree are submitted to the Quick Audit endpoint.\nOmitted dependency types are skipped when generating the report.\n\n#### Scrubbing\n\nOut of an abundance of caution, npm versions 5 and 6 would \"scrub\" any\npackages from the submitted report if their name contained a `/` character,\nso as to avoid leaking the names of potentially private packages or git\nURLs.\n\nHowever, in practice, this resulted in audits often failing to properly\ndetect meta-vulnerabilities, because the tree would appear to be invalid\ndue to missing dependencies, and prevented the detection of vulnerabilities\nin package trees that used git dependencies or private modules.\n\nThis scrubbing has been removed from npm as of version 7.\n\n#### Calculating Meta-Vulnerabilities and Remediations\n\nnpm uses the\n[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator)\nmodule to turn a set of security advisories into a set of \"vulnerability\"\nobjects.  A \"meta-vulnerability\" is a dependency that is vulnerable by\nvirtue of dependence on vulnerable versions of a vulnerable package.\n\nFor example, if the package `foo` is vulnerable in the range `>=1.0.2\n<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version\nof `bar` can only be installed by installing a vulnerable version of `foo`.\nIn this case, `bar` is a \"metavulnerability\".\n\nOnce metavulnerabilities for a given package are calculated, they are\ncached in the `~/.npm` folder and only re-evaluated if the advisory range\nchanges, or a new version of the package is published (in which case, the\nnew version is checked for metavulnerable status as well).\n\nIf the chain of metavulnerabilities extends all the way to the root\nproject, and it cannot be updated without changing its dependency ranges,\nthen `npm audit fix` will require the `--force` option to apply the\nremediation.  If remediations do not require changes to the dependency\nranges, then all vulnerable packages will be updated to a version that does\nnot have an advisory or metavulnerability posted against it.\n\n### Exit Code\n\nThe `npm audit` command will exit with a 0 exit code if no vulnerabilities\nwere found.  The `npm audit fix` command will exit with 0 exit code if no\nvulnerabilities are found _or_ if the remediation is able to successfully\nfix all vulnerabilities.\n\nIf vulnerabilities were found the exit code will depend on the\n`audit-level` configuration setting.\n\n### Examples\n\nScan your project for vulnerabilities and automatically install any compatible\nupdates to vulnerable dependencies:\n\n```bash\n$ npm audit fix\n```\n\nRun `audit fix` without modifying `node_modules`, but still updating the\npkglock:\n\n```bash\n$ npm audit fix --package-lock-only\n```\n\nSkip updating `devDependencies`:\n\n```bash\n$ npm audit fix --only=prod\n```\n\nHave `audit fix` install SemVer-major updates to toplevel dependencies, not\njust SemVer-compatible ones:\n\n```bash\n$ npm audit fix --force\n```\n\nDo a dry run to get an idea of what `audit fix` will do, and _also_ output\ninstall information in JSON format:\n\n```bash\n$ npm audit fix --dry-run --json\n```\n\nScan your project for vulnerabilities and just show the details, without\nfixing anything:\n\n```bash\n$ npm audit\n```\n\nGet the detailed audit report in JSON format:\n\n```bash\n$ npm audit --json\n```\n\nFail an audit only if the results include a vulnerability with a level of moderate or higher:\n\n```bash\n$ npm audit --audit-level=moderate\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `audit-level`\n\n* Default: null\n* Type: null, \"info\", \"low\", \"moderate\", \"high\", \"critical\", or \"none\"\n\nThe minimum level of vulnerability for `npm audit` to exit with a non-zero\nexit code.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n* Allow unpublishing of entire packages (not just a single version).\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [config](/cli/v8/using-npm/config)\n"},{"id":"41cb78aa-5103-553f-aae4-0cff29b49844","frontmatter":{"title":"npm-bin"},"rawBody":"---\ntitle: npm-bin\nsection: 1\ndescription: Display npm bin folder\nredirect_from:\n  - /cli/bin\n  - /cli/bin.html\n  - /cli/commands/bin\n  - /cli-commands/bin\n  - /cli-commands/bin.html\n  - /cli-commands/npm-bin\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-bin.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/bin.js -->\n\n```bash\nnpm bin\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/bin.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPrint the folder where npm will install executables.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prefix](/cli/v8/commands/npm-prefix)\n* [npm root](/cli/v8/commands/npm-root)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"9e82858c-dee7-5819-bca7-fb7387be2785","frontmatter":{"title":"npm-bugs"},"rawBody":"---\ntitle: npm-bugs\nsection: 1\ndescription: Report bugs for a package in a web browser\nredirect_from:\n  - /cli/bugs\n  - /cli/bugs.html\n  - /cli/commands/bugs\n  - /cli-commands/bugs\n  - /cli-commands/bugs.html\n  - /cli-commands/npm-bugs\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-bugs.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/bugs.js -->\n\n```bash\nnpm bugs [<pkgname> [<pkgname> ...]]\n\nalias: issues\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/bugs.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command tries to guess at the likely location of a package's bug\ntracker URL or the `mailto` URL of the support email, and then tries to\nopen it using the `--browser` config param. If no package name is provided, it\nwill search for a `package.json` in the current folder and use the `name` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm docs](/cli/v8/commands/npm-docs)\n* [npm view](/cli/v8/commands/npm-view)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [package.json](/cli/v8/configuring-npm/package-json)\n"},{"id":"e4f3e4a7-c91e-554c-bea2-9dd97c2516e5","frontmatter":{"title":"npm-cache"},"rawBody":"---\ntitle: npm-cache\nsection: 1\ndescription: Manipulates packages cache\nredirect_from:\n  - /cli/cache\n  - /cli/cache.html\n  - /cli/commands/cache\n  - /cli-commands/cache\n  - /cli-commands/cache.html\n  - /cli-commands/npm-cache\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-cache.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/cache.js -->\n\n```bash\nnpm cache add <package-spec>\nnpm cache clean [<key>]\nnpm cache ls [<name>@<version>]\nnpm cache verify\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/cache.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nUsed to add, list, or clean the npm cache folder.\n\n* add:\n  Add the specified packages to the local cache.  This command is primarily\n  intended to be used internally by npm, but it can provide a way to\n  add data to the local installation cache explicitly.\n\n* clean:\n  Delete all data out of the cache folder.  Note that this is typically\n  unnecessary, as npm's cache is self-healing and resistant to data\n  corruption issues.\n\n* verify:\n  Verify the contents of the cache folder, garbage collecting any unneeded\n  data, and verifying the integrity of the cache index and all cached data.\n\n### Details\n\nnpm stores cache data in an opaque directory within the configured `cache`,\nnamed `_cacache`. This directory is a\n[`cacache`](http://npm.im/cacache)-based content-addressable cache that\nstores all http request data as well as other package-related data. This\ndirectory is primarily accessed through `pacote`, the library responsible\nfor all package fetching as of npm@5.\n\nAll data that passes through the cache is fully verified for integrity on\nboth insertion and extraction. Cache corruption will either trigger an\nerror, or signal to `pacote` that the data must be refetched, which it will\ndo automatically. For this reason, it should never be necessary to clear\nthe cache for any reason other than reclaiming disk space, thus why `clean`\nnow requires `--force` to run.\n\nThere is currently no method exposed through npm to inspect or directly\nmanage the contents of this cache. In order to access it, `cacache` must be\nused directly.\n\nnpm will not remove data by itself: the cache will grow as new packages are\ninstalled.\n\n### A note about the cache's design\n\nThe npm cache is strictly a cache: it should not be relied upon as a\npersistent and reliable data store for package data. npm makes no guarantee\nthat a previously-cached piece of data will be available later, and will\nautomatically delete corrupted contents. The primary guarantee that the\ncache makes is that, if it does return data, that data will be exactly the\ndata that was inserted.\n\nTo run an offline verification of existing cache contents, use `npm cache\nverify`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `cache`\n\n* Default: Windows: `%LocalAppData%\\npm-cache`, Posix: `~/.npm`\n* Type: Path\n\nThe location of npm's cache directory. See [`npm\ncache`](/cli/v8/commands/npm-cache)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm pack](/cli/v8/commands/npm-pack)\n* https://npm.im/cacache\n* https://npm.im/pacote\n* https://npm.im/@npmcli/arborist\n* https://npm.im/make-fetch-happen\n"},{"id":"74595d8e-ae40-5317-b911-7bcbebfe2811","frontmatter":{"title":"npm-ci"},"rawBody":"---\ntitle: npm-ci\nsection: 1\ndescription: Clean install a project\nredirect_from:\n  - /cli/ci\n  - /cli/ci.html\n  - /cli/commands/ci\n  - /cli-commands/ci\n  - /cli-commands/ci.html\n  - /cli-commands/npm-ci\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-ci.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ci.js -->\n\n```bash\nnpm ci\n\naliases: clean-install, ic, install-clean, isntall-clean\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ci.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command is similar to [`npm install`](/cli/v8/commands/npm-install), except\nit's meant to be used in automated environments such as test platforms,\ncontinuous integration, and deployment -- or any situation where you want\nto make sure you're doing a clean install of your dependencies.\n\nThe main differences between using `npm install` and `npm ci` are:\n\n* The project **must** have an existing `package-lock.json` or\n  `npm-shrinkwrap.json`.\n* If dependencies in the package lock do not match those in `package.json`,\n  `npm ci` will exit with an error, instead of updating the package lock.\n* `npm ci` can only install entire projects at a time: individual\n  dependencies cannot be added with this command.\n* If a `node_modules` is already present, it will be automatically removed\n  before `npm ci` begins its install.\n* It will never write to `package.json` or any of the package-locks:\n  installs are essentially frozen.\n\nNOTE: If you create your `package-lock.json` file by running `npm install`\nwith flags that can affect the shape of your dependency tree, such as\n`--legacy-peer-deps` or `--install-links`, you _must_ provide the same\nflags to `npm ci` or you are likely to encounter errors. An easy way to do\nthis is to run, for example,\n`npm config set legacy-peer-deps=true --location=project` and commit the\n`.npmrc` file to your repo.\n\n### Example\n\nMake sure you have a package-lock and an up-to-date install:\n\n```bash\n$ cd ./my/npm/project\n$ npm install\nadded 154 packages in 10s\n$ ls | grep package-lock\n```\n\nRun `npm ci` in that project\n\n```bash\n$ npm ci\nadded 154 packages in 5s\n```\n\nConfigure Travis CI to build using `npm ci` instead of `npm install`:\n\n```bash\n# .travis.yml\ninstall:\n- npm ci\n# keep the npm cache around to speed up installs\ncache:\n  directories:\n  - \"$HOME/.npm\"\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [package-lock.json](/cli/v8/configuring-npm/package-lock-json)\n"},{"id":"c7530471-97cd-5b09-852d-acd78fba60d7","frontmatter":{"title":"npm-completion"},"rawBody":"---\ntitle: npm-completion\nsection: 1\ndescription: Tab Completion for npm\nredirect_from:\n  - /cli/completion\n  - /cli/completion.html\n  - /cli/commands/completion\n  - /cli-commands/completion\n  - /cli-commands/completion.html\n  - /cli-commands/npm-completion\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-completion.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/completion.js -->\n\n```bash\nnpm completion\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/completion.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nEnables tab-completion in all npm commands.\n\nThe synopsis above\nloads the completions into your current shell.  Adding it to\nyour ~/.bashrc or ~/.zshrc will make the completions available\neverywhere:\n\n```bash\nnpm completion >> ~/.bashrc\nnpm completion >> ~/.zshrc\n```\n\nYou may of course also pipe the output of `npm completion` to a file\nsuch as `/usr/local/etc/bash_completion.d/npm` or \n`/etc/bash_completion.d/npm` if you have a system that will read \nthat file for you.\n\nWhen `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the\nenvironment, `npm completion` acts in \"plumbing mode\", and outputs\ncompletions based on the arguments.\n\n### See Also\n\n* [npm developers](/cli/v8/using-npm/developers)\n* [npm](/cli/v8/commands/npm)\n"},{"id":"387f6ca8-7caa-5065-8e51-6a2130bb1520","frontmatter":{"title":"npm-config"},"rawBody":"---\ntitle: npm-config\nsection: 1\ndescription: Manage the npm configuration files\nredirect_from:\n  - /cli/config\n  - /cli/config.html\n  - /cli/commands/config\n  - /cli-commands/config\n  - /cli-commands/config.html\n  - /cli-commands/npm-config\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-config.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/config.js -->\n\n```bash\nnpm config set <key>=<value> [<key>=<value> ...]\nnpm config get [<key> [<key> ...]]\nnpm config delete <key> [<key> ...]\nnpm config list [--json]\nnpm config edit\n\nalias: c\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/config.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nnpm gets its config settings from the command line, environment\nvariables, `npmrc` files, and in some cases, the `package.json` file.\n\nSee [npmrc](/cli/v8/configuring-npm/npmrc) for more information about the npmrc\nfiles.\n\nSee [config(7)](/cli/v8/using-npm/config) for a more thorough explanation of the\nmechanisms involved, and a full list of config options available.\n\nThe `npm config` command can be used to update and edit the contents\nof the user and global npmrc files.\n\n### Sub-commands\n\nConfig supports the following sub-commands:\n\n#### set\n\n```bash\nnpm config set key=value [key=value...]\nnpm set key=value [key=value...]\n```\n\nSets each of the config keys to the value provided.\n\nIf value is omitted, then it sets it to an empty string.\n\nNote: for backwards compatibility, `npm config set key value` is supported\nas an alias for `npm config set key=value`.\n\n#### get\n\n```bash\nnpm config get [key ...]\nnpm get [key ...]\n```\n\nEcho the config value(s) to stdout.\n\nIf multiple keys are provided, then the values will be prefixed with the\nkey names.\n\nIf no keys are provided, then this command behaves the same as `npm config\nlist`.\n\n#### list\n\n```bash\nnpm config list\n```\n\nShow all the config settings. Use `-l` to also show defaults. Use `--json`\nto show the settings in json format.\n\n#### delete\n\n```bash\nnpm config delete key [key ...]\n```\n\nDeletes the specified keys from all configuration files.\n\n#### edit\n\n```bash\nnpm config edit\n```\n\nOpens the config file in an editor.  Use the `--global` flag to edit the\nglobal config.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `location`\n\n* Default: \"user\" unless `--global` is passed, which will also set this value\n  to \"global\"\n* Type: \"global\", \"user\", or \"project\"\n\nWhen passed to `npm config` this refers to which config file to use.\n\nWhen set to \"global\" mode, packages are installed into the `prefix` folder\ninstead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm](/cli/v8/commands/npm)\n"},{"id":"ab6cb983-a718-5163-866f-ecfd28881471","frontmatter":{"title":"npm-dedupe"},"rawBody":"---\ntitle: npm-dedupe\nsection: 1\ndescription: Reduce duplication in the package tree\nredirect_from:\n  - /cli/dedupe\n  - /cli/dedupe.html\n  - /cli/commands/dedupe\n  - /cli-commands/dedupe\n  - /cli-commands/dedupe.html\n  - /cli-commands/npm-dedupe\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-dedupe.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/dedupe.js -->\n\n```bash\nnpm dedupe\n\nalias: ddp\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/dedupe.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nSearches the local package tree and attempts to simplify the overall\nstructure by moving dependencies further up the tree, where they can\nbe more effectively shared by multiple dependent packages.\n\nFor example, consider this dependency graph:\n\n```\na\n+-- b <-- depends on c@1.0.x\n|   `-- c@1.0.3\n`-- d <-- depends on c@~1.0.9\n    `-- c@1.0.10\n```\n\nIn this case, `npm dedupe` will transform the tree to:\n\n```bash\na\n+-- b\n+-- d\n`-- c@1.0.10\n```\n\nBecause of the hierarchical nature of node's module lookup, b and d\nwill both get their dependency met by the single c package at the root\nlevel of the tree.\n\nIn some cases, you may have a dependency graph like this:\n\n```\na\n+-- b <-- depends on c@1.0.x\n+-- c@1.0.3\n`-- d <-- depends on c@1.x\n    `-- c@1.9.9\n```\n\nDuring the installation process, the `c@1.0.3` dependency for `b` was\nplaced in the root of the tree.  Though `d`'s dependency on `c@1.x` could\nhave been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used,\nbecause npm favors updates by default, even when doing so causes\nduplication.\n\nRunning `npm dedupe` will cause npm to note the duplication and\nre-evaluate, deleting the nested `c` module, because the one in the root is\nsufficient.\n\nTo prefer deduplication over novelty during the installation process, run\n`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`.\n\nArguments are ignored. Dedupe always acts on the entire tree.\n\nNote that this operation transforms the dependency tree, but will never\nresult in new modules being installed.\n\nUsing `npm find-dupes` will run the command in `--dry-run` mode.\n\nNote: `npm dedupe` will never update the semver values of direct\ndependencies in your project `package.json`, if you want to update\nvalues in `package.json` you can run: `npm update --save` instead.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm find-dupes](/cli/v8/commands/npm-find-dupes)\n* [npm ls](/cli/v8/commands/npm-ls)\n* [npm update](/cli/v8/commands/npm-update)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"ba6071b7-b334-543e-b9bc-6774a82b4431","frontmatter":{"title":"npm-deprecate"},"rawBody":"---\ntitle: npm-deprecate\nsection: 1\ndescription: Deprecate a version of a package\nredirect_from:\n  - /cli/deprecate\n  - /cli/deprecate.html\n  - /cli/commands/deprecate\n  - /cli-commands/deprecate\n  - /cli-commands/deprecate.html\n  - /cli-commands/npm-deprecate\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-deprecate.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/deprecate.js -->\n\n```bash\nnpm deprecate <package-spec> <message>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/deprecate.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command will update the npm registry entry for a package, providing a\ndeprecation warning to all who attempt to install it.\n\nIt works on [version ranges](https://semver.npmjs.com/) as well as specific\nversions, so you can do something like this:\n\n```bash\nnpm deprecate my-thing@\"< 0.2.3\" \"critical bug fixed in v0.2.3\"\n```\n\nSemVer ranges passed to this command are interpreted such that they *do*\ninclude prerelease versions.  For example:\n\n```bash\nnpm deprecate my-thing@1.x \"1.x is no longer supported\"\n```\n\nIn this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.\n\nYou must be the package owner to deprecate something.  See the `owner` and\n`adduser` help topics.\n\nTo un-deprecate a package, specify an empty string (`\"\"`) for the `message`\nargument. Note that you must use double quotes with no space between them to\nformat an empty string.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n"},{"id":"855b8429-5f89-57ff-9569-ad00a2729f0a","frontmatter":{"title":"npm-diff"},"rawBody":"---\ntitle: npm-diff\nsection: 1\ndescription: The registry diff command\nredirect_from:\n  - /cli/diff\n  - /cli/diff.html\n  - /cli/commands/diff\n  - /cli-commands/diff\n  - /cli-commands/diff.html\n  - /cli-commands/npm-diff\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-diff.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/diff.js -->\n\n```bash\nnpm diff [...<paths>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/diff.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nSimilar to its `git diff` counterpart, this command will print diff patches\nof files for packages published to the npm registry.\n\n* `npm diff --diff=<spec-a> --diff=<spec-b>`\n\n    Compares two package versions using their registry specifiers, e.g:\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to\n    compare across forks of any package,\n    e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`.\n\n    Any valid spec can be used, so that it's also possible to compare\n    directories or git repositories,\n    e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg`\n\n    Here's an example comparing two different versions of a package named\n    `abbrev` from the registry:\n\n    ```bash\n    npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1\n    ```\n\n    On success, output looks like:\n\n    ```bash\n    diff --git a/package.json b/package.json\n    index v1.1.0..v1.1.1 100644\n    --- a/package.json\n    +++ b/package.json\n    @@ -1,6 +1,6 @@\n     {\n       \"name\": \"abbrev\",\n    -  \"version\": \"1.1.0\",\n    +  \"version\": \"1.1.1\",\n       \"description\": \"Like ruby's abbrev module, but in js\",\n       \"author\": \"Isaac Z. Schlueter <i@izs.me>\",\n       \"main\": \"abbrev.js\",\n    ```\n\n    Given the flexible nature of npm specs, you can also target local\n    directories or git repos just like when using `npm install`:\n\n    ```bash\n    npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path\n    ```\n\n    In the example above we can compare the contents from the package installed\n    from the git repo at `github.com/npm/libnpmdiff` with the contents of the\n    `./local-path` that contains a valid package, such as a modified copy of\n    the original.\n\n* `npm diff` (in a package directory, no arguments):\n\n    If the package is published to the registry, `npm diff` will fetch the\n    tarball version tagged as `latest` (this value can be configured using the\n    `tag` option) and proceed to compare the contents of files present in that\n    tarball, with the current files in your local file system.\n\n    This workflow provides a handy way for package authors to see what\n    package-tracked files have been changed in comparison with the latest\n    published version of that package.\n\n* `npm diff --diff=<pkg-name>` (in a package directory):\n\n    When using a single package name (with no version or tag specifier) as an\n    argument, `npm diff` will work in a similar way to\n    [`npm-outdated`](npm-outdated) and reach for the registry to figure out\n    what current published version of the package named `<pkg-name>`\n    will satisfy its dependent declared semver-range. Once that specific\n    version is known `npm diff` will print diff patches comparing the\n    current version of `<pkg-name>` found in the local file system with\n    that specific version returned by the registry.\n\n    Given a package named `abbrev` that is currently installed:\n\n    ```bash\n    npm diff --diff=abbrev\n    ```\n\n    That will request from the registry its most up to date version and\n    will print a diff output comparing the currently installed version to this\n    newer one if the version numbers are not the same.\n\n* `npm diff --diff=<spec-a>` (in a package directory):\n\n    Similar to using only a single package name, it's also possible to declare\n    a full registry specifier version if you wish to compare the local version\n    of an installed package with the specific version/tag/semver-range provided\n    in `<spec-a>`.\n\n    An example: assuming `pkg@1.0.0` is installed in the current `node_modules`\n    folder, running:\n\n    ```bash\n    npm diff --diff=pkg@2.0.0\n    ```\n\n    It will effectively be an alias to\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`.\n\n* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory):\n\n    Using `npm diff` along with semver-valid version numbers is a shorthand\n    to compare different versions of the current package.\n\n    It needs to be run from a package directory, such that for a package named\n    `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running\n    `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`.\n\n    If only a single argument `<version-a>` is provided, then the current local\n    file system is going to be compared against that version.\n\n    Here's an example comparing two specific versions (published to the\n    configured registry) of the current project directory:\n\n    ```bash\n    npm diff --diff=1.0.0 --diff=1.1.0\n    ```\n\nNote that tag names are not valid `--diff` argument values, if you wish to\ncompare to a published tag, you must use the `pkg@tagname` syntax.\n\n#### Filtering files\n\nIt's possible to also specify positional arguments using file names or globs\npattern matching in order to limit the result of diff patches to only a subset\nof files for a given package, e.g:\n\n  ```bash\n  npm diff --diff=pkg@2 ./lib/ CHANGELOG.md\n  ```\n\nIn the example above the diff output is only going to print contents of files\nlocated within the folder `./lib/` and changed lines of code within the\n`CHANGELOG.md` file.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `diff`\n\n* Default:\n* Type: String (can be set multiple times)\n\nDefine arguments to compare in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-name-only`\n\n* Default: false\n* Type: Boolean\n\nPrints only filenames when using `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-unified`\n\n* Default: 3\n* Type: Number\n\nThe number of lines of context to print in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-ignore-all-space`\n\n* Default: false\n* Type: Boolean\n\nIgnore whitespace when comparing lines in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-no-prefix`\n\n* Default: false\n* Type: Boolean\n\nDo not show any source or destination prefix in `npm diff` output.\n\nNote: this causes `npm diff` to ignore the `--diff-src-prefix` and\n`--diff-dst-prefix` configs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-src-prefix`\n\n* Default: \"a/\"\n* Type: String\n\nSource prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-dst-prefix`\n\n* Default: \"b/\"\n* Type: String\n\nDestination prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-text`\n\n* Default: false\n* Type: Boolean\n\nTreat all files as text in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n## See Also\n\n* [npm outdated](/cli/v8/commands/npm-outdated)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm registry](/cli/v8/using-npm/registry)\n"},{"id":"bde3c7fe-0c94-54af-a454-34a9c7df3b03","frontmatter":{"title":"npm-dist-tag"},"rawBody":"---\ntitle: npm-dist-tag\nsection: 1\ndescription: Modify package distribution tags\nredirect_from:\n  - /cli/dist-tag\n  - /cli/dist-tag.html\n  - /cli/commands/dist-tag\n  - /cli-commands/dist-tag\n  - /cli-commands/dist-tag.html\n  - /cli-commands/npm-dist-tag\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-dist-tag.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/dist-tag.js -->\n\n```bash\nnpm dist-tag add <package-spec (with version)> [<tag>]\nnpm dist-tag rm <package-spec> <tag>\nnpm dist-tag ls [<package-spec>]\n\nalias: dist-tags\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/dist-tag.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nAdd, remove, and enumerate distribution tags on a package:\n\n* add: Tags the specified version of the package with the specified tag,\n  or the `--tag` config if not specified. If you have two-factor\n  authentication on auth-and-writes then you’ll need to include a\n  one-time password on the command line with\n  `--otp <one-time password>`, or at the OTP prompt.\n\n* rm: Clear a tag that is no longer in use from the package. If you have\n  two-factor authentication on auth-and-writes then you’ll need to include\n  a one-time password on the command line with `--otp <one-time password>`,\n  or at the OTP prompt.\n\n* ls: Show all of the dist-tags for a package, defaulting to the package in\n  the current prefix. This is the default action if none is specified.\n\nA tag can be used when installing packages as a reference to a version instead\nof using a specific version number:\n\n```bash\nnpm install <name>@<tag>\n```\n\nWhen installing dependencies, a preferred tagged version may be specified:\n\n```bash\nnpm install --tag <tag>\n```\n\n(This also applies to any other commands that resolve and install\ndependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.)\n\nPublishing a package sets the `latest` tag to the published version unless the\n`--tag` option is used. For example, `npm publish --tag=beta`.\n\nBy default, `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag.\n\n### Purpose\n\nTags can be used to provide an alias instead of version numbers.\n\nFor example, a project might choose to have multiple streams of development\nand use a different tag for each stream, e.g., `stable`, `beta`, `dev`,\n`canary`.\n\nBy default, the `latest` tag is used by npm to identify the current version\nof a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`\nspecifier) installs the `latest` tag. Typically, projects only use the\n`latest` tag for stable release versions, and use other tags for unstable\nversions such as prereleases.\n\nThe `next` tag is used by some projects to identify the upcoming version.\n\nOther than `latest`, no tag has any special significance to npm itself.\n\n### Caveats\n\nThis command used to be known as `npm tag`, which only created new tags,\nand so had a different syntax.\n\nTags must share a namespace with version numbers, because they are\nspecified in the same slot: `npm install <pkg>@<version>` vs\n`npm install <pkg>@<tag>`.\n\nTags that can be interpreted as valid semver ranges will be rejected. For\nexample, `v1.4` cannot be used as a tag, because it is interpreted by\nsemver as `>=1.4.0 <1.5.0`.  See <https://github.com/npm/npm/issues/6082>.\n\nThe simplest way to avoid semver problems with tags is to use tags that do\nnot begin with a number or the letter `v`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm dedupe](/cli/v8/commands/npm-dedupe)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"85dd98f3-3efa-510d-b1a7-1725a8a601a4","frontmatter":{"title":"npm-docs"},"rawBody":"---\ntitle: npm-docs\nsection: 1\ndescription: Open documentation for a package in a web browser\nredirect_from:\n  - /cli/docs\n  - /cli/docs.html\n  - /cli/commands/docs\n  - /cli-commands/docs\n  - /cli-commands/docs.html\n  - /cli-commands/npm-docs\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-docs.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/docs.js -->\n\n```bash\nnpm docs [<pkgname> [<pkgname> ...]]\n\nalias: home\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/docs.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command tries to guess at the likely location of a package's\ndocumentation URL, and then tries to open it using the `--browser` config\nparam. You can pass multiple package names at once. If no package name is\nprovided, it will search for a `package.json` in the current folder and use\nthe `name` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm view](/cli/v8/commands/npm-view)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [package.json](/cli/v8/configuring-npm/package-json)\n"},{"id":"dfc35685-5cd0-5759-8030-de2ed10de543","frontmatter":{"title":"npm-doctor"},"rawBody":"---\ntitle: npm-doctor\nsection: 1\ndescription: Check your npm environment\nredirect_from:\n  - /cli/doctor\n  - /cli/doctor.html\n  - /cli/commands/doctor\n  - /cli-commands/doctor\n  - /cli-commands/doctor.html\n  - /cli-commands/npm-doctor\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-doctor.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/doctor.js -->\n\n```bash\nnpm doctor\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/doctor.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n`npm doctor` runs a set of checks to ensure that your npm installation has\nwhat it needs to manage your JavaScript packages. npm is mostly a\nstandalone tool, but it does have some basic requirements that must be met:\n\n+ Node.js and git must be executable by npm.\n+ The primary npm registry, `registry.npmjs.com`, or another service that\n  uses the registry API, is available.\n+ The directories that npm uses, `node_modules` (both locally and\n  globally), exist and can be written by the current user.\n+ The npm cache exists, and the package tarballs within it aren't corrupt.\n\nWithout all of these working properly, npm may not work properly.  Many\nissues are often attributable to things that are outside npm's code base,\nso `npm doctor` confirms that the npm installation is in a good state.\n\nAlso, in addition to this, there are also very many issue reports due to\nusing old versions of npm. Since npm is constantly improving, running\n`npm@latest` is better than an old version.\n\n`npm doctor` verifies the following items in your environment, and if there\nare any recommended changes, it will display them.\n\n#### `npm ping`\n\nBy default, npm installs from the primary npm registry,\n`registry.npmjs.org`.  `npm doctor` hits a special ping endpoint within the\nregistry. This can also be checked with `npm ping`. If this check fails,\nyou may be using a proxy that needs to be configured, or may need to talk\nto your IT staff to get access over HTTPS to `registry.npmjs.org`.\n\nThis check is done against whichever registry you've configured (you can\nsee what that is by running `npm config get registry`), and if you're using\na private registry that doesn't support the `/whoami` endpoint supported by\nthe primary registry, this check may fail.\n\n#### `npm -v`\n\nWhile Node.js may come bundled with a particular version of npm, it's the\npolicy of the CLI team that we recommend all users run `npm@latest` if they\ncan. As the CLI is maintained by a small team of contributors, there are\nonly resources for a single line of development, so npm's own long-term\nsupport releases typically only receive critical security and regression\nfixes. The team believes that the latest tested version of npm is almost\nalways likely to be the most functional and defect-free version of npm.\n\n#### `node -v`\n\nFor most users, in most circumstances, the best version of Node will be the\nlatest long-term support (LTS) release. Those of you who want access to new\nECMAscript features or bleeding-edge changes to Node's standard library may\nbe running a newer version, and some may be required to run an older\nversion of Node because of enterprise change control policies. That's OK!\nBut in general, the npm team recommends that most users run Node.js LTS.\n\n#### `npm config get registry`\n\nYou may be installing from private package registries for your project or\ncompany. That's great! Others may be following tutorials or StackOverflow\nquestions in an effort to troubleshoot problems you may be having.\nSometimes, this may entail changing the registry you're pointing at.  This\npart of `npm doctor` just lets you, and maybe whoever's helping you with\nsupport, know that you're not using the default registry.\n\n#### `which git`\n\nWhile it's documented in the README, it may not be obvious that npm needs\nGit installed to do many of the things that it does. Also, in some cases\n– especially on Windows – you may have Git set up in such a way that it's\nnot accessible via your `PATH` so that npm can find it. This check ensures\nthat Git is available.\n\n#### Permissions checks\n\n* Your cache must be readable and writable by the user running npm.\n* Global package binaries must be writable by the user running npm.\n* Your local `node_modules` path, if you're running `npm doctor` with a\n  project directory, must be readable and writable by the user running npm.\n\n#### Validate the checksums of cached packages\n\nWhen an npm package is published, the publishing process generates a\nchecksum that npm uses at install time to verify that the package didn't\nget corrupted in transit. `npm doctor` uses these checksums to validate the\npackage tarballs in your local cache (you can see where that cache is\nlocated with `npm config get cache`). In the event that there are corrupt\npackages in your cache, you should probably run `npm cache clean -f` and\nreset the cache.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm bugs](/cli/v8/commands/npm-bugs)\n* [npm help](/cli/v8/commands/npm-help)\n* [npm ping](/cli/v8/commands/npm-ping)\n"},{"id":"badee149-e3d9-5f04-8dda-7aeba2f67c0b","frontmatter":{"title":"npm-edit"},"rawBody":"---\ntitle: npm-edit\nsection: 1\ndescription: Edit an installed package\nredirect_from:\n  - /cli/edit\n  - /cli/edit.html\n  - /cli/commands/edit\n  - /cli-commands/edit\n  - /cli-commands/edit.html\n  - /cli-commands/npm-edit\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-edit.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/edit.js -->\n\n```bash\nnpm edit <pkg>[/<subpkg>...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/edit.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSelects a dependency in the current project and opens the package folder in\nthe default editor (or whatever you've configured as the npm `editor`\nconfig -- see [`npm-config`](npm-config).)\n\nAfter it has been edited, the package is rebuilt so as to pick up any\nchanges in compiled packages.\n\nFor instance, you can do `npm install connect` to install connect\ninto your package, and then `npm edit connect` to make a few\nchanges to your locally installed copy.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm explore](/cli/v8/commands/npm-explore)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"f8e7bee1-8b47-5590-b365-ad8201352ec3","frontmatter":{"title":"npm-exec"},"rawBody":"---\ntitle: npm-exec\nsection: 1\ndescription: Run a command from a local or remote npm package\nredirect_from:\n  - /cli/exec\n  - /cli/exec.html\n  - /cli/commands/exec\n  - /cli-commands/exec\n  - /cli-commands/exec.html\n  - /cli-commands/npm-exec\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-exec.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/exec.js -->\n\n```bash\nnpm exec -- <pkg>[@<version>] [args...]\nnpm exec --package=<pkg>[@<version>] -- <cmd> [args...]\nnpm exec -c '<cmd> [args...]'\nnpm exec --package=foo -c '<cmd> [args...]'\n\nalias: x\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/exec.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command allows you to run an arbitrary command from an npm package\n(either one installed locally, or fetched remotely), in a similar context\nas running it via `npm run`.\n\nRun without positional arguments or `--call`, this allows you to\ninteractively run commands in the same sort of shell environment that\n`package.json` scripts are run.  Interactive mode is not supported in CI\nenvironments when standard input is a TTY, to prevent hangs.\n\nWhatever packages are specified by the `--package` option will be\nprovided in the `PATH` of the executed command, along with any locally\ninstalled package executables.  The `--package` option may be\nspecified multiple times, to execute the supplied command in an environment\nwhere all specified packages are available.\n\nIf any requested packages are not present in the local project\ndependencies, then they are installed to a folder in the npm cache, which\nis added to the `PATH` environment variable in the executed process.  A\nprompt is printed (which can be suppressed by providing either `--yes` or\n`--no`).\n\nPackage names provided without a specifier will be matched with whatever\nversion exists in the local project.  Package names with a specifier will\nonly be considered a match if they have the exact same name and version as\nthe local dependency.\n\nIf no `-c` or `--call` option is provided, then the positional arguments\nare used to generate the command string.  If no `--package` options\nare provided, then npm will attempt to determine the executable name from\nthe package specifier provided as the first positional argument according\nto the following heuristic:\n\n- If the package has a single entry in its `bin` field in `package.json`,\n  or if all entries are aliases of the same command, then that command\n  will be used.\n- If the package has multiple `bin` entries, and one of them matches the\n  unscoped portion of the `name` field, then that command will be used.\n- If this does not result in exactly one option (either because there are\n  no bin entries, or none of them match the `name` of the package), then\n  `npm exec` exits with an error.\n\nTo run a binary _other than_ the named binary, specify one or more\n`--package` options, which will prevent npm from inferring the package from\nthe first command argument.\n\n### `npx` vs `npm exec`\n\nWhen run via the `npx` binary, all flags and options *must* be set prior to\nany positional arguments.  When run via `npm exec`, a double-hyphen `--`\nflag can be used to suppress npm's parsing of switches and options that\nshould be sent to the executed command.\n\nFor example:\n\n```\n$ npx foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will resolve the `foo` package name, and run the\nfollowing command:\n\n```\n$ foo bar --package=@npmcli/foo\n```\n\nSince the `--package` option comes _after_ the positional arguments, it is\ntreated as an argument to the executed command.\n\nIn contrast, due to npm's argument parsing logic, running this command is\ndifferent:\n\n```\n$ npm exec foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will parse the `--package` option first, resolving the\n`@npmcli/foo` package.  Then, it will execute the following command in that\ncontext:\n\n```\n$ foo@latest bar\n```\n\nThe double-hyphen character is recommended to explicitly tell npm to stop\nparsing command line options and switches.  The following command would\nthus be equivalent to the `npx` command above:\n\n```\n$ npm exec -- foo@latest bar --package=@npmcli/foo\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `package`\n\n* Default:\n* Type: String (can be set multiple times)\n\nThe package or packages to install for [`npm exec`](/cli/v8/commands/npm-exec)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `call`\n\n* Default: \"\"\n* Type: String\n\nOptional companion option for `npm exec`, `npx` that allows for specifying a\ncustom command to be run along with the installed packages.\n\n```bash\nnpm exec --package yo --package generator-node --call \"yo node\"\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Examples\n\nRun the version of `tap` in the local dependencies, with the provided\narguments:\n\n```\n$ npm exec -- tap --bail test/foo.js\n$ npx tap --bail test/foo.js\n```\n\nRun a command _other than_ the command whose name matches the package name\nby specifying a `--package` option:\n\n```\n$ npm exec --package=foo -- bar --bar-argument\n# ~ or ~\n$ npx --package=foo bar --bar-argument\n```\n\nRun an arbitrary shell script, in the context of the current project:\n\n```\n$ npm x -c 'eslint && say \"hooray, lint passed\"'\n$ npx -c 'eslint && say \"hooray, lint passed\"'\n```\n\n### Workspaces support\n\nYou may use the `workspace` or `workspaces` configs in order to run an\narbitrary command from an npm package (either one installed locally, or fetched\nremotely) in the context of the specified workspaces.\nIf no positional argument or `--call` option is provided, it will open an\ninteractive subshell in the context of each of these configured workspaces one\nat a time.\n\nGiven a project with configured workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   +-- b\n   |   `-- package.json\n   `-- c\n       `-- package.json\n```\n\nAssuming the workspace configuration is properly set up at the root level\n`package.json` file. e.g:\n\n```\n{\n    \"workspaces\": [ \"./packages/*\" ]\n}\n```\n\nYou can execute an arbitrary command from a package in the context of each of\nthe configured workspaces when using the `workspaces` configuration options,\nin this example we're using **eslint** to lint any js file found within each\nworkspace folder:\n\n```\nnpm exec --ws -- eslint ./*.js\n```\n\n#### Filtering workspaces\n\nIt's also possible to execute a command in a single workspace using the\n`workspace` config along with a name or directory path:\n\n```\nnpm exec --workspace=a -- eslint ./*.js\n```\n\nThe `workspace` config can also be specified multiple times in order to run a\nspecific script in the context of multiple workspaces. When defining values for\nthe `workspace` config in the command line, it also possible to use `-w` as a\nshorthand, e.g:\n\n```\nnpm exec -w a -w b -- eslint ./*.js\n```\n\nThis last command will run the `eslint` command in both `./packages/a` and\n`./packages/b` folders.\n\n### Compatibility with Older npx Versions\n\nThe `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`\npackage deprecated at that time.  `npx` uses the `npm exec`\ncommand instead of a separate argument parser and install process, with\nsome affordances to maintain backwards compatibility with the arguments it\naccepted in previous versions.\n\nThis resulted in some shifts in its functionality:\n\n- Any `npm` config value may be provided.\n- To prevent security and user-experience problems from mistyping package\n  names, `npx` prompts before installing anything.  Suppress this\n  prompt with the `-y` or `--yes` option.\n- The `--no-install` option is deprecated, and will be converted to `--no`.\n- Shell fallback functionality is removed, as it is not advisable.\n- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand\n  for `--package` in npx.  This is maintained, but only for the `npx`\n  executable.\n- The `--ignore-existing` option is removed.  Locally installed bins are\n  always present in the executed process `PATH`.\n- The `--npm` option is removed.  `npx` will always use the `npm` it ships\n  with.\n- The `--node-arg` and `-n` options are removed.\n- The `--always-spawn` option is redundant, and thus removed.\n- The `--shell` option is replaced with `--script-shell`, but maintained\n  in the `npx` executable for backwards compatibility.\n\n### A note on caching\n\nThe npm cli utilizes its internal package cache when using the package\nname specified.  You can use the following to change how and when the\ncli uses this cache. See [`npm cache`](/cli/v8/commands/npm-cache) for more on\nhow the cache works.\n\n#### prefer-online\n\nForces staleness checks for packages, making the cli look for updates\nimmediately even if the package is already in the cache.\n\n#### prefer-offline\n\nBypasses staleness checks for packages.  Missing data will still be\nrequested from the server. To force full offline mode, use `offline`.\n\n#### offline\n\nForces full offline mode. Any packages not locally cached will result in\nan error.\n\n#### workspace\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result to selecting all of the\n  nested workspaces)\n\nThis value is not exported to the environment for child processes.\n\n#### workspaces\n\n* Alias: `--ws`\n* Type: Boolean\n* Default: `false`\n\nRun scripts in the context of all configured workspaces for the current\nproject.\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm restart](/cli/v8/commands/npm-restart)\n* [npm stop](/cli/v8/commands/npm-stop)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm workspaces](/cli/v8/using-npm/workspaces)\n* [npx](/cli/v8/commands/npx)\n"},{"id":"94820ccb-b357-5be4-a341-2574eaa456c1","frontmatter":{"title":"npm-explain"},"rawBody":"---\ntitle: npm-explain\nsection: 1\ndescription: Explain installed packages\nredirect_from:\n  - /cli/explain\n  - /cli/explain.html\n  - /cli/commands/explain\n  - /cli-commands/explain\n  - /cli-commands/explain.html\n  - /cli-commands/npm-explain\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-explain.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/explain.js -->\n\n```bash\nnpm explain <package-spec>\n\nalias: why\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/explain.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command will print the chain of dependencies causing a given package\nto be installed in the current project.\n\nIf one or more package specs are provided, then only packages matching\none of the specifiers will have their relationships explained.\n\nThe package spec can also refer to a folder within `./node_modules`\n\nFor example, running `npm explain glob` within npm's source tree will show:\n\n```bash\nglob@7.1.6\nnode_modules/glob\n  glob@\"^7.1.4\" from the root project\n\nglob@7.1.1 dev\nnode_modules/tacks/node_modules/glob\n  glob@\"^7.0.5\" from rimraf@2.6.2\n  node_modules/tacks/node_modules/rimraf\n    rimraf@\"^2.6.2\" from tacks@1.3.0\n    node_modules/tacks\n      dev tacks@\"^1.3.0\" from the root project\n```\n\nTo explain just the package residing at a specific folder, pass that as the\nargument to the command.  This can be useful when trying to figure out\nexactly why a given dependency is being duplicated to satisfy conflicting\nversion requirements within the project.\n\n```bash\n$ npm explain node_modules/nyc/node_modules/find-up\nfind-up@3.0.0 dev\nnode_modules/nyc/node_modules/find-up\n  find-up@\"^3.0.0\" from nyc@14.1.1\n  node_modules/nyc\n    nyc@\"^14.1.1\" from tap@14.10.8\n    node_modules/tap\n      dev tap@\"^14.10.8\" from the root project\n```\n\n### Configuration\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm ls](/cli/v8/commands/npm-ls)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm link](/cli/v8/commands/npm-link)\n* [npm prune](/cli/v8/commands/npm-prune)\n* [npm outdated](/cli/v8/commands/npm-outdated)\n* [npm update](/cli/v8/commands/npm-update)\n"},{"id":"7a350c56-f0fa-5d75-ae5a-b225f528e145","frontmatter":{"title":"npm-explore"},"rawBody":"---\ntitle: npm-explore\nsection: 1\ndescription: Browse an installed package\nredirect_from:\n  - /cli/explore\n  - /cli/explore.html\n  - /cli/commands/explore\n  - /cli-commands/explore\n  - /cli-commands/explore.html\n  - /cli-commands/npm-explore\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-explore.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/explore.js -->\n\n```bash\nnpm explore <pkg> [ -- <command>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/explore.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSpawn a subshell in the directory of the installed package specified.\n\nIf a command is specified, then it is run in the subshell, which then\nimmediately terminates.\n\nThis is particularly handy in the case of git submodules in the\n`node_modules` folder:\n\n```bash\nnpm explore some-dependency -- git pull origin master\n```\n\nNote that the package is *not* automatically rebuilt afterwards, so be\nsure to use `npm rebuild <pkg>` if you make any changes.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `shell`\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd.exe\" on\n  Windows\n* Type: String\n\nThe shell to run for the `npm explore` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm edit](/cli/v8/commands/npm-edit)\n* [npm rebuild](/cli/v8/commands/npm-rebuild)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"9940d031-4795-5ffc-8677-fd1617309847","frontmatter":{"title":"npm-find-dupes"},"rawBody":"---\ntitle: npm-find-dupes\nsection: 1\ndescription: Find duplication in the package tree\nredirect_from:\n  - /cli/find-dupes\n  - /cli/find-dupes.html\n  - /cli/commands/find-dupes\n  - /cli-commands/find-dupes\n  - /cli-commands/find-dupes.html\n  - /cli-commands/npm-find-dupes\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-find-dupes.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/find-dupes.js -->\n\n```bash\nnpm find-dupes\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/find-dupes.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nRuns `npm dedupe` in `--dry-run` mode, making npm only output the\nduplications, without actually changing the package tree.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm dedupe](/cli/v8/commands/npm-dedupe)\n* [npm ls](/cli/v8/commands/npm-ls)\n* [npm update](/cli/v8/commands/npm-update)\n* [npm install](/cli/v8/commands/npm-install)\n\n"},{"id":"6507d9a2-f327-5071-865d-8cb2e1f22a4f","frontmatter":{"title":"npm-fund"},"rawBody":"---\ntitle: npm-fund\nsection: 1\ndescription: Retrieve funding information\nredirect_from:\n  - /cli/fund\n  - /cli/fund.html\n  - /cli/commands/fund\n  - /cli-commands/fund\n  - /cli-commands/fund.html\n  - /cli-commands/npm-fund\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-fund.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/fund.js -->\n\n```bash\nnpm fund [<package-spec>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/fund.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command retrieves information on how to fund the dependencies of a\ngiven project. If no package name is provided, it will list all\ndependencies that are looking for funding in a tree structure, listing\nthe type of funding and the url to visit. If a package name is provided\nthen it tries to open its funding url using the `--browser` config\nparam; if there are multiple funding sources for the package, the user\nwill be instructed to pass the `--which` option to disambiguate.\n\nThe list will avoid duplicated entries and will stack all packages that\nshare the same url as a single entry. Thus, the list does not have the\nsame shape of the output from `npm ls`.\n\n#### Example\n\n### Workspaces support\n\nIt's possible to filter the results to only include a single workspace\nand its dependencies using the `workspace` config option.\n\n#### Example:\n\nHere's an example running `npm fund` in a project with a configured\nworkspace `a`:\n\n```bash\n$ npm fund\ntest-workspaces-fund@1.0.0\n+-- https://example.com/a\n| | `-- a@1.0.0\n| `-- https://example.com/maintainer\n|     `-- foo@1.0.0\n+-- https://example.com/npmcli-funding\n|   `-- @npmcli/test-funding\n`-- https://example.com/org\n    `-- bar@2.0.0\n```\n\nAnd here is an example of the expected result when filtering only by a\nspecific workspace `a` in the same project:\n\n```bash\n$ npm fund -w a\ntest-workspaces-fund@1.0.0\n`-- https://example.com/a\n  | `-- a@1.0.0\n  `-- https://example.com/maintainer\n      `-- foo@2.0.0\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `which`\n\n* Default: null\n* Type: null or Number\n\nIf there are multiple funding sources, which 1-indexed source URL to open.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n## See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm docs](/cli/v8/commands/npm-docs)\n* [npm ls](/cli/v8/commands/npm-ls)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"af6f076b-da37-5fd1-bdca-cbf13db29b81","frontmatter":{"title":"npm-help-search"},"rawBody":"---\ntitle: npm-help-search\nsection: 1\ndescription: Search npm help documentation\nredirect_from:\n  - /cli/help-search\n  - /cli/help-search.html\n  - /cli/commands/help-search\n  - /cli-commands/help-search\n  - /cli-commands/help-search.html\n  - /cli-commands/npm-help-search\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-help-search.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/help-search.js -->\n\n```bash\nnpm help-search <text>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/help-search.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command will search the npm markdown documentation files for the terms\nprovided, and then list the results, sorted by relevance.\n\nIf only one result is found, then it will show that help topic.\n\nIf the argument to `npm help` is not a known help topic, then it will call\n`help-search`.  It is rarely if ever necessary to call this command\ndirectly.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm](/cli/v8/commands/npm)\n* [npm help](/cli/v8/commands/npm-help)\n"},{"id":"3d002cb3-7aaf-5067-a0b6-694a8ba3c58e","frontmatter":{"title":"npm-help"},"rawBody":"---\ntitle: npm-help\nsection: 1\ndescription: Get help on npm\nredirect_from:\n  - /cli/help\n  - /cli/help.html\n  - /cli/commands/help\n  - /cli-commands/help\n  - /cli-commands/help.html\n  - /cli-commands/npm-help\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-help.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/help.js -->\n\n```bash\nnpm help <term> [<terms..>]\n\nalias: hlep\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/help.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nIf supplied a topic, then show the appropriate documentation page.\n\nIf the topic does not exist, or if multiple terms are provided, then npm\nwill run the `help-search` command to find a match.  Note that, if\n`help-search` finds a single subject, then it will run `help` on that\ntopic, so unique matches are equivalent to specifying a topic name.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `viewer`\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: String\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm](/cli/v8/commands/npm)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm help-search](/cli/v8/commands/npm-help-search)\n"},{"id":"f041fd7c-083e-52c6-b961-452926a759e4","frontmatter":{"title":"npm-hook"},"rawBody":"---\ntitle: npm-hook\nsection: 1\ndescription: Manage registry hooks\nredirect_from:\n  - /cli/hook\n  - /cli/hook.html\n  - /cli/commands/hook\n  - /cli-commands/hook\n  - /cli-commands/hook.html\n  - /cli-commands/npm-hook\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-hook.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/hook.js -->\n\n```bash\nnpm hook add <pkg> <url> <secret> [--type=<type>]\nnpm hook ls [pkg]\nnpm hook rm <id>\nnpm hook update <id> <url> <secret>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/hook.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nAllows you to manage [npm\nhooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),\nincluding adding, removing, listing, and updating.\n\nHooks allow you to configure URL endpoints that will be notified whenever a\nchange happens to any of the supported entity types. Three different types\nof entities can be watched by hooks: packages, owners, and scopes.\n\nTo create a package hook, simply reference the package name.\n\nTo create an owner hook, prefix the owner name with `~` (as in,\n`~youruser`).\n\nTo create a scope hook, prefix the scope name with `@` (as in,\n`@yourscope`).\n\nThe hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls`\nfor that particular hook.\n\nThe shared secret will be sent along to the URL endpoint so you can verify\nthe request came from your own configured hook.\n\n### Example\n\nAdd a hook to watch a package for changes:\n\n```bash\n$ npm hook add lodash https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages belonging to the user `substack`:\n\n```bash\n$ npm hook add ~substack https://example.com/ my-shared-secret\n```\n\nAdd a hook to watch packages in the scope `@npm`\n\n```bash\n$ npm hook add @npm https://example.com/ my-shared-secret\n```\n\nList all your active hooks:\n\n```bash\n$ npm hook ls\n```\n\nList your active hooks for the `lodash` package:\n\n```bash\n$ npm hook ls lodash\n```\n\nUpdate an existing hook's url:\n\n```bash\n$ npm hook update id-deadbeef https://my-new-website.here/\n```\n\nRemove a hook:\n\n```bash\n$ npm hook rm id-deadbeef\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [\"Introducing Hooks\" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)\n"},{"id":"d2d306f1-df79-5ea6-bc8f-32a79bf21a8a","frontmatter":{"title":"npm-init"},"rawBody":"---\ntitle: npm-init\nsection: 1\ndescription: Create a package.json file\nredirect_from:\n  - /cli/init\n  - /cli/init.html\n  - /cli/commands/init\n  - /cli-commands/init\n  - /cli-commands/init.html\n  - /cli-commands/npm-init\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-init.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/init.js -->\n\n```bash\nnpm init <package-spec> (same as `npx <package-spec>)\nnpm init <@scope> (same as `npx <@scope>/create`)\n\naliases: create, innit\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/init.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\n`npm init <initializer>` can be used to set up a new or existing npm\npackage.\n\n`initializer` in this case is an npm package named `create-<initializer>`,\nwhich will be installed by [`npm-exec`](/cli/v8/commands/npm-exec), and then have its\nmain bin executed -- presumably creating or updating `package.json` and\nrunning any other initialization-related operations.\n\nThe init command is transformed to a corresponding `npm exec` operation as\nfollows:\n\n* `npm init foo` -> `npm exec create-foo`\n* `npm init @usr/foo` -> `npm exec @usr/create-foo`\n* `npm init @usr` -> `npm exec @usr/create`\n* `npm init @usr@2.0.0` -> `npm exec @usr/create@2.0.0`\n* `npm init @usr/foo@2.0.0` -> `npm exec @usr/create-foo@2.0.0`\n\nIf the initializer is omitted (by just calling `npm init`), init will fall\nback to legacy init behavior. It will ask you a bunch of questions, and\nthen write a package.json for you. It will attempt to make reasonable\nguesses based on existing fields, dependencies, and options selected. It is\nstrictly additive, so it will keep any fields and values that were already\nset. You can also use `-y`/`--yes` to skip the questionnaire altogether. If\nyou pass `--scope`, it will create a scoped package.\n\n*Note:* if a user already has the `create-<initializer>` package\nglobally installed, that will be what `npm init` uses.  If you want npm\nto use the latest version, or another specific version you must specify\nit:\n\n* `npm init foo@latest` # fetches and runs the latest `create-foo` from\n    the registry\n* `npm init foo@1.2.3` #  runs `create-foo@1.2.3` specifically\n\n#### Forwarding additional options\n\nAny additional options will be passed directly to the command, so `npm init\nfoo -- --hello` will map to `npm exec -- create-foo --hello`.\n\nTo better illustrate how options are forwarded, here's a more evolved\nexample showing options passed to both the **npm cli** and a create package,\nboth following commands are equivalent:\n\n- `npm init foo -y --registry=<url> -- --hello -a`\n- `npm exec -y --registry=<url> -- create-foo --hello -a`\n\n### Examples\n\nCreate a new React-based project using\n[`create-react-app`](https://npm.im/create-react-app):\n\n```bash\n$ npm init react-app ./my-react-app\n```\n\nCreate a new `esm`-compatible package using\n[`create-esm`](https://npm.im/create-esm):\n\n```bash\n$ mkdir my-esm-lib && cd my-esm-lib\n$ npm init esm --yes\n```\n\nGenerate a plain old package.json using legacy init:\n\n```bash\n$ mkdir my-npm-pkg && cd my-npm-pkg\n$ git init\n$ npm init\n```\n\nGenerate it without having it ask any questions:\n\n```bash\n$ npm init -y\n```\n\n### Workspaces support\n\nIt's possible to create a new workspace within your project by using the\n`workspace` config option. When using `npm init -w <dir>` the cli will\ncreate the folders and boilerplate expected while also adding a reference\nto your project `package.json` `\"workspaces\": []` property in order to make\nsure that new generated **workspace** is properly set up as such.\n\nGiven a project with no workspaces, e.g:\n\n```\n.\n+-- package.json\n```\n\nYou may generate a new workspace using the legacy init:\n\n```bash\n$ npm init -w packages/a\n```\n\nThat will generate a new folder and `package.json` file, while also updating\nyour top-level `package.json` to add the reference to this new workspace:\n\n```\n.\n+-- package.json\n`-- packages\n   `-- a\n       `-- package.json\n```\n\nThe workspaces init also supports the `npm init <initializer> -w <dir>`\nsyntax, following the same set of rules explained earlier in the initial\n**Description** section of this page. Similar to the previous example of\ncreating a new React-based project using\n[`create-react-app`](https://npm.im/create-react-app), the following syntax\nwill make sure to create the new react app as a nested **workspace** within your\nproject and configure your `package.json` to recognize it as such:\n\n```bash\nnpm init -w packages/my-react-app react-app .\n```\n\nThis will make sure to generate your react app as expected, one important\nconsideration to have in mind is that `npm exec` is going to be run in the\ncontext of the newly created folder for that workspace, and that's the reason\nwhy in this example the initializer uses the initializer name followed with a\ndot to represent the current directory in that context, e.g: `react-app .`:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- my-react-app\n       +-- README\n       +-- package.json\n       `-- ...\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `yes`\n\n* Default: null\n* Type: null or Boolean\n\nAutomatically answer \"yes\" to any prompts that npm might print on the\ncommand line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n* Allow unpublishing of entire packages (not just a single version).\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces-update`\n\n* Default: true\n* Type: Boolean\n\nIf set to true, the npm cli will run an update after operations that may\npossibly change the workspaces installed to the `node_modules` folder.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [init-package-json module](http://npm.im/init-package-json)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm version](/cli/v8/commands/npm-version)\n* [npm scope](/cli/v8/using-npm/scope)\n* [npm exec](/cli/v8/commands/npm-exec)\n* [npm workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"1c867688-2e6e-5b9f-bf8c-10f931dff00f","frontmatter":{"title":"npm-install-ci-test"},"rawBody":"---\ntitle: npm-install-ci-test\nsection: 1\ndescription: Install a project with a clean slate and run tests\nredirect_from:\n  - /cli/install-ci-test\n  - /cli/install-ci-test.html\n  - /cli/commands/install-ci-test\n  - /cli-commands/install-ci-test\n  - /cli-commands/install-ci-test.html\n  - /cli-commands/npm-install-ci-test\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-install-ci-test.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install-ci-test.js -->\n\n```bash\nnpm install-ci-test\n\nalias: cit\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install-ci-test.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command runs `npm ci` followed immediately by `npm test`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install-test](/cli/v8/commands/npm-install-test)\n* [npm ci](/cli/v8/commands/npm-ci)\n* [npm test](/cli/v8/commands/npm-test)\n"},{"id":"6b403260-b522-5a4d-9be0-d22be88e0469","frontmatter":{"title":"npm-install-test"},"rawBody":"---\ntitle: npm-install-test\nsection: 1\ndescription: Install package(s) and run tests\nredirect_from:\n  - /cli/install-test\n  - /cli/install-test.html\n  - /cli/commands/install-test\n  - /cli-commands/install-test\n  - /cli-commands/install-test.html\n  - /cli-commands/npm-install-test\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-install-test.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install-test.js -->\n\n```bash\nnpm install-test [<package-spec> ...]\n\nalias: it\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install-test.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command runs an `npm install` followed immediately by an `npm test`. It\ntakes exactly the same arguments as `npm install`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm install-ci-test](/cli/v8/commands/npm-install-ci-test)\n* [npm test](/cli/v8/commands/npm-test)\n"},{"id":"0f785701-b98b-58e3-af06-47729d726c08","frontmatter":{"title":"npm-install"},"rawBody":"---\ntitle: npm-install\nsection: 1\ndescription: Install a package\nredirect_from:\n  - /cli/install\n  - /cli/install.html\n  - /cli/commands/install\n  - /cli-commands/install\n  - /cli-commands/install.html\n  - /cli-commands/npm-install\n  - /cli-documentation/install\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-install.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install.js -->\n\n```bash\nnpm install [<package-spec> ...]\n\naliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/install.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command installs a package and any packages that it depends on. If the\npackage has a package-lock, or an npm shrinkwrap file, or a yarn lock file,\nthe installation of dependencies will be driven by that, respecting the\nfollowing order of precedence:\n\n* `npm-shrinkwrap.json`\n* `package-lock.json`\n* `yarn.lock`\n\nSee [package-lock.json](/cli/v8/configuring-npm/package-lock-json) and\n[`npm shrinkwrap`](/cli/v8/commands/npm-shrinkwrap).\n\nA `package` is:\n\n* a) a folder containing a program described by a\n  [`package.json`](/cli/v8/configuring-npm/package-json) file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry (see\n  [`registry`](/cli/v8/using-npm/registry)) with (c)\n* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v8/commands/npm-dist-tag)) that\n  points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `<git remote url>` that resolves to (a)\n\nEven if you never publish your package, you can still get a lot of benefits\nof using npm if you just want to write a node program (a), and perhaps if\nyou also want to be able to easily install it elsewhere after packing it up\ninto a tarball (b).\n\n\n* `npm install` (in a package directory, no arguments):\n\n    Install the dependencies to the local `node_modules` folder.\n\n    In global mode (ie, with `-g` or `--global` appended to the command),\n    it installs the current package context (ie, the current working\n    directory) as a global package.\n\n    By default, `npm install` will install all modules listed as\n    dependencies in [`package.json`](/cli/v8/configuring-npm/package-json).\n\n    With the `--production` flag (or when the `NODE_ENV` environment\n    variable is set to `production`), npm will not install modules listed\n    in `devDependencies`. To install all modules listed in both\n    `dependencies` and `devDependencies` when `NODE_ENV` environment\n    variable is set to `production`, you can use `--production=false`.\n\n    > NOTE: The `--production` flag has no particular meaning when adding a\n    dependency to a project.\n\n* `npm install <folder>`:\n\n    If `<folder>` sits inside the root of your project, its dependencies will be installed and may\n    be hoisted to the top-level `node_modules` as they would for other\n    types of dependencies. If `<folder>` sits outside the root of your project,\n    *npm will not install the package dependencies* in the directory `<folder>`, \n    but it will create a symlink to `<folder>`.\n\n    > NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the `--install-links` option.\n\n    Example:\n\n    ```bash\n    npm install ../../other-package --install-links\n    npm install ./sub-package\n    ```\n\n* `npm install <tarball file>`:\n\n    Install a package that is sitting on the filesystem.  Note: if you just\n    want to link a dev directory into your npm root, you can do this more\n    easily by using [`npm link`](/cli/v8/commands/npm-link).\n\n    Tarball requirements:\n    * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the\n      extension.\n    * The package contents should reside in a subfolder inside the tarball\n      (usually it is called `package/`). npm strips one directory layer\n      when installing the package (an equivalent of `tar x\n      --strip-components=1` is run).\n    * The package must contain a `package.json` file with `name` and\n      `version` properties.\n\n    Example:\n\n    ```bash\n    npm install ./package.tgz\n    ```\n\n* `npm install <tarball url>`:\n\n    Fetch the tarball url, and then install it.  In order to distinguish between\n    this and other options, the argument must start with \"http://\" or \"https://\"\n\n    Example:\n\n    ```bash\n    npm install https://github.com/indexzero/forever/tarball/v0.5.6\n    ```\n\n* `npm install [<@scope>/]<name>`:\n\n    Do a `<name>@<tag>` install, where `<tag>` is the \"tag\" config. (See\n    [`config`](/cli/v8/using-npm/config). The config's default value is `latest`.)\n\n    In most cases, this will install the version of the modules tagged as\n    `latest` on the npm registry.\n\n    Example:\n\n    ```bash\n    npm install sax\n    ```\n\n    `npm install` saves any specified packages into `dependencies` by default.\n    Additionally, you can control where and how they get saved with some\n    additional flags:\n\n    * `-P, --save-prod`: Package will appear in your `dependencies`. This\n      is the default unless `-D` or `-O` are present.\n\n    * `-D, --save-dev`: Package will appear in your `devDependencies`.\n\n    * `-O, --save-optional`: Package will appear in your\n      `optionalDependencies`.\n\n    * `--no-save`: Prevents saving to `dependencies`.\n\n    When using any of the above options to save dependencies to your\n    package.json, there are two additional, optional flags:\n\n    * `-E, --save-exact`: Saved dependencies will be configured with an\n      exact version rather than using npm's default semver range operator.\n\n    * `-B, --save-bundle`: Saved dependencies will also be added to your\n      `bundleDependencies` list.\n\n    Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`\n    then it will be updated as well.\n\n    `<scope>` is optional. The package will be downloaded from the registry\n    associated with the specified scope. If no registry is associated with\n    the given scope the default registry is assumed. See\n    [`scope`](/cli/v8/using-npm/scope).\n\n    Note: if you do not include the @-symbol on your scope name, npm will\n    interpret this as a GitHub repository instead, see below. Scopes names\n    must also be followed by a slash.\n\n    Examples:\n\n    ```bash\n    npm install sax\n    npm install githubname/reponame\n    npm install @myorg/privatepackage\n    npm install node-tap --save-dev\n    npm install dtrace-provider --save-optional\n    npm install readable-stream --save-exact\n    npm install ansi-regex --save-bundle\n    ```\n\n    **Note**: If there is a file or folder named `<name>` in the current\n    working directory, then it will try to install that, and only try to\n    fetch the package by name if it is not valid.\n\n* `npm install <alias>@npm:<name>`:\n\n    Install a package under a custom alias. Allows multiple versions of\n    a same-name package side-by-side, more convenient import names for\n    packages with otherwise long ones, and using git forks replacements\n    or forked npm packages as replacements. Aliasing works only on your\n    project and does not rename packages in transitive dependencies.\n    Aliases should follow the naming conventions stated in\n    [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).\n\n    Examples:\n\n    ```bash\n    npm install my-react@npm:react\n    npm install jquery2@npm:jquery@2\n    npm install jquery3@npm:jquery@3\n    npm install npa@npm:npm-package-arg\n    ```\n\n* `npm install [<@scope>/]<name>@<tag>`:\n\n    Install the version of the package that is referenced by the specified tag.\n    If the tag does not exist in the registry data for that package, then this\n    will fail.\n\n    Example:\n\n    ```bash\n    npm install sax@latest\n    npm install @myorg/mypackage@latest\n    ```\n\n* `npm install [<@scope>/]<name>@<version>`:\n\n    Install the specified version of the package.  This will fail if the\n    version has not been published to the registry.\n\n    Example:\n\n    ```bash\n    npm install sax@0.1.1\n    npm install @myorg/privatepackage@1.5.0\n    ```\n\n* `npm install [<@scope>/]<name>@<version range>`:\n\n    Install a version of the package matching the specified version range.\n    This will follow the same rules for resolving dependencies described in\n    [`package.json`](/cli/v8/configuring-npm/package-json).\n\n    Note that most version ranges must be put in quotes so that your shell\n    will treat it as a single argument.\n\n    Example:\n\n    ```bash\n    npm install sax@\">=0.1.0 <0.2.0\"\n    npm install @myorg/privatepackage@\"16 - 17\"\n    ```\n\n* `npm install <git remote url>`:\n\n    Installs the package from the hosted git provider, cloning it with\n    `git`.  For a full git remote url, only that URL will be attempted.\n\n    ```bash\n    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n    ```\n\n    `<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n    `git+file`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`\n    can be any valid semver range or exact version, and npm will look for\n    any tags or refs matching that range in the remote repository, much as\n    it would for a registry dependency. If neither `#<commit-ish>` or\n    `#semver:<semver>` is specified, then the default branch of the\n    repository is used.\n\n    If the repository makes use of submodules, those submodules will be\n    cloned as well.\n\n    If the package being installed contains a `prepare` script, its\n    `dependencies` and `devDependencies` will be installed, and the prepare\n    script will be run, before the package is packaged and installed.\n\n    The following git environment variables are recognized by npm and will\n    be added to the environment when running git:\n\n    * `GIT_ASKPASS`\n    * `GIT_EXEC_PATH`\n    * `GIT_PROXY_COMMAND`\n    * `GIT_SSH`\n    * `GIT_SSH_COMMAND`\n    * `GIT_SSL_CAINFO`\n    * `GIT_SSL_NO_VERIFY`\n\n    See the git man page for details.\n\n    Examples:\n\n    ```bash\n    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27\n    npm install git+ssh://git@github.com:npm/cli#pull/273\n    npm install git+ssh://git@github.com:npm/cli#semver:^5.0\n    npm install git+https://isaacs@github.com/npm/cli.git\n    npm install git://github.com/npm/cli.git#v1.0.27\n    GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git\n    ```\n\n* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:\n* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:\n\n    Install the package at `https://github.com/githubname/githubrepo` by\n    attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`\n    can be any valid semver range or exact version, and npm will look for\n    any tags or refs matching that range in the remote repository, much as\n    it would for a registry dependency. If neither `#<commit-ish>` or\n    `#semver:<semver>` is specified, then the default branch is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies`\n    will be installed if the package has a `prepare` script before the\n    package is done installing.\n\n    Examples:\n\n    ```bash\n    npm install mygithubuser/myproject\n    npm install github:mygithubuser/myproject\n   ```\n\n* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:\n\n    Install the package at `https://gist.github.com/gistID` by attempting to\n    clone it using `git`. The GitHub username associated with the gist is\n    optional and will not be saved in `package.json`.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install gist:101a11beef\n    ```\n\n* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:\n\n    Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install bitbucket:mybitbucketuser/myproject\n    ```\n\n* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:\n\n    Install the package at `https://gitlab.com/gitlabname/gitlabrepo`\n    by attempting to clone it using `git`.\n\n    If `#<commit-ish>` is provided, it will be used to clone exactly that\n    commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\n    be any valid semver range or exact version, and npm will look for any tags\n    or refs matching that range in the remote repository, much as it would for a\n    registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\n    specified, then `master` is used.\n\n    As with regular git dependencies, `dependencies` and `devDependencies` will\n    be installed if the package has a `prepare` script before the package is\n    done installing.\n\n    Example:\n\n    ```bash\n    npm install gitlab:mygitlabuser/myproject\n    npm install gitlab:myusr/myproj#semver:^5.0\n    ```\n\nYou may combine multiple arguments and even multiple types of arguments.\nFor example:\n\n```bash\nnpm install sax@\">=0.1.0 <0.2.0\" bench supervisor\n```\n\nThe `--tag` argument will apply to all of the specified install targets. If\na tag with the given name exists, the tagged version is preferred over\nnewer versions.\n\nThe `--dry-run` argument will report in the usual way what the install\nwould have done without actually installing anything.\n\nThe `--package-lock-only` argument will only update the\n`package-lock.json`, instead of checking `node_modules` and downloading\ndependencies.\n\nThe `-f` or `--force` argument will force npm to fetch remote resources\neven if a local copy exists on disk.\n\n```bash\nnpm install sax --force\n```\n\n### Configuration\n\nSee the [`config`](/cli/v8/using-npm/config) help doc.  Many of the configuration\nparams have some effect on installation, since that's most of what npm\ndoes.\n\nThese are some of the most common options related to installation.\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Algorithm\n\nGiven a `package{dep}` structure: `A{B,C}, B{C}, C{D}`,\nthe npm install algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n+-- D\n```\n\nThat is, the dependency from B to C is satisfied by the fact that A already\ncaused C to be installed at a higher level. D is still installed at the top\nlevel because nothing conflicts with it.\n\nFor `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:\n\n```bash\nA\n+-- B\n+-- C\n   `-- D@2\n+-- D@1\n```\n\nBecause B's D@1 will be installed in the top-level, C now has to install\nD@2 privately for itself. This algorithm is deterministic, but different\ntrees may be produced if two dependencies are requested for installation in\na different order.\n\nSee [folders](/cli/v8/configuring-npm/folders) for a more detailed description of\nthe specific folder structures that npm creates.\n\n### See Also\n\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm update](/cli/v8/commands/npm-update)\n* [npm audit](/cli/v8/commands/npm-audit)\n* [npm fund](/cli/v8/commands/npm-fund)\n* [npm link](/cli/v8/commands/npm-link)\n* [npm rebuild](/cli/v8/commands/npm-rebuild)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm dist-tag](/cli/v8/commands/npm-dist-tag)\n* [npm uninstall](/cli/v8/commands/npm-uninstall)\n* [npm shrinkwrap](/cli/v8/commands/npm-shrinkwrap)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"8fe938fd-4e87-5a06-b8b0-ecac4db11bce","frontmatter":{"title":"npm-link"},"rawBody":"---\ntitle: npm-link\nsection: 1\ndescription: Symlink a package folder\nredirect_from:\n  - /cli/link\n  - /cli/link.html\n  - /cli/commands/link\n  - /cli-commands/link\n  - /cli-commands/link.html\n  - /cli-commands/npm-link\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-link.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/link.js -->\n\n```bash\nnpm link [<package-spec>]\n\nalias: ln\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/link.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis is handy for installing your own stuff, so that you can work on it and\ntest iteratively without having to continually rebuild.\n\nPackage linking is a two-step process.\n\nFirst, `npm link` in a package folder with no arguments will create a\nsymlink in the global folder `{prefix}/lib/node_modules/<package>` that\nlinks to the package where the `npm link` command was executed. It will\nalso link any bins in the package to `{prefix}/bin/{name}`.  Note that\n`npm link` uses the global prefix (see `npm prefix -g` for its value).\n\nNext, in some other location, `npm link package-name` will create a\nsymbolic link from globally-installed `package-name` to `node_modules/` of\nthe current folder.\n\nNote that `package-name` is taken from `package.json`, _not_ from the\ndirectory name.\n\nThe package name can be optionally prefixed with a scope. See\n[`scope`](/cli/v8/using-npm/scope).  The scope must be preceded by an @-symbol and\nfollowed by a slash.\n\nWhen creating tarballs for `npm publish`, the linked packages are\n\"snapshotted\" to their current state by resolving the symbolic links, if\nthey are included in `bundleDependencies`.\n\nFor example:\n\n```bash\ncd ~/projects/node-redis    # go into the package directory\nnpm link                    # creates global link\ncd ~/projects/node-bloggy   # go into some other package directory.\nnpm link redis              # link-install the package\n```\n\nNow, any changes to `~/projects/node-redis` will be reflected in\n`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link\nshould be to the package name, not the directory name for that package.\n\nYou may also shortcut the two steps in one.  For example, to do the\nabove use-case in a shorter way:\n\n```bash\ncd ~/projects/node-bloggy  # go into the dir of your main project\nnpm link ../node-redis     # link the dir of your dependency\n```\n\nThe second line is the equivalent of doing:\n\n```bash\n(cd ../node-redis; npm link)\nnpm link redis\n```\n\nThat is, it first creates a global link, and then links the global\ninstallation target into your project's `node_modules` folder.\n\nNote that in this case, you are referring to the directory name,\n`node-redis`, rather than the package name `redis`.\n\nIf your linked package is scoped (see [`scope`](/cli/v8/using-npm/scope)) your\nlink command must include that scope, e.g.\n\n```bash\nnpm link @myorg/privatepackage\n```\n\n### Caveat\n\nNote that package dependencies linked in this way are _not_ saved to\n`package.json` by default, on the assumption that the intention is to have\na link stand in for a regular non-link dependency.  Otherwise, for example,\nif you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace\nthe `^3.0.1` dependency with `file:../path/to/node-redis`, which you\nprobably don't want!  Additionally, other users or developers on your\nproject would run into issues if they do not have their folders set up\nexactly the same as yours.\n\nIf you are adding a _new_ dependency as a link, you should add it to the\nrelevant metadata by running `npm install <dep> --package-lock-only`.\n\nIf you _want_ to save the `file:` reference in your `package.json` and\n`package-lock.json` files, you can use `npm link <dep> --save` to do so.\n\n### Workspace Usage\n\n`npm link <pkg> --workspace <name>` will link the relevant package as a\ndependency of the specified workspace(s).  Note that It may actually be\nlinked into the parent project's `node_modules` folder, if there are no\nconflicting dependencies.\n\n`npm link --workspace <name>` will create a global link to the specified\nworkspace(s).\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm developers](/cli/v8/using-npm/developers)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"6ea5fc03-3f2b-5ddc-8fa7-67d322535018","frontmatter":{"title":"npm-logout"},"rawBody":"---\ntitle: npm-logout\nsection: 1\ndescription: Log out of the registry\nredirect_from:\n  - /cli/logout\n  - /cli/logout.html\n  - /cli/commands/logout\n  - /cli-commands/logout\n  - /cli-commands/logout.html\n  - /cli-commands/npm-logout\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-logout.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/logout.js -->\n\n```bash\nnpm logout\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/logout.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nWhen logged into a registry that supports token-based authentication, tell\nthe server to end this token's session. This will invalidate the token\neverywhere you're using it, not just for the current environment.\n\nWhen logged into a legacy registry that uses username and password\nauthentication, this will clear the credentials in your user configuration.\nIn this case, it will _only_ affect the current environment.\n\nIf `--scope` is provided, this will find the credentials for the registry\nconnected to that scope, if set.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n"},{"id":"b9eb7c48-4e78-5cdd-bd16-2efbd8815ccc","frontmatter":{"title":"npm-ls"},"rawBody":"---\ntitle: npm-ls\nsection: 1\ndescription: List installed packages\nredirect_from:\n  - /cli/ls\n  - /cli/ls.html\n  - /cli/commands/ls\n  - /cli-commands/ls\n  - /cli-commands/ls.html\n  - /cli-commands/npm-ls\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-ls.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ls.js -->\n\n```bash\nnpm ls <package-spec>\n\nalias: list\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ls.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command will print to stdout all the versions of packages that are\ninstalled, as well as their dependencies when `--all` is specified, in a\ntree structure.\n\nNote: to get a \"bottoms up\" view of why a given package is included in the\ntree at all, use [`npm explain`](/cli/v8/commands/npm-explain).\n\nPositional arguments are `name@version-range` identifiers, which will limit\nthe results to only the paths to the packages named.  Note that nested\npackages will *also* show the paths to the specified packages.  For\nexample, running `npm ls promzard` in npm's source tree will show:\n\n```bash\nnpm@8.19.1 /path/to/npm\n└─┬ init-package-json@0.0.4\n  └── promzard@0.1.5\n```\n\nIt will print out extraneous, missing, and invalid packages.\n\nIf a project specifies git urls for dependencies these are shown\nin parentheses after the `name@version` to make it easier for users to\nrecognize potential forks of a project.\n\nThe tree shown is the logical dependency tree, based on package\ndependencies, not the physical layout of your `node_modules` folder.\n\nWhen run as `ll` or `la`, it shows extended information by default.\n\n### Note: Design Changes Pending\n\nThe `npm ls` command's output and behavior made a _ton_ of sense when npm\ncreated a `node_modules` folder that naively nested every dependency.  In\nsuch a case, the logical dependency graph and physical tree of packages on\ndisk would be roughly identical.\n\nWith the advent of automatic install-time deduplication of dependencies in\nnpm v3, the `ls` output was modified to display the logical dependency\ngraph as a tree structure, since this was more useful to most users.\nHowever, without using `npm ls -l`, it became impossible to show _where_ a\npackage was actually installed much of the time!\n\nWith the advent of automatic installation of `peerDependencies` in npm v7,\nthis gets even more curious, as `peerDependencies` are logically\n\"underneath\" their dependents in the dependency graph, but are always\nphysically at or above their location on disk.\n\nAlso, in the years since npm got an `ls` command (in version 0.0.2!),\ndependency graphs have gotten much larger as a general rule.  Therefore, in\norder to avoid dumping an excessive amount of content to the terminal, `npm\nls` now only shows the _top_ level dependencies, unless `--all` is\nprovided.\n\nA thorough re-examination of the use cases, intention, behavior, and output\nof this command, is currently underway.  Expect significant changes to at\nleast the default human-readable `npm ls` output in npm v8.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `depth`\n\n* Default: `Infinity` if `--all` is set, otherwise `1`\n* Type: null or Number\n\nThe depth to go when recursing packages for `npm ls`.\n\nIf not set, `npm ls` will show only the immediate dependencies of the root\nproject. If `--all` is set, then npm will show all dependencies by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `link`\n\n* Default: false\n* Type: Boolean\n\nUsed with `npm ls`, limiting output to only those packages that are linked.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm explain](/cli/v8/commands/npm-explain)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm explain](/cli/v8/commands/npm-explain)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm link](/cli/v8/commands/npm-link)\n* [npm prune](/cli/v8/commands/npm-prune)\n* [npm outdated](/cli/v8/commands/npm-outdated)\n* [npm update](/cli/v8/commands/npm-update)\n"},{"id":"263aebb9-71d6-5984-b3f7-0588c7390398","frontmatter":{"title":"npm-org"},"rawBody":"---\ntitle: npm-org\nsection: 1\ndescription: Manage orgs\nredirect_from:\n  - /cli/org\n  - /cli/org.html\n  - /cli/commands/org\n  - /cli-commands/org\n  - /cli-commands/org.html\n  - /cli-commands/npm-org\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-org.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/org.js -->\n\n```bash\nnpm org set orgname username [developer | admin | owner]\nnpm org rm orgname username\nnpm org ls orgname [<username>]\n\nalias: ogr\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/org.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Example\n\nAdd a new developer to an org:\n\n```bash\n$ npm org set my-org @mx-smith\n```\n\nAdd a new admin to an org (or change a developer to an admin):\n\n```bash\n$ npm org set my-org @mx-santos admin\n```\n\nRemove a user from an org:\n\n```bash\n$ npm org rm my-org mx-santos\n```\n\nList all users in an org:\n\n```bash\n$ npm org ls my-org\n```\n\nList all users in JSON format:\n\n```bash\n$ npm org ls my-org --json\n```\n\nSee what role a user has in an org:\n\n```bash\n$ npm org ls my-org @mx-santos\n```\n\n### Description\n\nYou can use the `npm org` commands to manage and view users of an\norganization.  It supports adding and removing users, changing their roles,\nlisting them, and finding specific ones and their roles.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [using orgs](/cli/v8/using-npm/orgs)\n* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)\n"},{"id":"4411ef20-5ceb-5aae-9e57-e794235471a7","frontmatter":{"title":"npm-outdated"},"rawBody":"---\ntitle: npm-outdated\nsection: 1\ndescription: Check for outdated packages\nredirect_from:\n  - /cli/outdated\n  - /cli/outdated.html\n  - /cli/commands/outdated\n  - /cli-commands/outdated\n  - /cli-commands/outdated.html\n  - /cli-commands/npm-outdated\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-outdated.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/outdated.js -->\n\n```bash\nnpm outdated [<package-spec> ...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/outdated.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command will check the registry to see if any (or, specific) installed\npackages are currently outdated.\n\nBy default, only the direct dependencies of the root project and direct\ndependencies of your configured *workspaces* are shown.\nUse `--all` to find all outdated meta-dependencies as well.\n\nIn the output:\n\n* `wanted` is the maximum version of the package that satisfies the semver\n  range specified in `package.json`. If there's no available semver range\n  (i.e.  you're running `npm outdated --global`, or the package isn't\n  included in `package.json`), then `wanted` shows the currently-installed\n  version.\n* `latest` is the version of the package tagged as latest in the registry.\n  Running `npm publish` with no special configuration will publish the\n  package with a dist-tag of `latest`. This may or may not be the maximum\n  version of the package, or the most-recently published version of the\n  package, depending on how the package's developer manages the latest\n  [dist-tag](/cli/v8/commands/npm-dist-tag).\n* `location` is where in the physical tree the package is located.\n* `depended by` shows which package depends on the displayed dependency\n* `package type` (when using `--long` / `-l`) tells you whether this\n  package is a `dependency` or a dev/peer/optional dependency. Packages not\n  included in `package.json` are always marked `dependencies`.\n* `homepage` (when using `--long` / `-l`) is the `homepage` value contained\n  in the package's packument\n* Red means there's a newer version matching your semver requirements, so\n  you should update now.\n* Yellow indicates that there's a newer version _above_ your semver\n  requirements (usually new major, or new 0.x minor) so proceed with\n  caution.\n\n### An example\n\n```bash\n$ npm outdated\nPackage      Current   Wanted   Latest  Location                  Depended by\nglob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name\nnothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name\nnpm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name\nlocal-dev      0.0.3   linked   linked  local-dev                 dependent-package-name\nonce           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name\n```\n\nWith these `dependencies`:\n```json\n{\n  \"glob\": \"^5.0.15\",\n  \"nothingness\": \"github:othiym23/nothingness#master\",\n  \"npm\": \"^3.5.1\",\n  \"once\": \"^1.3.1\"\n}\n```\n\nA few things to note:\n\n* `glob` requires `^5`, which prevents npm from installing `glob@6`, which\n  is outside the semver range.\n* Git dependencies will always be reinstalled, because of how they're\n  specified.  The installed committish might satisfy the dependency\n  specifier (if it's something immutable, like a commit SHA), or it might\n  not, so `npm outdated` and `npm update` have to fetch Git repos to check.\n  This is why currently doing a reinstall of a Git dependency always forces\n  a new clone and install.\n* `npm@3.5.2` is marked as \"wanted\", but \"latest\" is `npm@3.5.1` because\n  npm uses dist-tags to manage its `latest` and `next` release channels.\n  `npm update` will install the _newest_ version, but `npm install npm`\n  (with no semver range) will install whatever's tagged as `latest`.\n* `once` is just plain out of date. Reinstalling `node_modules` from\n  scratch or running `npm update` will bring it up to spec.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm update](/cli/v8/commands/npm-update)\n* [npm dist-tag](/cli/v8/commands/npm-dist-tag)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"4a8d2b8b-06bc-5d47-9452-050a5b343e4e","frontmatter":{"title":"npm-owner"},"rawBody":"---\ntitle: npm-owner\nsection: 1\ndescription: Manage package owners\nredirect_from:\n  - /cli/owner\n  - /cli/owner.html\n  - /cli/commands/owner\n  - /cli-commands/owner\n  - /cli-commands/owner.html\n  - /cli-commands/npm-owner\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-owner.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/owner.js -->\n\n```bash\nnpm owner add <user> <package-spec>\nnpm owner rm <user> <package-spec>\nnpm owner ls <package-spec>\n\nalias: author\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/owner.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nManage ownership of published packages.\n\n* ls: List all the users who have access to modify a package and push new\n  versions.  Handy when you need to know who to bug for help.\n* add: Add a new user as a maintainer of a package.  This user is enabled\n  to modify metadata, publish new versions, and add other owners.\n* rm: Remove a user from the package owner list.  This immediately revokes\n  their privileges.\n\nNote that there is only one level of access.  Either you can modify a package,\nor you can't.  Future versions may contain more fine-grained access levels, but\nthat is not implemented at this time.\n\nIf you have two-factor authentication enabled with `auth-and-writes` (see\n[`npm-profile`](/cli/v8/commands/npm-profile)) then you'll need to include an otp\non the command line when changing ownership with `--otp`.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm profile](/cli/v8/commands/npm-profile)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n"},{"id":"0788c762-9a5a-5d2d-a615-a08c43ec12fd","frontmatter":{"title":"npm-pack"},"rawBody":"---\ntitle: npm-pack\nsection: 1\ndescription: Create a tarball from a package\nredirect_from:\n  - /cli/pack\n  - /cli/pack.html\n  - /cli/commands/pack\n  - /cli-commands/pack\n  - /cli-commands/pack.html\n  - /cli-commands/npm-pack\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-pack.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/pack.js -->\n\n```bash\nnpm pack <package-spec>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/pack.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `pack-destination`\n\n* Default: \".\"\n* Type: String\n\nDirectory in which `npm pack` will save tarballs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Description\n\nFor anything that's installable (that is, a package folder, tarball,\ntarball url, git url, name@tag, name@version, name, or scoped name), this\ncommand will fetch it to the cache, copy the tarball to the current working\ndirectory as `<name>-<version>.tgz`, and then write the filenames out to\nstdout.\n\nIf the same package is specified multiple times, then the file will be\noverwritten the second time.\n\nIf no arguments are supplied, then npm packs the current package folder.\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm-packlist package](http://npm.im/npm-packlist)\n* [npm cache](/cli/v8/commands/npm-cache)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"fdb3a132-aa59-51c6-9b6d-7a7e7afd5f74","frontmatter":{"title":"npm-ping"},"rawBody":"---\ntitle: npm-ping\nsection: 1\ndescription: Ping npm registry\nredirect_from:\n  - /cli/ping\n  - /cli/ping.html\n  - /cli/commands/ping\n  - /cli-commands/ping\n  - /cli-commands/ping.html\n  - /cli-commands/npm-ping\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-ping.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ping.js -->\n\n```bash\nnpm ping\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/ping.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPing the configured or given npm registry and verify authentication.\nIf it works it will output something like:\n\n```bash\nnpm notice PING https://registry.npmjs.org/\nnpm notice PONG 255ms\n```\notherwise you will get an error:\n```bash\nnpm notice PING http://foo.com/\nnpm ERR! code E404\nnpm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm doctor](/cli/v8/commands/npm-doctor)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"0c697b3f-9b75-5d1b-b92a-2703ec65becf","frontmatter":{"title":"npm-pkg"},"rawBody":"---\ntitle: npm-pkg\nsection: 1\ndescription: Manages your package.json\nredirect_from:\n  - /cli/pkg\n  - /cli/pkg.html\n  - /cli/commands/pkg\n  - /cli-commands/pkg\n  - /cli-commands/pkg.html\n  - /cli-commands/npm-pkg\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-pkg.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/pkg.js -->\n\n```bash\nnpm pkg set <key>=<value> [<key>=<value> ...]\nnpm pkg get [<key> [<key> ...]]\nnpm pkg delete <key> [<key> ...]\nnpm pkg set [<array>[<index>].<key>=<value> ...]\nnpm pkg set [<array>[].<key>=<value> ...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/pkg.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nA command that automates the management of `package.json` files.\n`npm pkg` provide 3 different sub commands that allow you to modify or retrieve\nvalues for given object keys in your `package.json`.\n\nThe syntax to retrieve and set fields is a dot separated representation of\nthe nested object properties to be found within your `package.json`, it's the\nsame notation used in [`npm view`](/cli/v8/commands/npm-view) to retrieve information\nfrom the registry manifest, below you can find more examples on how to use it.\n\nReturned values are always in **json** format.\n\n* `npm pkg get <field>`\n\n    Retrieves a value `key`, defined in your `package.json` file.\n\n    For example, in order to retrieve the name of the current package, you\n    can run:\n\n    ```bash\n    npm pkg get name\n    ```\n\n    It's also possible to retrieve multiple values at once:\n\n    ```bash\n    npm pkg get name version\n    ```\n\n    You can view child fields by separating them with a period. To retrieve\n    the value of a test `script` value, you would run the following command:\n\n    ```bash\n    npm pkg get scripts.test\n    ```\n\n    For fields that are arrays, requesting a non-numeric field will return\n    all of the values from the objects in the list. For example, to get all\n    the contributor emails for a package, you would run:\n\n    ```bash\n    npm pkg get contributors.email\n    ```\n\n    You may also use numeric indices in square braces to specifically select\n    an item in an array field. To just get the email address of the first\n    contributor in the list, you can run:\n\n    ```bash\n    npm pkg get contributors[0].email\n    ```\n\n    For complex fields you can also name a property in square brackets\n    to specifically select a child field. This is especially helpful\n    with the exports object:\n\n    ```bash\n    npm pkg get \"exports[.].require\"\n    ```\n\n* `npm pkg set <field>=<value>`\n\n    Sets a `value` in your `package.json` based on the `field` value. When\n    saving to your `package.json` file the same set of rules used during\n    `npm install` and other cli commands that touches the `package.json` file\n    are used, making sure to respect the existing indentation and possibly\n    applying some validation prior to saving values to the file.\n\n    The same syntax used to retrieve values from your package can also be used\n    to define new properties or overriding existing ones, below are some\n    examples of how the dot separated syntax can be used to edit your\n    `package.json` file.\n\n    Defining a new bin named `mynewcommand` in your `package.json` that points\n    to a file `cli.js`:\n\n    ```bash\n    npm pkg set bin.mynewcommand=cli.js\n    ```\n\n    Setting multiple fields at once is also possible:\n\n    ```bash\n    npm pkg set description='Awesome package' engines.node='>=10'\n    ```\n\n    It's also possible to add to array values, for example to add a new\n    contributor entry:\n\n    ```bash\n    npm pkg set contributors[0].name='Foo' contributors[0].email='foo@bar.ca'\n    ```\n\n    You may also append items to the end of an array using the special\n    empty bracket notation:\n\n    ```bash\n    npm pkg set contributors[].name='Foo' contributors[].name='Bar'\n    ```\n\n    It's also possible to parse values as json prior to saving them to your\n    `package.json` file, for example in order to set a `\"private\": true`\n    property:\n\n    ```bash\n    npm pkg set private=true --json\n    ```\n\n    It also enables saving values as numbers:\n\n    ```bash\n    npm pkg set tap.timeout=60 --json\n    ```\n\n* `npm pkg delete <key>`\n\n    Deletes a `key` from your `package.json`\n\n    The same syntax used to set values from your package can also be used\n    to remove existing ones. For example, in order to remove a script named\n    build:\n\n    ```bash\n    npm pkg delete scripts.build\n    ```\n\n### Workspaces support\n\nYou can set/get/delete items across your configured workspaces by using the\n`workspace` or `workspaces` config options.\n\nFor example, setting a `funding` value across all configured workspaces\nof a project:\n\n```bash\nnpm pkg set funding=https://example.com --ws\n```\n\nWhen using `npm pkg get` to retrieve info from your configured workspaces, the\nreturned result will be in a json format in which top level keys are the\nnames of each workspace, the values of these keys will be the result values\nreturned from each of the configured workspaces, e.g:\n\n```\nnpm pkg get name version --ws\n{\n  \"a\": {\n    \"name\": \"a\",\n    \"version\": \"1.0.0\"\n  },\n  \"b\": {\n    \"name\": \"b\",\n    \"version\": \"1.0.0\"\n  }\n}\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n* Allow unpublishing of entire packages (not just a single version).\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n## See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm init](/cli/v8/commands/npm-init)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm set-script](/cli/v8/commands/npm-set-script)\n* [workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"0f1ea88a-6940-5102-a602-52fe2ff26eb4","frontmatter":{"title":"npm-prefix"},"rawBody":"---\ntitle: npm-prefix\nsection: 1\ndescription: Display prefix\nredirect_from:\n  - /cli/prefix\n  - /cli/prefix.html\n  - /cli/commands/prefix\n  - /cli-commands/prefix\n  - /cli-commands/prefix.html\n  - /cli-commands/npm-prefix\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-prefix.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/prefix.js -->\n\n```bash\nnpm prefix [-g]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/prefix.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nPrint the local prefix to standard output. This is the closest parent directory\nto contain a `package.json` file or `node_modules` directory, unless `-g` is\nalso specified.\n\nIf `-g` is specified, this will be the value of the global prefix. See\n[`npm config`](/cli/v8/commands/npm-config) for more detail.\n\n### Example\n\n```bash\nnpm prefix\n/usr/local/projects/foo\n```\n\n```bash\nnpm prefix -g\n/usr/local\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm root](/cli/v8/commands/npm-root)\n* [npm bin](/cli/v8/commands/npm-bin)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"086ed878-72ef-5eee-862f-838ee2d27619","frontmatter":{"title":"npm-profile"},"rawBody":"---\ntitle: npm-profile\nsection: 1\ndescription: Change settings on your registry profile\nredirect_from:\n  - /cli/profile\n  - /cli/profile.html\n  - /cli/commands/profile\n  - /cli-commands/profile\n  - /cli-commands/profile.html\n  - /cli-commands/npm-profile\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-profile.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/profile.js -->\n\n```bash\nnpm profile enable-2fa [auth-only|auth-and-writes]\nnpm profile disable-2fa\nnpm profile get [<key>]\nnpm profile set <key> <value>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/profile.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nChange your profile information on the registry.  Note that this command\ndepends on the registry implementation, so third-party registries may not\nsupport this interface.\n\n* `npm profile get [<property>]`: Display all of the properties of your\n  profile, or one or more specific properties.  It looks like:\n\n```bash\n+-----------------+---------------------------+\n| name            | example                   |\n+-----------------+---------------------------+\n| email           | me@example.com (verified) |\n+-----------------+---------------------------+\n| two factor auth | auth-and-writes           |\n+-----------------+---------------------------+\n| fullname        | Example User              |\n+-----------------+---------------------------+\n| homepage        |                           |\n+-----------------+---------------------------+\n| freenode        |                           |\n+-----------------+---------------------------+\n| twitter         |                           |\n+-----------------+---------------------------+\n| github          |                           |\n+-----------------+---------------------------+\n| created         | 2015-02-26T01:38:35.892Z  |\n+-----------------+---------------------------+\n| updated         | 2017-10-02T21:29:45.922Z  |\n+-----------------+---------------------------+\n```\n\n* `npm profile set <property> <value>`: Set the value of a profile\n  property. You can set the following properties this way: email, fullname,\n  homepage, freenode, twitter, github\n\n* `npm profile set password`: Change your password.  This is interactive,\n  you'll be prompted for your current password and a new password.  You'll\n  also be prompted for an OTP if you have two-factor authentication\n  enabled.\n\n* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor\n  authentication. Defaults to `auth-and-writes` mode. Modes are:\n  * `auth-only`: Require an OTP when logging in or making changes to your\n    account's authentication.  The OTP will be required on both the website\n    and the command line.\n  * `auth-and-writes`: Requires an OTP at all the times `auth-only` does,\n    and also requires one when publishing a module, setting the `latest`\n    dist-tag, or changing access via `npm access` and `npm owner`.\n\n* `npm profile disable-2fa`: Disables two-factor authentication.\n\n### Details\n\nSome of these commands may not be available on non npmjs.com registries.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm token](/cli/v8/commands/npm-token)\n"},{"id":"ed459709-c2b3-58bf-83cb-753e1e5923d6","frontmatter":{"title":"npm-prune"},"rawBody":"---\ntitle: npm-prune\nsection: 1\ndescription: Remove extraneous packages\nredirect_from:\n  - /cli/prune\n  - /cli/prune.html\n  - /cli/commands/prune\n  - /cli-commands/prune\n  - /cli-commands/prune.html\n  - /cli-commands/npm-prune\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-prune.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/prune.js -->\n\n```bash\nnpm prune [[<@scope>/]<pkg>...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/prune.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command removes \"extraneous\" packages.  If a package name is provided,\nthen only packages matching one of the supplied names are removed.\n\nExtraneous packages are those present in the `node_modules` folder that are\nnot listed as any package's dependency list.\n\nIf the `--production` flag is specified or the `NODE_ENV` environment\nvariable is set to `production`, this command will remove the packages\nspecified in your `devDependencies`. Setting `--no-production` will negate\n`NODE_ENV` being set to `production`.\n\nIf the `--dry-run` flag is used then no changes will actually be made.\n\nIf the `--json` flag is used, then the changes `npm prune` made (or would\nhave made with `--dry-run`) are printed as a JSON object.\n\nIn normal operation, extraneous modules are pruned automatically, so you'll\nonly need this command with the `--production` flag.  However, in the real\nworld, operation is not always \"normal\".  When crashes or mistakes happen,\nthis command can help clean up any resulting garbage.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm uninstall](/cli/v8/commands/npm-uninstall)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm ls](/cli/v8/commands/npm-ls)\n"},{"id":"c4353618-df7a-563c-81ce-0bd5ba21544d","frontmatter":{"title":"npm-publish"},"rawBody":"---\ntitle: npm-publish\nsection: 1\ndescription: Publish a package\nredirect_from:\n  - /cli/publish\n  - /cli/publish.html\n  - /cli/commands/publish\n  - /cli-commands/publish\n  - /cli-commands/publish.html\n  - /cli-commands/npm-publish\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-publish.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/publish.js -->\n\n```bash\nnpm publish <package-spec>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/publish.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nPublishes a package to the registry so that it can be installed by name.\n\nBy default npm will publish to the public registry. This can be\noverridden by specifying a different default registry or using a\n[`scope`](/cli/v8/using-npm/scope) in the name, combined with a\nscope-configured registry (see\n[`package.json`](/cli/v8/configuring-npm/package-json)).\n\n\nA `package` is interpreted the same way as other commands (like\n`npm install` and can be:\n\n* a) a folder containing a program described by a\n  [`package.json`](/cli/v8/configuring-npm/package-json) file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry (see\n  [`registry`](/cli/v8/using-npm/registry)) with (c)\n* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v8/commands/npm-dist-tag)) that\n  points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `<git remote url>` that resolves to (a)\n\nThe publish will fail if the package name and version combination already\nexists in the specified registry.\n\nOnce a package is published with a given name and version, that specific\nname and version combination can never be used again, even if it is removed\nwith [`npm unpublish`](/cli/v8/commands/npm-unpublish).\n\nAs of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the\ntarball will be submitted to the registry during publication. Subsequent\ninstalls will use the strongest supported algorithm to verify downloads.\n\nSimilar to `--dry-run` see [`npm pack`](/cli/v8/commands/npm-pack), which figures\nout the files to be included and packs them into a tarball to be uploaded\nto the registry.\n\n### Files included in package\n\nTo see what will be included in your package, run `npx npm-packlist`.  All\nfiles are included by default, with the following exceptions:\n\n- Certain files that are relevant to package installation and distribution\n  are always included.  For example, `package.json`, `README.md`,\n  `LICENSE`, and so on.\n\n- If there is a \"files\" list in\n  [`package.json`](/cli/v8/configuring-npm/package-json), then only the files\n  specified will be included.  (If directories are specified, then they\n  will be walked recursively and their contents included, subject to the\n  same ignore rules.)\n\n- If there is a `.gitignore` or `.npmignore` file, then ignored files in\n  that and all child directories will be excluded from the package.  If\n  _both_ files exist, then the `.gitignore` is ignored, and only the\n  `.npmignore` is used.\n\n  `.npmignore` files follow the [same pattern\n  rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)\n  as `.gitignore` files\n\n- If the file matches certain patterns, then it will _never_ be included,\n  unless explicitly added to the `\"files\"` list in `package.json`, or\n  un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file.\n\n- Symbolic links are never included in npm packages.\n\n\nSee [`developers`](/cli/v8/using-npm/developers) for full details on what's\nincluded in the published package, as well as details on how the package is\nbuilt.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `access`\n\n* Default: 'restricted' for scoped packages, 'public' for unscoped packages\n* Type: null, \"restricted\", or \"public\"\n\nWhen publishing scoped packages, the access level defaults to `restricted`.\nIf you want your scoped package to be publicly viewable (and installable)\nset `--access=public`. The only valid values for `access` are `public` and\n`restricted`. Unscoped packages _always_ have an access level of `public`.\n\nNote: Using the `--access` flag on the `npm publish` command will only set\nthe package access level on the initial publish of the package. Any\nsubsequent `npm publish` commands using the `--access` flag will not have an\neffect to the access level. To make changes to the access level after the\ninitial publish use `npm access`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm-packlist package](http://npm.im/npm-packlist)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm scope](/cli/v8/using-npm/scope)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm deprecate](/cli/v8/commands/npm-deprecate)\n* [npm dist-tag](/cli/v8/commands/npm-dist-tag)\n* [npm pack](/cli/v8/commands/npm-pack)\n* [npm profile](/cli/v8/commands/npm-profile)\n"},{"id":"64088d32-2c82-599c-aa11-7870a8c723fb","frontmatter":{"title":"npm-query"},"rawBody":"---\ntitle: npm-query\nsection: 1\ndescription: Dependency selector query\nredirect_from:\n  - /cli/query\n  - /cli/query.html\n  - /cli/commands/query\n  - /cli-commands/query\n  - /cli-commands/query.html\n  - /cli-commands/npm-query\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-query.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/query.js -->\n\n```bash\nnpm query <selector>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/query.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThe `npm query` command allows for usage of css selectors in order to retrieve\nan array of dependency objects.\n\n### Piping npm query to other commands\n\n```bash\n# find all dependencies with postinstall scripts & uninstall them\nnpm query \":attr(scripts, [postinstall])\" | jq 'map(.name)|join(\"\\n\")' -r | xargs -I {} npm uninstall {}\n\n# find all git dependencies & explain who requires them\nnpm query \":type(git)\" | jq 'map(.name)' | xargs -I {} npm why {}\n```\n\n### Extended Use Cases & Queries\n\n```stylus\n// all deps\n*\n\n// all direct deps\n:root > *\n\n// direct production deps\n:root > .prod\n\n// direct development deps\n:root > .dev\n\n// any peer dep of a direct deps\n:root > * > .peer\n\n// any workspace dep\n.workspace\n\n// all workspaces that depend on another workspace\n.workspace > .workspace\n\n// all workspaces that have peer deps\n.workspace:has(.peer)\n\n// any dep named \"lodash\"\n// equivalent to [name=\"lodash\"]\n#lodash\n\n// any deps named \"lodash\" & within semver range ^\"1.2.3\"\n#lodash@^1.2.3\n// equivalent to...\n[name=\"lodash\"]:semver(^1.2.3)\n\n// get the hoisted node for a given semver range\n#lodash@^1.2.3:not(:deduped)\n\n// querying deps with a specific version\n#lodash@2.1.5\n// equivalent to...\n[name=\"lodash\"][version=\"2.1.5\"]\n\n// has any deps\n:has(*)\n\n// deps with no other deps (ie. \"leaf\" nodes)\n:empty\n\n// manually querying git dependencies\n[repository^=github:],\n[repository^=git:],\n[repository^=https://github.com],\n[repository^=http://github.com],\n[repository^=https://github.com],\n[repository^=+git:...]\n\n// querying for all git dependencies\n:type(git)\n\n// get production dependencies that aren't also dev deps\n.prod:not(.dev)\n\n// get dependencies with specific licenses\n[license=MIT], [license=ISC]\n\n// find all packages that have @ruyadorno as a contributor\n:attr(contributors, [email=ruyadorno@github.com])\n```\n\n### Example Response Output\n\n- an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped\n\n```json\n[\n  {\n    \"name\": \"\",\n    \"version\": \"\",\n    \"description\": \"\",\n    \"homepage\": \"\",\n    \"bugs\": {},\n    \"author\": {},\n    \"license\": {},\n    \"funding\": {},\n    \"files\": [],\n    \"main\": \"\",\n    \"browser\": \"\",\n    \"bin\": {},\n    \"man\": [],\n    \"directories\": {},\n    \"repository\": {},\n    \"scripts\": {},\n    \"config\": {},\n    \"dependencies\": {},\n    \"devDependencies\": {},\n    \"optionalDependencies\": {},\n    \"bundledDependencies\": {},\n    \"peerDependencies\": {},\n    \"peerDependenciesMeta\": {},\n    \"engines\": {},\n    \"os\": [],\n    \"cpu\": [],\n    \"workspaces\": {},\n    \"keywords\": [],\n    ...\n  },\n  ...\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n## See Also\n\n* [dependency selectors](/cli/v8/using-npm/dependency-selectors)\n\n"},{"id":"15b744c5-0d5e-584a-a86e-29bbb77425fb","frontmatter":{"title":"npm-rebuild"},"rawBody":"---\ntitle: npm-rebuild\nsection: 1\ndescription: Rebuild a package\nredirect_from:\n  - /cli/rebuild\n  - /cli/rebuild.html\n  - /cli/commands/rebuild\n  - /cli-commands/rebuild\n  - /cli-commands/rebuild.html\n  - /cli-commands/npm-rebuild\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-rebuild.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/rebuild.js -->\n\n```bash\nnpm rebuild [<package-spec>] ...]\n\nalias: rb\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/rebuild.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command runs the `npm build` command on the matched folders.  This is\nuseful when you install a new version of node, and must recompile all your\nC++ addons with the new binary.  It is also useful when installing with\n`--ignore-scripts` and `--no-bin-links`, to explicitly choose which\npackages to build and/or link bins.\n\nIf one or more package specs are provided, then only packages with a\nname and version matching one of the specifiers will be rebuilt.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"f897c56c-fea5-5825-857f-3fa7e0fc46eb","frontmatter":{"title":"npm-repo"},"rawBody":"---\ntitle: npm-repo\nsection: 1\ndescription: Open package repository page in the browser\nredirect_from:\n  - /cli/repo\n  - /cli/repo.html\n  - /cli/commands/repo\n  - /cli-commands/repo\n  - /cli-commands/repo.html\n  - /cli-commands/npm-repo\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-repo.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/repo.js -->\n\n```bash\nnpm repo [<pkgname> [<pkgname> ...]]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/repo.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command tries to guess at the likely location of a package's\nrepository URL, and then tries to open it using the `--browser` config\nparam. If no package name is provided, it will search for a `package.json`\nin the current folder and use the `repository` property.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm docs](/cli/v8/commands/npm-docs)\n* [npm config](/cli/v8/commands/npm-config)\n"},{"id":"e6fa4bd9-8b19-57b9-96f5-97fb79134920","frontmatter":{"title":"npm-restart"},"rawBody":"---\ntitle: npm-restart\nsection: 1\ndescription: Restart a package\nredirect_from:\n  - /cli/restart\n  - /cli/restart.html\n  - /cli/commands/restart\n  - /cli-commands/restart\n  - /cli-commands/restart.html\n  - /cli-commands/npm-restart\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-restart.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/restart.js -->\n\n```bash\nnpm restart [-- <args>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/restart.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis restarts a project.  It is equivalent to running `npm run-script\nrestart`.\n\nIf the current project has a `\"restart\"` script specified in\n`package.json`, then the following scripts will be run:\n\n1. prerestart\n2. restart\n3. postrestart\n\nIf it does _not_ have a `\"restart\"` script specified, but it does have\n`stop` and/or `start` scripts, then the following scripts will be run:\n\n1. prerestart\n2. prestop\n3. stop\n4. poststop\n6. prestart\n7. start\n8. poststart\n9. postrestart\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm stop](/cli/v8/commands/npm-stop)\n* [npm restart](/cli/v8/commands/npm-restart)\n"},{"id":"c568fd7b-5955-5dfb-a640-7d54623206c7","frontmatter":{"title":"npm-root"},"rawBody":"---\ntitle: npm-root\nsection: 1\ndescription: Display npm root\nredirect_from:\n  - /cli/root\n  - /cli/root.html\n  - /cli/commands/root\n  - /cli-commands/root\n  - /cli-commands/root.html\n  - /cli-commands/npm-root\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-root.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/root.js -->\n\n```bash\nnpm root\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/root.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nPrint the effective `node_modules` folder to standard out.\n\nUseful for using npm in shell scripts that do things with the\n`node_modules` folder.  For example:\n\n```bash\n#!/bin/bash\nglobal_node_modules=\"$(npm root --global)\"\necho \"Global packages installed in: ${global_node_modules}\"\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prefix](/cli/v8/commands/npm-prefix)\n* [npm bin](/cli/v8/commands/npm-bin)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"e2ea6842-7f0d-5ab5-84e9-7fa60b1c4515","frontmatter":{"title":"npm-run-script"},"rawBody":"---\ntitle: npm-run-script\nsection: 1\ndescription: Run arbitrary package scripts\nredirect_from:\n  - /cli/run-script\n  - /cli/run-script.html\n  - /cli/commands/run-script\n  - /cli-commands/run-script\n  - /cli-commands/run-script.html\n  - /cli-commands/npm-run-script\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-run-script.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/run-script.js -->\n\n```bash\nnpm run-script <command> [-- <args>]\n\naliases: run, rum, urn\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/run-script.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis runs an arbitrary command from a package's `\"scripts\"` object.  If no\n`\"command\"` is provided, it will list the available scripts.\n\n`run[-script]` is used by the test, start, restart, and stop commands, but\ncan be called directly, as well. When the scripts in the package are\nprinted out, they're separated into lifecycle (test, start, restart) and\ndirectly-run scripts.\n\nAny positional arguments are passed to the specified script.  Use `--` to\npass `-`-prefixed flags and options which would otherwise be parsed by npm.\n\nFor example:\n\n```bash\nnpm run test -- --grep=\"pattern\"\n```\n\nThe arguments will only be passed to the script specified after `npm run`\nand not to any `pre` or `post` script.\n\nThe `env` script is a special built-in command that can be used to list\nenvironment variables that will be available to the script at runtime. If an\n\"env\" command is defined in your package, it will take precedence over the\nbuilt-in.\n\nIn addition to the shell's pre-existing `PATH`, `npm run` adds\n`node_modules/.bin` to the `PATH` provided to scripts. Any binaries\nprovided by locally-installed dependencies can be used without the\n`node_modules/.bin` prefix. For example, if there is a `devDependency` on\n`tap` in your package, you should write:\n\n```bash\n\"scripts\": {\"test\": \"tap test/*.js\"}\n```\n\ninstead of\n\n```bash\n\"scripts\": {\"test\": \"node_modules/.bin/tap test/*.js\"}\n```\n\nThe actual shell your script is run within is platform dependent. By default,\non Unix-like systems it is the `/bin/sh` command, on Windows it is\n`cmd.exe`.\nThe actual shell referred to by `/bin/sh` also depends on the system.\nYou can customize the shell with the `script-shell` configuration.\n\nScripts are run from the root of the package folder, regardless of what the\ncurrent working directory is when `npm run` is called. If you want your\nscript to use different behavior based on what subdirectory you're in, you\ncan use the `INIT_CWD` environment variable, which holds the full path you\nwere in when you ran `npm run`.\n\n`npm run` sets the `NODE` environment variable to the `node` executable\nwith which `npm` is executed.\n\nIf you try to run a script without having a `node_modules` directory and it\nfails, you will be given a warning to run `npm install`, just in case you've\nforgotten.\n\n### Workspaces support\n\nYou may use the `workspace` or `workspaces` configs in order to run an\narbitrary command from a package's `\"scripts\"` object in the context of the\nspecified workspaces. If no `\"command\"` is provided, it will list the available\nscripts for each of these configured workspaces.\n\nGiven a project with configured workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   +-- b\n   |   `-- package.json\n   `-- c\n       `-- package.json\n```\n\nAssuming the workspace configuration is properly set up at the root level\n`package.json` file. e.g:\n\n```\n{\n    \"workspaces\": [ \"./packages/*\" ]\n}\n```\n\nAnd that each of the configured workspaces has a configured `test` script,\nwe can run tests in all of them using the `workspaces` config:\n\n```\nnpm test --workspaces\n```\n\n#### Filtering workspaces\n\nIt's also possible to run a script in a single workspace using the `workspace`\nconfig along with a name or directory path:\n\n```\nnpm test --workspace=a\n```\n\nThe `workspace` config can also be specified multiple times in order to run a\nspecific script in the context of multiple workspaces. When defining values for\nthe `workspace` config in the command line, it also possible to use `-w` as a\nshorthand, e.g:\n\n```\nnpm test -w a -w b\n```\n\nThis last command will run `test` in both `./packages/a` and `./packages/b`\npackages.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `if-present`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not exit with an error code when `run-script` is invoked\nfor a script that isn't defined in the `scripts` section of `package.json`.\nThis option can be used when it's desirable to optionally run a script when\nit's present and fail if the script fails. This is useful, for example, when\nrunning scripts that may only apply for some builds in an otherwise generic\nCI setup.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm restart](/cli/v8/commands/npm-restart)\n* [npm stop](/cli/v8/commands/npm-stop)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm workspaces](/cli/v8/using-npm/workspaces)\n"},{"id":"93c75ec0-0a54-5db5-86dd-e04ab735350a","frontmatter":{"title":"npm-search"},"rawBody":"---\ntitle: npm-search\nsection: 1\ndescription: Search for packages\nredirect_from:\n  - /cli/search\n  - /cli/search.html\n  - /cli/commands/search\n  - /cli-commands/search\n  - /cli-commands/search.html\n  - /cli-commands/npm-search\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-search.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/search.js -->\n\n```bash\nnpm search [search terms ...]\n\naliases: find, s, se\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/search.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nSearch the registry for packages matching the search terms. `npm search`\nperforms a linear, incremental, lexically-ordered search through package\nmetadata for all files in the registry. If your terminal has color\nsupport, it will further highlight the matches in the results.  This can\nbe disabled with the config item `color`\n\nAdditionally, using the `--searchopts` and `--searchexclude` options\npaired with more search terms will include and exclude further patterns.\nThe main difference between `--searchopts` and the standard search terms\nis that the former does not highlight results in the output and you can\nuse them more fine-grained filtering. Additionally, you can add both of\nthese to your config to change default search filtering behavior.\n\nSearch also allows targeting of maintainers in search results, by prefixing\ntheir npm username with `=`.\n\nIf a term starts with `/`, then it's interpreted as a regular expression\nand supports standard JavaScript RegExp syntax. In this case search will\nignore a trailing `/` .  (Note you must escape or quote many regular\nexpression characters in most shells.)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `color`\n\n* Default: true unless the NO_COLOR environ is set to something other than '0'\n* Type: \"always\" or Boolean\n\nIf false, never shows colors. If `\"always\"` then always shows colors. If\ntrue, then only prints color codes for tty file descriptors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `description`\n\n* Default: true\n* Type: Boolean\n\nShow the description in `npm search`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchopts`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchexclude`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-online`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be forced, making the CLI\nlook for updates immediately even for fresh package data.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-offline`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be bypassed, but missing data\nwill be requested from the server. To force full offline mode, use\n`--offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `offline`\n\n* Default: false\n* Type: Boolean\n\nForce offline mode: no network requests will be done during install. To\nallow the CLI to fill in missing cache data, see `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm view](/cli/v8/commands/npm-view)\n* [npm cache](/cli/v8/commands/npm-cache)\n* https://npm.im/npm-registry-fetch\n"},{"id":"d7fb7c7d-5475-5562-8c44-94b4106af00b","frontmatter":{"title":"npm-set-script"},"rawBody":"---\ntitle: npm-set-script\nsection: 1\ndescription: Set tasks in the scripts section of package.json\nredirect_from:\n  - /cli/set-script\n  - /cli/set-script.html\n  - /cli/commands/set-script\n  - /cli-commands/set-script\n  - /cli-commands/set-script.html\n  - /cli-commands/npm-set-script\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-set-script.md\n---\n\n### Synopsis\nAn npm command that lets you create a task in the `scripts` section of the `package.json`.\n\nDeprecated.\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/set-script.js -->\n\n```bash\nnpm set-script [<script>] [<command>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/set-script.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n\n**Example:**\n\n* `npm set-script start \"http-server .\"`\n\n```json\n{\n  \"name\": \"my-project\",\n  \"scripts\": {\n    \"start\": \"http-server .\",\n    \"test\": \"some existing value\"\n  }\n}\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n"},{"id":"4105a0a8-eaad-5479-bc30-507893bc42a4","frontmatter":{"title":"npm-shrinkwrap"},"rawBody":"---\ntitle: npm-shrinkwrap\nsection: 1\ndescription: Lock down dependency versions for publication\nredirect_from:\n  - /cli/shrinkwrap\n  - /cli/shrinkwrap.html\n  - /cli/commands/shrinkwrap\n  - /cli-commands/shrinkwrap\n  - /cli-commands/shrinkwrap.html\n  - /cli-commands/npm-shrinkwrap\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-shrinkwrap.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/shrinkwrap.js -->\n\n```bash\nnpm shrinkwrap\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/shrinkwrap.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis command repurposes `package-lock.json` into a publishable\n`npm-shrinkwrap.json` or simply creates a new one. The file created and\nupdated by this command will then take precedence over any other existing\nor future `package-lock.json` files. For a detailed explanation of the\ndesign and purpose of package locks in npm, see\n[package-lock-json](/cli/v8/configuring-npm/package-lock-json).\n\n### See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [package-lock.json](/cli/v8/configuring-npm/package-lock-json)\n* [npm-shrinkwrap.json](/cli/v8/configuring-npm/npm-shrinkwrap-json)\n* [npm ls](/cli/v8/commands/npm-ls)\n"},{"id":"870f1f7b-1b54-5e85-b4a7-b2a12e9e8476","frontmatter":{"title":"npm-star"},"rawBody":"---\ntitle: npm-star\nsection: 1\ndescription: Mark your favorite packages\nredirect_from:\n  - /cli/star\n  - /cli/star.html\n  - /cli/commands/star\n  - /cli-commands/star\n  - /cli-commands/star.html\n  - /cli-commands/npm-star\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-star.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/star.js -->\n\n```bash\nnpm star [<package-spec>...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/star.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n\"Starring\" a package means that you have some interest in it.  It's\na vaguely positive way to show that you care.\n\nIt's a boolean thing. Starring repeatedly has no additional effect.\n\n### More\n\nThere's also these extra commands to help you manage your favorite packages:\n\n#### Unstar\n\nYou can also \"unstar\" a package using [`npm unstar`](/cli/v8/commands/npm-unstar)\n\n\"Unstarring\" is the same thing, but in reverse.\n\n#### Listing stars\n\nYou can see all your starred packages using [`npm stars`](/cli/v8/commands/npm-stars)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm unstar](/cli/v8/commands/npm-unstar)\n* [npm stars](/cli/v8/commands/npm-stars)\n* [npm view](/cli/v8/commands/npm-view)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n"},{"id":"9957d85b-5e60-5b62-92e6-e60ae524ac6f","frontmatter":{"title":"npm-stars"},"rawBody":"---\ntitle: npm-stars\nsection: 1\ndescription: View packages marked as favorites\nredirect_from:\n  - /cli/stars\n  - /cli/stars.html\n  - /cli/commands/stars\n  - /cli-commands/stars\n  - /cli-commands/stars.html\n  - /cli-commands/npm-stars\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-stars.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/stars.js -->\n\n```bash\nnpm stars [<user>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/stars.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nIf you have starred a lot of neat things and want to find them again\nquickly this command lets you do just that.\n\nYou may also want to see your friend's favorite packages, in this case\nyou will most certainly enjoy this command.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm star](/cli/v8/commands/npm-star)\n* [npm unstar](/cli/v8/commands/npm-unstar)\n* [npm view](/cli/v8/commands/npm-view)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n"},{"id":"fdc42464-fef4-50b1-b5bd-0c74175a32b1","frontmatter":{"title":"npm-start"},"rawBody":"---\ntitle: npm-start\nsection: 1\ndescription: Start a package\nredirect_from:\n  - /cli/start\n  - /cli/start.html\n  - /cli/commands/start\n  - /cli-commands/start\n  - /cli-commands/start.html\n  - /cli-commands/npm-start\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-start.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/start.js -->\n\n```bash\nnpm start [-- <args>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/start.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis runs a predefined command specified in the `\"start\"` property of\na package's `\"scripts\"` object.\n\nIf the `\"scripts\"` object does not define a  `\"start\"` property, npm\nwill run `node server.js`.\n\nNote that this is different from the default node behavior of running\nthe file specified in a package's `\"main\"` attribute when evoking with\n`node .`\n\nAs of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can\nuse custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v8/commands/npm-run-script) for more details.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node foo.js\"\n  }\n}\n```\n\n```bash\nnpm start\n\n> npm@x.x.x start\n> node foo.js\n\n(foo.js output would be here)\n\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm restart](/cli/v8/commands/npm-restart)\n* [npm stop](/cli/v8/commands/npm-stop)\n"},{"id":"afa26034-1cad-5ba1-8868-89cd2e6b7c7f","frontmatter":{"title":"npm-stop"},"rawBody":"---\ntitle: npm-stop\nsection: 1\ndescription: Stop a package\nredirect_from:\n  - /cli/stop\n  - /cli/stop.html\n  - /cli/commands/stop\n  - /cli-commands/stop\n  - /cli-commands/stop.html\n  - /cli-commands/npm-stop\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-stop.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/stop.js -->\n\n```bash\nnpm stop [-- <args>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/stop.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis runs a predefined command specified in the \"stop\" property of a\npackage's \"scripts\" object.\n\nUnlike with [npm start](/cli/v8/commands/npm-start), there is no default script\nthat will run if the `\"stop\"` property is not defined.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"stop\": \"node bar.js\"\n  }\n}\n```\n\n```bash\nnpm stop\n\n> npm@x.x.x stop\n> node bar.js\n\n(bar.js output would be here)\n\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm restart](/cli/v8/commands/npm-restart)\n"},{"id":"15718390-db95-53f6-83e4-e4f4a84686b4","frontmatter":{"title":"npm-team"},"rawBody":"---\ntitle: npm-team\nsection: 1\ndescription: Manage organization teams and team memberships\nredirect_from:\n  - /cli/team\n  - /cli/team.html\n  - /cli/commands/team\n  - /cli-commands/team\n  - /cli-commands/team.html\n  - /cli-commands/npm-team\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-team.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/team.js -->\n\n```bash\nnpm team create <scope:team> [--otp <otpcode>]\nnpm team destroy <scope:team> [--otp <otpcode>]\nnpm team add <scope:team> <user> [--otp <otpcode>]\nnpm team rm <scope:team> <user> [--otp <otpcode>]\nnpm team ls <scope>|<scope:team>\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/team.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nUsed to manage teams in organizations, and change team memberships. Does not\nhandle permissions for packages.\n\nTeams must always be fully qualified with the organization/scope they belong to\nwhen operating on them, separated by a colon (`:`). That is, if you have a\n`newteam` team in an `org` organization, you must always refer to that team\nas `@org:newteam` in these commands.\n\nIf you have two-factor authentication enabled in `auth-and-writes` mode, then\nyou can provide a code from your authenticator with `[--otp <otpcode>]`.\nIf you don't include this then you will be prompted.\n\n* create / destroy:\n  Create a new team, or destroy an existing one. Note: You cannot remove the\n  `developers` team, <a href=\"https://docs.npmjs.com/about-developers-team\" target=\"_blank\">learn more.</a>\n\n  Here's how to create a new team `newteam` under the `org` org:\n\n  ```bash\n  npm team create @org:newteam\n  ```\n\n  You should see a confirming message such as: `+@org:newteam` once the new\n  team has been created.\n\n* add:\n  Add a user to an existing team.\n\n  Adding a new user `username` to a team named `newteam` under the `org` org:\n\n  ```bash\n  npm team add @org:newteam username\n  ```\n\n  On success, you should see a message: `username added to @org:newteam`\n\n* rm:\n  Using `npm team rm` you can also remove users from a team they belong to.\n\n  Here's an example removing user `username` from `newteam` team\n  in `org` organization:\n\n  ```bash\n  npm team rm @org:newteam username\n  ```\n\n  Once the user is removed a confirmation message is displayed:\n  `username removed from @org:newteam`\n\n* ls:\n  If performed on an organization name, will return a list of existing teams\n  under that organization. If performed on a team, it will instead return a list\n  of all users belonging to that particular team.\n\n  Here's an example of how to list all teams from an org named `org`:\n\n  ```bash\n  npm team ls @org\n  ```\n\n  Example listing all members of a team named `newteam`:\n\n  ```bash\n  npm team ls @org:newteam\n  ```\n\n### Details\n\n`npm team` always operates directly on the current registry, configurable from\nthe command line using `--registry=<registry url>`.\n\nYou must be a *team admin* to create teams and manage team membership, under\nthe given organization. Listing teams and team memberships may be done by\nany member of the organization.\n\nOrganization creation and management of team admins and *organization* members\nis done through the website, not the npm CLI.\n\nTo use teams to manage permissions on packages belonging to your organization,\nuse the `npm access` command to grant or revoke the appropriate permissions.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm access](/cli/v8/commands/npm-access)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm registry](/cli/v8/using-npm/registry)\n"},{"id":"9d9e0081-8706-5858-8e58-c62a0b73f073","frontmatter":{"title":"npm-test"},"rawBody":"---\ntitle: npm-test\nsection: 1\ndescription: Test a package\nredirect_from:\n  - /cli/test\n  - /cli/test.html\n  - /cli/commands/test\n  - /cli-commands/test\n  - /cli-commands/test.html\n  - /cli-commands/npm-test\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-test.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/test.js -->\n\n```bash\nnpm test [-- <args>]\n\naliases: tst, t\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/test.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis runs a predefined command specified in the `\"test\"` property of\na package's `\"scripts\"` object.\n\n### Example\n\n```json\n{\n  \"scripts\": {\n    \"test\": \"node test.js\"\n  }\n}\n```\n\n```bash\nnpm test\n> npm@x.x.x test\n> node test.js\n\n(test.js output would be here)\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm restart](/cli/v8/commands/npm-restart)\n* [npm stop](/cli/v8/commands/npm-stop)\n"},{"id":"7e69f53a-9e8f-5304-b360-e392b3954c28","frontmatter":{"title":"npm-token"},"rawBody":"---\ntitle: npm-token\nsection: 1\ndescription: Manage your authentication tokens\nredirect_from:\n  - /cli/token\n  - /cli/token.html\n  - /cli/commands/token\n  - /cli-commands/token\n  - /cli-commands/token.html\n  - /cli-commands/npm-token\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-token.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/token.js -->\n\n```bash\nnpm token list\nnpm token revoke <id|token>\nnpm token create [--read-only] [--cidr=list]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/token.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nThis lets you list, create and revoke authentication tokens.\n\n* `npm token list`:\n  Shows a table of all active authentication tokens. You can request\n  this as JSON with `--json` or tab-separated values with `--parseable`.\n\n```bash\n+--------+---------+------------+----------+----------------+\n| id     | token   | created    | read-only | CIDR whitelist |\n+--------+---------+------------+----------+----------------+\n| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |\n+--------+---------+------------+----------+----------------+\n| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |\n+--------+---------+------------+----------+----------------+\n| e0cf92 | 3a436a… | 2017-10-02 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 63eb9d | 74ef35… | 2017-09-28 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 68c2fe | 127e51… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |\n+--------+---------+------------+----------+----------------+\n```\n\n* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:\n  Create a new authentication token. It can be `--read-only`, or accept\n  a list of\n  [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\n  ranges with which to limit use of this token. This will prompt you for\n  your password, and, if you have two-factor authentication enabled, an\n  otp.\n\n  Currently, the cli can not generate automation tokens. Please refer to\n  the [docs\n  website](https://docs.npmjs.com/creating-and-viewing-access-tokens)\n  for more information on generating automation tokens.\n\n```bash\n+----------------+--------------------------------------+\n| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |\n+----------------+--------------------------------------+\n| cidr_whitelist |                                      |\n+----------------+--------------------------------------+\n| readonly       | false                                |\n+----------------+--------------------------------------+\n| created        | 2017-10-02T07:52:24.838Z             |\n+----------------+--------------------------------------+\n```\n\n* `npm token revoke <token|id>`:\n  Immediately removes an authentication token from the registry.  You\n  will no longer be able to use it.  This can accept both complete\n  tokens (such as those you get back from `npm token create`, and those\n  found in your `.npmrc`), and ids as seen in the parseable or json\n  output of `npm token list`.  This will NOT accept the truncated token\n  found in the normal `npm token list` output.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `read-only`\n\n* Default: false\n* Type: Boolean\n\nThis is used to mark a token as unable to publish when configuring limited\naccess tokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cidr`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThis is a list of CIDR address to be used when configuring limited access\ntokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm profile](/cli/v8/commands/npm-profile)\n"},{"id":"caa95e3e-26ba-54bc-b566-837773fc5cf8","frontmatter":{"title":"npm-uninstall"},"rawBody":"---\ntitle: npm-uninstall\nsection: 1\ndescription: Remove a package\nredirect_from:\n  - /cli/uninstall\n  - /cli/uninstall.html\n  - /cli/commands/uninstall\n  - /cli-commands/uninstall\n  - /cli-commands/uninstall.html\n  - /cli-commands/npm-uninstall\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-uninstall.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/uninstall.js -->\n\n```bash\nnpm uninstall [<@scope>/]<pkg>...\n\naliases: unlink, remove, rm, r, un\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/uninstall.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis uninstalls a package, completely removing everything npm installed\non its behalf.\n\nIt also removes the package from the `dependencies`, `devDependencies`,\n`optionalDependencies`, and `peerDependencies` objects in your\n`package.json`.\n\nFurther, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm\nwill update those files as well.\n\n`--no-save` will tell npm not to remove the package from your\n`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files.\n\n`--save` or `-S` will tell npm to remove the package from your\n`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files.\nThis is the default, but you may need to use this if you have for\ninstance `save=false` in your `npmrc` file\n\nIn global mode (ie, with `-g` or `--global` appended to the command),\nit uninstalls the current package context as a global package.\n`--no-save` is ignored in this case.\n\nScope is optional and follows the usual rules for [`scope`](/cli/v8/using-npm/scope).\n\n### Examples\n\n```bash\nnpm uninstall sax\n```\n\n`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or\n`package-lock.json` files.\n\n```bash\nnpm uninstall lodash --no-save\n```\n\n`lodash` will not be removed from your `package.json`,\n`npm-shrinkwrap.json`, or `package-lock.json` files.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm prune](/cli/v8/commands/npm-prune)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n"},{"id":"473b70f8-74e8-5755-9fdb-9a987cf51772","frontmatter":{"title":"npm-unpublish"},"rawBody":"---\ntitle: npm-unpublish\nsection: 1\ndescription: Remove a package from the registry\nredirect_from:\n  - /cli/unpublish\n  - /cli/unpublish.html\n  - /cli/commands/unpublish\n  - /cli-commands/unpublish\n  - /cli-commands/unpublish.html\n  - /cli-commands/npm-unpublish\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-unpublish.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/unpublish.js -->\n\n```bash\nnpm unpublish [<package-spec>]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/unpublish.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nTo learn more about how the npm registry treats unpublish, see our <a\nhref=\"https://docs.npmjs.com/policies/unpublish\" target=\"_blank\"\nrel=\"noopener noreferrer\"> unpublish policies</a>\n\n### Warning\n\nConsider using the [`deprecate`](/cli/v8/commands/npm-deprecate) command instead,\nif your intent is to encourage users to upgrade, or if you no longer\nwant to maintain a package.\n\n### Description\n\nThis removes a package version from the registry, deleting its entry and\nremoving the tarball.\n\nThe npm registry will return an error if you are not [logged\nin](/cli/v8/commands/npm-adduser).\n\nIf you do not specify a version or if you remove all of a package's\nversions then the registry will remove the root package entry entirely.\n\nEven if you unpublish a package version, that specific name and version\ncombination can never be reused. In order to publish the package again,\nyou must use a new version number. If you unpublish the entire package,\nyou may not publish any new versions of that package until 24 hours have\npassed.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n* Allow unpublishing of entire packages (not just a single version).\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm deprecate](/cli/v8/commands/npm-deprecate)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm owner](/cli/v8/commands/npm-owner)\n* [npm login](/cli/v8/commands/npm-adduser)\n"},{"id":"89a5805a-79ef-5154-9bf1-6f59bf94b3bc","frontmatter":{"title":"npm-unstar"},"rawBody":"---\ntitle: npm-unstar\nsection: 1\ndescription: Remove an item from your favorite packages\nredirect_from:\n  - /cli/unstar\n  - /cli/unstar.html\n  - /cli/commands/unstar\n  - /cli-commands/unstar\n  - /cli-commands/unstar.html\n  - /cli-commands/npm-unstar\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-unstar.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/unstar.js -->\n\n```bash\nnpm unstar [<package-spec>...]\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/unstar.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\n\"Unstarring\" a package is the opposite of [`npm star`](/cli/v8/commands/npm-star),\nit removes an item from your list of favorite packages.\n\n### More\n\nThere's also these extra commands to help you manage your favorite packages:\n\n#### Star\n\nYou can \"star\" a package using [`npm star`](/cli/v8/commands/npm-star)\n\n#### Listing stars\n\nYou can see all your starred packages using [`npm stars`](/cli/v8/commands/npm-stars)\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm star](/cli/v8/commands/npm-star)\n* [npm stars](/cli/v8/commands/npm-stars)\n* [npm view](/cli/v8/commands/npm-view)\n* [npm whoami](/cli/v8/commands/npm-whoami)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n\n"},{"id":"38fcc792-48b7-5d19-a864-a70b67afc842","frontmatter":{"title":"npm-update"},"rawBody":"---\ntitle: npm-update\nsection: 1\ndescription: Update packages\nredirect_from:\n  - /cli/update\n  - /cli/update.html\n  - /cli/commands/update\n  - /cli-commands/update\n  - /cli-commands/update.html\n  - /cli-commands/npm-update\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-update.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/update.js -->\n\n```bash\nnpm update [<pkg>...]\n\naliases: up, upgrade, udpate\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/update.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command will update all the packages listed to the latest version\n(specified by the `tag` config), respecting the semver constraints of\nboth your package and its dependencies (if they also require the same\npackage).\n\nIt will also install missing packages.\n\nIf the `-g` flag is specified, this command will update globally installed\npackages.\n\nIf no package name is specified, all packages in the specified location (global\nor local) will be updated.\n\nNote that by default `npm update` will not update the semver values of direct\ndependencies in your project `package.json`, if you want to also update\nvalues in `package.json` you can run: `npm update --save` (or add the\n`save=true` option to a [configuration file](/cli/v8/configuring-npm/npmrc)\nto make that the default behavior).\n\n### Example\n\nFor the examples below, assume that the current package is `app` and it depends\non dependencies, `dep1` (`dep2`, .. etc.).  The published versions of `dep1`\nare:\n\n```json\n{\n  \"dist-tags\": { \"latest\": \"1.2.2\" },\n  \"versions\": [\n    \"1.2.2\",\n    \"1.2.1\",\n    \"1.2.0\",\n    \"1.1.2\",\n    \"1.1.1\",\n    \"1.0.0\",\n    \"0.4.1\",\n    \"0.4.0\",\n    \"0.2.0\"\n  ]\n}\n```\n\n#### Caret Dependencies\n\nIf `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^1.1.1\"\n}\n```\n\nThen `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and\n`1.2.2` satisfies `^1.1.1`.\n\n#### Tilde Dependencies\n\nHowever, if `app`'s `package.json` contains:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"~1.1.1\"\n}\n```\n\nIn this case, running `npm update` will install `dep1@1.1.2`.  Even though the\n`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is\nequivalent to `>=1.1.1 <1.2.0`.  So the highest-sorting version that satisfies\n`~1.1.1` is used, which is `1.1.2`.\n\n#### Caret Dependencies below 1.0.0\n\nSuppose `app` has a caret dependency on a version below `1.0.0`, for example:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.2.0\"\n}\n```\n\n`npm update` will install `dep1@0.2.0`, because there are no other\nversions which satisfy `^0.2.0`.\n\nIf the dependence were on `^0.4.0`:\n\n```json\n\"dependencies\": {\n  \"dep1\": \"^0.4.0\"\n}\n```\n\nThen `npm update` will install `dep1@0.4.1`, because that is the highest-sorting\nversion that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)\n\n\n#### Subdependencies\n\nSuppose your app now also has a dependency on `dep2`\n\n```json\n{\n  \"name\": \"my-app\",\n  \"dependencies\": {\n      \"dep1\": \"^1.0.0\",\n      \"dep2\": \"1.0.0\"\n  }\n}\n```\n\nand `dep2` itself depends on this limited range of `dep1`\n\n```json\n{\n\"name\": \"dep2\",\n  \"dependencies\": {\n    \"dep1\": \"~1.1.1\"\n  }\n}\n```\n\nThen `npm update` will install `dep1@1.1.2` because that is the highest\nversion that `dep2` allows.  npm will prioritize having a single version\nof `dep1` in your tree rather than two when that single version can\nsatisfy the semver requirements of multiple dependencies in your tree.\nIn this case if you really did need your package to use a newer version\nyou would need to use `npm install`.\n\n\n#### Updating Globally-Installed Packages\n\n`npm update -g` will apply the `update` action to each globally installed\npackage that is `outdated` -- that is, has a version that is different from\n`wanted`.\n\nNote: Globally installed packages are treated as if they are installed with a\ncaret semver range specified. So if you require to update to `latest` you may\nneed to run `npm install -g [<pkg>...]`\n\nNOTE: If a package has been upgraded to a version newer than `latest`, it will\nbe _downgraded_.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm outdated](/cli/v8/commands/npm-outdated)\n* [npm shrinkwrap](/cli/v8/commands/npm-shrinkwrap)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm ls](/cli/v8/commands/npm-ls)\n"},{"id":"de55c5f6-1365-57cb-b436-60aff074c455","frontmatter":{"title":"npm-version"},"rawBody":"---\ntitle: npm-version\nsection: 1\ndescription: Bump a package version\nredirect_from:\n  - /cli/version\n  - /cli/version.html\n  - /cli/commands/version\n  - /cli-commands/version\n  - /cli-commands/version.html\n  - /cli-commands/npm-version\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-version.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/version.js -->\n\n```bash\nnpm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]\n\nalias: verison\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/version.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `allow-same-version`\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version\nto the same value as the current version.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `commit-hooks`\n\n* Default: true\n* Type: Boolean\n\nRun git commit hooks when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git-tag-version`\n\n* Default: true\n* Type: Boolean\n\nTag the commit when using the `npm version` command. Setting this to false\nresults in no commit being made at all.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `preid`\n\n* Default: \"\"\n* Type: String\n\nThe \"prerelease identifier\" to use as a prefix for the \"prerelease\" part of\na semver. Like the `rc` in `1.2.0-rc.8`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-tag`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will tag the version using\n`-s` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces-update`\n\n* Default: true\n* Type: Boolean\n\nIf set to true, the npm cli will run an update after operations that may\npossibly change the workspaces installed to the `node_modules` folder.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Description\n\nRun this in a package directory to bump the version and write the new data\nback to `package.json`, `package-lock.json`, and, if present,\n`npm-shrinkwrap.json`.\n\nThe `newversion` argument should be a valid semver string, a valid second\nargument to [semver.inc](https://github.com/npm/node-semver#functions) (one\nof `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`,\n`prerelease`), or `from-git`. In the second case, the existing version will\nbe incremented by 1 in the specified field.  `from-git` will try to read\nthe latest git tag, and use that as the new npm version.\n\nIf run in a git repo, it will also create a version commit and tag.  This\nbehavior is controlled by `git-tag-version` (see below), and can be\ndisabled on the command line by running `npm --no-git-tag-version version`.\nIt will fail if the working directory is not clean, unless the `-f` or\n`--force` flag is set.\n\nIf supplied with `-m` or `--message` config option, npm will use it as a\ncommit message when creating a version commit.  If the `message` config\ncontains `%s` then that will be replaced with the resulting version number.\nFor example:\n\n```bash\nnpm version patch -m \"Upgrade to %s for reasons\"\n```\n\nIf the `sign-git-tag` config is set, then the tag will be signed using the\n`-s` flag to git.  Note that you must have a default GPG key set up in your\ngit config for this to work properly.  For example:\n\n```bash\n$ npm config set sign-git-tag true\n$ npm version patch\n\nYou need a passphrase to unlock the secret key for\nuser: \"isaacs (http://blog.izs.me/) <i@izs.me>\"\n2048-bit RSA key, ID 6C481CF6, created 2010-08-31\n\nEnter passphrase:\n```\n\nIf `preversion`, `version`, or `postversion` are in the `scripts` property\nof the package.json, they will be executed as part of running `npm\nversion`.\n\nThe exact order of execution is as follows:\n\n1. Check to make sure the git working directory is clean before we get\n   started.  Your scripts may add files to the commit in future steps.\n   This step is skipped if the `--force` flag is set.\n2. Run the `preversion` script. These scripts have access to the old\n   `version` in package.json.  A typical use would be running your full\n   test suite before deploying.  Any files you want added to the commit\n   should be explicitly added using `git add`.\n3. Bump `version` in `package.json` as requested (`patch`, `minor`,\n   `major`, etc).\n4. Run the `version` script. These scripts have access to the new `version`\n   in package.json (so they can incorporate it into file headers in\n   generated files for example).  Again, scripts should explicitly add\n   generated files to the commit using `git add`.\n5. Commit and tag.\n6. Run the `postversion` script. Use it to clean up the file system or\n   automatically push the commit and/or tag.\n\nTake the following example:\n\n```json\n{\n  \"scripts\": {\n    \"preversion\": \"npm test\",\n    \"version\": \"npm run build && git add -A dist\",\n    \"postversion\": \"git push && git push --tags && rm -rf build/temp\"\n  }\n}\n```\n\nThis runs all your tests and proceeds only if they pass. Then runs your\n`build` script, and adds everything in the `dist` directory to the commit.\nAfter the commit, it pushes the new commit and tag up to the server, and\ndeletes the `build/temp` directory.\n\n### See Also\n\n* [npm init](/cli/v8/commands/npm-init)\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [config](/cli/v8/using-npm/config)\n"},{"id":"267b3424-d2be-55f3-9553-b1d1a38edfac","frontmatter":{"title":"npm-view"},"rawBody":"---\ntitle: npm-view\nsection: 1\ndescription: View registry info\nredirect_from:\n  - /cli/view\n  - /cli/view.html\n  - /cli/commands/view\n  - /cli-commands/view\n  - /cli-commands/view.html\n  - /cli-commands/npm-view\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-view.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/view.js -->\n\n```bash\nnpm view [<package-spec>] [<field>[.subfield]...]\n\naliases: info, show, v\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/view.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command shows data about a package and prints it to stdout.\n\nAs an example, to view information about the `connect` package from the registry, you would run:\n\n```bash\nnpm view connect\n```\n\nThe default version is `\"latest\"` if unspecified.\n\nField names can be specified after the package descriptor.\nFor example, to show the dependencies of the `ronn` package at version\n`0.3.5`, you could do the following:\n\n```bash\nnpm view ronn@0.3.5 dependencies\n```\n\nYou can view child fields by separating them with a period.\nTo view the git repository URL for the latest version of `npm`, you would run the following command:\n\n```bash\nnpm view npm repository.url\n```\n\nThis makes it easy to view information about a dependency with a bit of\nshell scripting. For example, to view all the data about the version of\n`opts` that `ronn` depends on, you could write the following:\n\n```bash\nnpm view opts@$(npm view ronn dependencies.opts)\n```\n\nFor fields that are arrays, requesting a non-numeric field will return\nall of the values from the objects in the list. For example, to get all\nthe contributor email addresses for the `express` package, you would run:\n\n```bash\nnpm view express contributors.email\n```\n\nYou may also use numeric indices in square braces to specifically select\nan item in an array field. To just get the email address of the first\ncontributor in the list, you can run:\n\n```bash\nnpm view express contributors[0].email\n```\n\nMultiple fields may be specified, and will be printed one after another.\nFor example, to get all the contributor names and email addresses, you\ncan do this:\n\n```bash\nnpm view express contributors.name contributors.email\n```\n\n\"Person\" fields are shown as a string if they would be shown as an\nobject.  So, for example, this will show the list of `npm` contributors in\nthe shortened string format.  (See [`package.json`](/cli/v8/configuring-npm/package-json) for more on this.)\n\n```bash\nnpm view npm contributors\n```\n\nIf a version range is provided, then data will be printed for every\nmatching version of the package.  This will show which version of `jsdom`\nwas required by each matching version of `yui3`:\n\n```bash\nnpm view yui3@'>0.5.4' dependencies.jsdom\n```\n\nTo show the `connect` package version history, you can do\nthis:\n\n```bash\nnpm view connect versions\n```\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### Output\n\nIf only a single string field for a single version is output, then it\nwill not be colorized or quoted, to enable piping the output to\nanother command. If the field is an object, it will be output as a JavaScript object literal.\n\nIf the `--json` flag is given, the outputted fields will be JSON.\n\nIf the version range matches multiple versions then each printed value\nwill be prefixed with the version it applies to.\n\nIf multiple fields are requested, then each of them is prefixed with\nthe field name.\n\n### See Also\n\n* [package spec](/cli/v8/using-npm/package-spec)\n* [npm search](/cli/v8/commands/npm-search)\n* [npm registry](/cli/v8/using-npm/registry)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm docs](/cli/v8/commands/npm-docs)\n"},{"id":"cafb160d-a5a9-534c-b4db-0e1925967703","frontmatter":{"title":"npm-whoami"},"rawBody":"---\ntitle: npm-whoami\nsection: 1\ndescription: Display npm username\nredirect_from:\n  - /cli/whoami\n  - /cli/whoami.html\n  - /cli/commands/whoami\n  - /cli-commands/whoami\n  - /cli-commands/whoami.html\n  - /cli-commands/npm-whoami\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm-whoami.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/whoami.js -->\n\n```bash\nnpm whoami\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/whoami.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\nNote: This command is unaware of workspaces.\n\n### Description\n\nDisplay the npm username of the currently logged-in user.\n\nIf logged into a registry that provides token-based authentication, then\nconnect to the `/-/whoami` registry endpoint to find the username\nassociated with the token, and print to standard output.\n\nIf logged into a registry that uses Basic Auth, then simply print the\n`username` portion of the authentication string.\n\n### Configuration\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See Also\n\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n"},{"id":"cc6085dd-bac8-56be-9553-a58d68e05fcb","frontmatter":{"title":"npm"},"rawBody":"---\ntitle: npm\nsection: 1\ndescription: javascript package manager\nredirect_from:\n  - /cli/npm\n  - /cli/npm.html\n  - /cli/commands/npm\n  - /cli-commands/npm\n  - /cli-commands/npm.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npm.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Version\n\n8.19.1\n\n### Description\n\nnpm is the package manager for the Node JavaScript platform.  It puts\nmodules in place so that node can find them, and manages dependency\nconflicts intelligently.\n\nIt is extremely configurable to support a variety of use cases.  Most\ncommonly, you use it to publish, discover, install, and develop node\nprograms.\n\nRun `npm help` to get a list of available commands.\n\n### Important\n\nnpm comes preconfigured to use npm's public registry at\nhttps://registry.npmjs.org by default. Use of the npm public registry is\nsubject to terms of use available at\nhttps://docs.npmjs.com/policies/terms.\n\nYou can configure npm to use any compatible registry you like, and even\nrun your own registry. Use of someone else's registry is governed by\ntheir terms of use.\n\n### Introduction\n\nYou probably got npm because you want to install stuff.\n\nThe very first thing you will most likely want to run in any node\nprogram is `npm install` to install its dependencies.\n\nYou can also run `npm install blerg` to install the latest version of\n\"blerg\".  Check out [`npm install`](/cli/v8/commands/npm-install) for more\ninfo.  It can do a lot of stuff.\n\nUse the `npm search` command to show everything that's available in the\npublic registry.  Use `npm ls` to show everything you've installed.\n\n### Dependencies\n\nIf a package lists a dependency using a git URL, npm will install that\ndependency using the [`git`](https://github.com/git-guides/install-git)\ncommand and will generate an error if it is not installed.\n\nIf one of the packages npm tries to install is a native node module and\nrequires compiling of C++ Code, npm will use\n[node-gyp](https://github.com/nodejs/node-gyp) for that task.\nFor a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)\nneeds Python, make and a buildchain like GCC. On Windows,\nPython and Microsoft Visual Studio C++ are needed. For more information\nvisit [the node-gyp repository](https://github.com/nodejs/node-gyp) and\nthe [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).\n\n### Directories\n\nSee [`folders`](/cli/v8/configuring-npm/folders) to learn about where npm puts\nstuff.\n\nIn particular, npm has two modes of operation:\n\n* local mode:\n  npm installs packages into the current project directory, which\n  defaults to the current working directory.  Packages install to\n  `./node_modules`, and bins to `./node_modules/.bin`.\n* global mode:\n  npm installs packages into the install prefix at\n  `$npm_config_prefix/lib/node_modules` and bins to\n  `$npm_config_prefix/bin`.\n\nLocal mode is the default.  Use `-g` or `--global` on any command to\nrun in global mode instead.\n\n### Developer Usage\n\nIf you're using npm to develop and publish your code, check out the\nfollowing help topics:\n\n* json:\n  Make a package.json file.  See\n  [`package.json`](/cli/v8/configuring-npm/package-json).\n* link:\n  Links your current working code into Node's path, so that you don't\n  have to reinstall every time you make a change.  Use [`npm\n  link`](/cli/v8/commands/npm-link) to do this.\n* install:\n  It's a good idea to install things if you don't need the symbolic\n  link.  Especially, installing other peoples code from the registry is\n  done via [`npm install`](/cli/v8/commands/npm-install)\n* adduser:\n  Create an account or log in.  When you do this, npm will store\n  credentials in the user config file.\n* publish:\n  Use the [`npm publish`](/cli/v8/commands/npm-publish) command to upload your\n  code to the registry.\n\n#### Configuration\n\nnpm is extremely configurable.  It reads its configuration options from\n5 places.\n\n* Command line switches:\n  Set a config with `--key val`.  All keys take a value, even if they\n  are booleans (the config parser doesn't know what the options are at\n  the time of parsing).  If you do not provide a value (`--key`) then\n  the option is set to boolean `true`.\n* Environment Variables:\n  Set any config by prefixing the name in an environment variable with\n  `npm_config_`.  For example, `export npm_config_key=val`.\n* User Configs:\n  The file at `$HOME/.npmrc` is an ini-formatted list of configs.  If\n  present, it is parsed.  If the `userconfig` option is set in the cli\n  or env, that file will be used instead.\n* Global Configs:\n  The file found at `./etc/npmrc` (relative to the global prefix will be\n  parsed if it is found.  See [`npm prefix`](/cli/v8/commands/npm-prefix) for\n  more info on the global prefix.  If the `globalconfig` option is set\n  in the cli, env, or user config, then that file is parsed instead.\n* Defaults:\n  npm's default configuration options are defined in\n  lib/utils/config-defs.js.  These must not be changed.\n\nSee [`config`](/cli/v8/using-npm/config) for much much more information.\n\n### Contributions\n\nPatches welcome!\n\nIf you would like to help, but don't know what to work on, read the\n[contributing\nguidelines](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) and\ncheck the issues list.\n\n### Bugs\n\nWhen you find issues, please report them:\n<https://github.com/npm/cli/issues>\n\nPlease be sure to follow the template and bug reporting guidelines.\n\n### Feature Requests\n\nDiscuss new feature ideas on our discussion forum:\n\n* <https://github.com/npm/feedback>\n\nOr suggest formal RFC proposals:\n\n* <https://github.com/npm/rfcs>\n\n### See Also\n\n* [npm help](/cli/v8/commands/npm-help)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm prefix](/cli/v8/commands/npm-prefix)\n* [npm publish](/cli/v8/commands/npm-publish)\n"},{"id":"ce87dd30-adc8-555f-87a7-0ebfb39663a3","frontmatter":{"title":"npx"},"rawBody":"---\ntitle: npx\nsection: 1\ndescription: Run a command from a local or remote npm package\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/commands/npx.md\n---\n\n### Synopsis\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/exec.js -->\n\n```bash\nnpx -- <pkg>[@<version>] [args...]\nnpx --package=<pkg>[@<version>] -- <cmd> [args...]\nnpx -c '<cmd> [args...]'\nnpx --package=foo -c '<cmd> [args...]'\n```\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/commands/exec.js -->\n\n<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->\n\n### Description\n\nThis command allows you to run an arbitrary command from an npm package\n(either one installed locally, or fetched remotely), in a similar context\nas running it via `npm run`.\n\nWhatever packages are specified by the `--package` option will be\nprovided in the `PATH` of the executed command, along with any locally\ninstalled package executables.  The `--package` option may be\nspecified multiple times, to execute the supplied command in an environment\nwhere all specified packages are available.\n\nIf any requested packages are not present in the local project\ndependencies, then they are installed to a folder in the npm cache, which\nis added to the `PATH` environment variable in the executed process.  A\nprompt is printed (which can be suppressed by providing either `--yes` or\n`--no`).\n\nPackage names provided without a specifier will be matched with whatever\nversion exists in the local project.  Package names with a specifier will\nonly be considered a match if they have the exact same name and version as\nthe local dependency.\n\nIf no `-c` or `--call` option is provided, then the positional arguments\nare used to generate the command string.  If no `--package` options\nare provided, then npm will attempt to determine the executable name from\nthe package specifier provided as the first positional argument according\nto the following heuristic:\n\n- If the package has a single entry in its `bin` field in `package.json`,\n  or if all entries are aliases of the same command, then that command\n  will be used.\n- If the package has multiple `bin` entries, and one of them matches the\n  unscoped portion of the `name` field, then that command will be used.\n- If this does not result in exactly one option (either because there are\n  no bin entries, or none of them match the `name` of the package), then\n  `npm exec` exits with an error.\n\nTo run a binary _other than_ the named binary, specify one or more\n`--package` options, which will prevent npm from inferring the package from\nthe first command argument.\n\n### `npx` vs `npm exec`\n\nWhen run via the `npx` binary, all flags and options *must* be set prior to\nany positional arguments.  When run via `npm exec`, a double-hyphen `--`\nflag can be used to suppress npm's parsing of switches and options that\nshould be sent to the executed command.\n\nFor example:\n\n```\n$ npx foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will resolve the `foo` package name, and run the\nfollowing command:\n\n```\n$ foo bar --package=@npmcli/foo\n```\n\nSince the `--package` option comes _after_ the positional arguments, it is\ntreated as an argument to the executed command.\n\nIn contrast, due to npm's argument parsing logic, running this command is\ndifferent:\n\n```\n$ npm exec foo@latest bar --package=@npmcli/foo\n```\n\nIn this case, npm will parse the `--package` option first, resolving the\n`@npmcli/foo` package.  Then, it will execute the following command in that\ncontext:\n\n```\n$ foo@latest bar\n```\n\nThe double-hyphen character is recommended to explicitly tell npm to stop\nparsing command line options and switches.  The following command would\nthus be equivalent to the `npx` command above:\n\n```\n$ npm exec -- foo@latest bar --package=@npmcli/foo\n```\n\n### Examples\n\nRun the version of `tap` in the local dependencies, with the provided\narguments:\n\n```\n$ npm exec -- tap --bail test/foo.js\n$ npx tap --bail test/foo.js\n```\n\nRun a command _other than_ the command whose name matches the package name\nby specifying a `--package` option:\n\n```\n$ npm exec --package=foo -- bar --bar-argument\n# ~ or ~\n$ npx --package=foo bar --bar-argument\n```\n\nRun an arbitrary shell script, in the context of the current project:\n\n```\n$ npm x -c 'eslint && say \"hooray, lint passed\"'\n$ npx -c 'eslint && say \"hooray, lint passed\"'\n```\n\n### Compatibility with Older npx Versions\n\nThe `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`\npackage deprecated at that time.  `npx` uses the `npm exec`\ncommand instead of a separate argument parser and install process, with\nsome affordances to maintain backwards compatibility with the arguments it\naccepted in previous versions.\n\nThis resulted in some shifts in its functionality:\n\n- Any `npm` config value may be provided.\n- To prevent security and user-experience problems from mistyping package\n  names, `npx` prompts before installing anything.  Suppress this\n  prompt with the `-y` or `--yes` option.\n- The `--no-install` option is deprecated, and will be converted to `--no`.\n- Shell fallback functionality is removed, as it is not advisable.\n- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand\n  for `--package` in npx.  This is maintained, but only for the `npx`\n  executable.\n- The `--ignore-existing` option is removed.  Locally installed bins are\n  always present in the executed process `PATH`.\n- The `--npm` option is removed.  `npx` will always use the `npm` it ships\n  with.\n- The `--node-arg` and `-n` options are removed.\n- The `--always-spawn` option is redundant, and thus removed.\n- The `--shell` option is replaced with `--script-shell`, but maintained\n  in the `npx` executable for backwards compatibility.\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm test](/cli/v8/commands/npm-test)\n* [npm start](/cli/v8/commands/npm-start)\n* [npm restart](/cli/v8/commands/npm-restart)\n* [npm stop](/cli/v8/commands/npm-stop)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm exec](/cli/v8/commands/npm-exec)\n"},{"id":"0a7c66dc-11b1-5df5-b5f6-b3eef1b51bdc","frontmatter":{"title":"folders"},"rawBody":"---\ntitle: folders\nsection: 5\ndescription: Folder Structures Used by npm\nredirect_from:\n  - /configuring-npm/folders\n  - /configuring-npm/folders.html\n  - /files/folders\n  - /files/folders.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/folders.md\n---\n\n### Description\n\nnpm puts various things on your computer.  That's its job.\n\nThis document will tell you what it puts where.\n\n#### tl;dr\n\n* Local install (default): puts stuff in `./node_modules` of the current\n  package root.\n* Global install (with `-g`): puts stuff in /usr/local or wherever node\n  is installed.\n* Install it **locally** if you're going to `require()` it.\n* Install it **globally** if you're going to run it on the command line.\n* If you need both, then install it in both places, or use `npm link`.\n\n#### prefix Configuration\n\nThe `prefix` config defaults to the location where node is installed.\nOn most systems, this is `/usr/local`. On Windows, it's `%AppData%\\npm`.\nOn Unix systems, it's one level up, since node is typically installed at\n`{prefix}/bin/node` rather than `{prefix}/node.exe`.\n\nWhen the `global` flag is set, npm installs things into this prefix.\nWhen it is not set, it uses the root of the current package, or the\ncurrent working directory if not in a package already.\n\n#### Node Modules\n\nPackages are dropped into the `node_modules` folder under the `prefix`.\nWhen installing locally, this means that you can\n`require(\"packagename\")` to load its main module, or\n`require(\"packagename/lib/path/to/sub/module\")` to load other modules.\n\nGlobal installs on Unix systems go to `{prefix}/lib/node_modules`.\nGlobal installs on Windows go to `{prefix}/node_modules` (that is, no\n`lib` folder.)\n\nScoped packages are installed the same way, except they are grouped together\nin a sub-folder of the relevant `node_modules` folder with the name of that\nscope prefix by the @ symbol, e.g. `npm install @myorg/package` would place\nthe package in `{prefix}/node_modules/@myorg/package`. See\n[`scope`](/cli/v8/using-npm/scope) for more details.\n\nIf you wish to `require()` a package, then install it locally.\n\n#### Executables\n\nWhen in global mode, executables are linked into `{prefix}/bin` on Unix,\nor directly into `{prefix}` on Windows.  Ensure that path is in your\nterminal's `PATH` environment to run them.\n\nWhen in local mode, executables are linked into\n`./node_modules/.bin` so that they can be made available to scripts run\nthrough npm.  (For example, so that a test runner will be in the path\nwhen you run `npm test`.)\n\n#### Man Pages\n\nWhen in global mode, man pages are linked into `{prefix}/share/man`.\n\nWhen in local mode, man pages are not installed.\n\nMan pages are not installed on Windows systems.\n\n#### Cache\n\nSee [`npm cache`](/cli/v8/commands/npm-cache).  Cache files are stored in `~/.npm` on Posix, or\n`%AppData%/npm-cache` on Windows.\n\nThis is controlled by the `cache` configuration param.\n\n#### Temp Files\n\nTemporary files are stored by default in the folder specified by the\n`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment\nvariables, or `/tmp` on Unix and `c:\\windows\\temp` on Windows.\n\nTemp files are given a unique folder under this root for each run of the\nprogram, and are deleted upon successful exit.\n\n### More Information\n\nWhen installing locally, npm first tries to find an appropriate\n`prefix` folder.  This is so that `npm install foo@1.2.3` will install\nto the sensible root of your package, even if you happen to have `cd`ed\ninto some other folder.\n\nStarting at the $PWD, npm will walk up the folder tree checking for a\nfolder that contains either a `package.json` file, or a `node_modules`\nfolder.  If such a thing is found, then that is treated as the effective\n\"current directory\" for the purpose of running npm commands.  (This\nbehavior is inspired by and similar to git's .git-folder seeking\nlogic when running git commands in a working dir.)\n\nIf no package root is found, then the current folder is used.\n\nWhen you run `npm install foo@1.2.3`, then the package is loaded into\nthe cache, and then unpacked into `./node_modules/foo`.  Then, any of\nfoo's dependencies are similarly unpacked into\n`./node_modules/foo/node_modules/...`.\n\nAny bin files are symlinked to `./node_modules/.bin/`, so that they may\nbe found by npm scripts when necessary.\n\n#### Global Installation\n\nIf the `global` configuration is set to true, then npm will\ninstall packages \"globally\".\n\nFor global installation, packages are installed roughly the same way,\nbut using the folders described above.\n\n#### Cycles, Conflicts, and Folder Parsimony\n\nCycles are handled using the property of node's module system that it\nwalks up the directories looking for `node_modules` folders.  So, at every\nstage, if a package is already installed in an ancestor `node_modules`\nfolder, then it is not installed at the current location.\n\nConsider the case above, where `foo -> bar -> baz`.  Imagine if, in\naddition to that, baz depended on bar, so you'd have:\n`foo -> bar -> baz -> bar -> baz ...`.  However, since the folder\nstructure is: `foo/node_modules/bar/node_modules/baz`, there's no need to\nput another copy of bar into `.../baz/node_modules`, since when it calls\nrequire(\"bar\"), it will get the copy that is installed in\n`foo/node_modules/bar`.\n\nThis shortcut is only used if the exact same\nversion would be installed in multiple nested `node_modules` folders.  It\nis still possible to have `a/node_modules/b/node_modules/a` if the two\n\"a\" packages are different versions.  However, without repeating the\nexact same package multiple times, an infinite regress will always be\nprevented.\n\nAnother optimization can be made by installing dependencies at the\nhighest level possible, below the localized \"target\" folder.\n\n#### Example\n\nConsider this dependency graph:\n\n```bash\nfoo\n+-- blerg@1.2.5\n+-- bar@1.2.3\n|   +-- blerg@1.x (latest=1.3.7)\n|   +-- baz@2.x\n|   |   `-- quux@3.x\n|   |       `-- bar@1.2.3 (cycle)\n|   `-- asdf@*\n`-- baz@1.2.3\n    `-- quux@3.x\n        `-- bar\n```\n\nIn this case, we might expect a folder structure like this:\n\n```bash\nfoo\n+-- node_modules\n    +-- blerg (1.2.5) <---[A]\n    +-- bar (1.2.3) <---[B]\n    |   `-- node_modules\n    |       +-- baz (2.0.2) <---[C]\n    |       |   `-- node_modules\n    |       |       `-- quux (3.2.0)\n    |       `-- asdf (2.3.4)\n    `-- baz (1.2.3) <---[D]\n        `-- node_modules\n            `-- quux (3.2.0) <---[E]\n```\n\nSince foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are\ninstalled in foo's `node_modules` folder.\n\nEven though the latest copy of blerg is 1.3.7, foo has a specific\ndependency on version 1.2.5.  So, that gets installed at [A].  Since the\nparent installation of blerg satisfies bar's dependency on `blerg@1.x`,\nit does not install another copy under [B].\n\nBar [B] also has dependencies on baz and asdf, so those are installed in\nbar's `node_modules` folder.  Because it depends on `baz@2.x`, it cannot\nre-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],\nand must install its own copy [C].\n\nUnderneath bar, the `baz -> quux -> bar` dependency creates a cycle.\nHowever, because bar is already in quux's ancestry [B], it does not\nunpack another copy of bar into that folder.\n\nUnderneath `foo -> baz` [D], quux's [E] folder tree is empty, because its\ndependency on bar is satisfied by the parent folder copy installed at [B].\n\nFor a graphical breakdown of what is installed where, use `npm ls`.\n\n#### Publishing\n\nUpon publishing, npm will look in the `node_modules` folder.  If any of\nthe items there are not in the `bundleDependencies` array, then they will\nnot be included in the package tarball.\n\nThis allows a package maintainer to install all of their dependencies\n(and dev dependencies) locally, but only re-publish those items that\ncannot be found elsewhere.  See [`package.json`](/cli/v8/configuring-npm/package-json) for more information.\n\n### See also\n\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm pack](/cli/v8/commands/npm-pack)\n* [npm cache](/cli/v8/commands/npm-cache)\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [config](/cli/v8/using-npm/config)\n* [npm publish](/cli/v8/commands/npm-publish)\n"},{"id":"dc3a7271-626c-5899-8918-66844c6d084d","frontmatter":{"title":"Configuring npm"},"rawBody":"---\nredirect_from:\n  - configuring-npm\n  - /cli/configuring-npm\n  - /cli-documentation/configuring-npm\n  - /cli-documentation/files\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/nav.yml\ntitle: Configuring npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"ba12195a-d639-551a-aab9-5530d52b971a","frontmatter":{"title":"install"},"rawBody":"---\ntitle: install\nsection: 5\ndescription: Download and install node and npm\nredirect_from:\n  - /configuring-npm/install\n  - /configuring-npm/install.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/install.md\n---\n\n### Description\n\nTo publish and install packages to and from the public npm registry, you\nmust install Node.js and the npm command line interface using either a Node\nversion manager or a Node installer. **We strongly recommend using a Node\nversion manager to install Node.js and npm.** We do not recommend using a\nNode installer, since the Node installation process installs npm in a\ndirectory with local permissions and can cause permissions errors when you\nrun npm packages globally.\n\n### Overview\n\n- [Checking your version of npm and\n  Node.js](#checking-your-version-of-npm-and-node-js)\n- [Using a Node version manager to install Node.js and\n  npm](#using-a-node-version-manager-to-install-node-js-and-npm)\n- [Using a Node installer to install Node.js and\n  npm](#using-a-node-installer-to-install-node-js-and-npm)\n\n### Checking your version of npm and Node.js\n\nTo see if you already have Node.js and npm installed and check the\ninstalled version, run the following commands:\n\n```\nnode -v\nnpm -v\n```\n\n### Using a Node version manager to install Node.js and npm\n\nNode version managers allow you to install and switch between multiple\nversions of Node.js and npm on your system so you can test your\napplications on multiple versions of npm to ensure they work for users on\ndifferent versions.\n\n#### OSX or Linux Node version managers\n\n* [nvm](https://github.com/creationix/nvm)\n* [n](https://github.com/tj/n)\n\n#### Windows Node version managers\n\n* [nodist](https://github.com/marcelklehr/nodist)\n* [nvm-windows](https://github.com/coreybutler/nvm-windows)\n\n### Using a Node installer to install Node.js and npm\n\nIf you are unable to use a Node version manager, you can use a Node\ninstaller to install both Node.js and npm on your system.\n\n* [Node.js installer](https://nodejs.org/en/download/)\n* [NodeSource installer](https://github.com/nodesource/distributions). If\n  you use Linux, we recommend that you use a NodeSource installer.\n\n#### OS X or Windows Node installers\n\nIf you're using OS X or Windows, use one of the installers from the\n[Node.js download page](https://nodejs.org/en/download/). Be sure to\ninstall the version labeled **LTS**. Other versions have not yet been\ntested with npm.\n\n#### Linux or other operating systems Node installers\n\nIf you're using Linux or another operating system, use one of the following\ninstallers:\n\n- [NodeSource installer](https://github.com/nodesource/distributions)\n  (recommended)\n- One of the installers on the [Node.js download\n  page](https://nodejs.org/en/download/)\n\nOr see [this page](https://nodejs.org/en/download/package-manager/) to\ninstall npm for Linux in the way many Linux developers prefer.\n\n#### Less-common operating systems\n\nFor more information on installing Node.js on a variety of operating\nsystems, see [this page][pkg-mgr].\n\n[pkg-mgr]: https://nodejs.org/en/download/package-manager/\n"},{"id":"29095609-5382-5cbd-a5c6-a7e976c73f35","frontmatter":{"title":"npm-shrinkwrap.json"},"rawBody":"---\ntitle: npm-shrinkwrap.json\nsection: 5\ndescription: A publishable lockfile\nredirect_from:\n  - /configuring-npm/npm-shrinkwrap-json\n  - /configuring-npm/npm-shrinkwrap-json.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/npm-shrinkwrap-json.md\n---\n\n### Description\n\n`npm-shrinkwrap.json` is a file created by [`npm\nshrinkwrap`](/cli/v8/commands/npm-shrinkwrap). It is identical to\n`package-lock.json`, with one major caveat: Unlike `package-lock.json`,\n`npm-shrinkwrap.json` may be included when publishing a package.\n\nThe recommended use-case for `npm-shrinkwrap.json` is applications deployed\nthrough the publishing process on the registry: for example, daemons and\ncommand-line tools intended as global installs or `devDependencies`. It's\nstrongly discouraged for library authors to publish this file, since that\nwould prevent end users from having control over transitive dependency\nupdates.\n\nIf both `package-lock.json` and `npm-shrinkwrap.json` are present in a\npackage root, `npm-shrinkwrap.json` will be preferred over the\n`package-lock.json` file.\n\nFor full details and description of the `npm-shrinkwrap.json` file format,\nrefer to the manual page for\n[package-lock.json](/cli/v8/configuring-npm/package-lock-json).\n\n### See also\n\n* [npm shrinkwrap](/cli/v8/commands/npm-shrinkwrap)\n* [package-lock.json](/cli/v8/configuring-npm/package-lock-json)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"78b06ed3-9ebd-51a2-a59a-8d42c64c69fa","frontmatter":{"title":"npmrc"},"rawBody":"---\ntitle: npmrc\nsection: 5\ndescription: The npm config files\nredirect_from:\n  - /configuring-npm/npmrc\n  - /configuring-npm/npmrc.html\n  - /cli-documentation/files/npmrc\n  - /files/npmrc\n  - /files/npmrc.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/npmrc.md\n---\n\n### Description\n\nnpm gets its config settings from the command line, environment variables,\nand `npmrc` files.\n\nThe `npm config` command can be used to update and edit the contents of the\nuser and global npmrc files.\n\nFor a list of available configuration options, see\n[config](/cli/v8/using-npm/config).\n\n### Files\n\nThe four relevant files are:\n\n* per-project config file (/path/to/my/project/.npmrc)\n* per-user config file (~/.npmrc)\n* global config file ($PREFIX/etc/npmrc)\n* npm builtin config file (/path/to/npm/npmrc)\n\nAll npm config files are an ini-formatted list of `key = value` parameters.\nEnvironment variables can be replaced using `${VARIABLE_NAME}`. For\nexample:\n\n```bash\nprefix = ${HOME}/.npm-packages\n```\n\nEach of these files is loaded, and config options are resolved in priority\norder.  For example, a setting in the userconfig file would override the\nsetting in the globalconfig file.\n\nArray values are specified by adding \"[]\" after the key name. For example:\n\n```bash\nkey[] = \"first value\"\nkey[] = \"second value\"\n```\n\n#### Comments\n\nLines in `.npmrc` files are interpreted as comments when they begin with a\n`;` or `#` character. `.npmrc` files are parsed by\n[npm/ini](https://github.com/npm/ini), which specifies this comment syntax.\n\nFor example:\n\n```bash\n# last modified: 01 Jan 2016\n; Set a new registry for a scoped package\n@myscope:registry=https://mycustomregistry.example.org\n```\n\n#### Per-project config file\n\nWhen working locally in a project, a `.npmrc` file in the root of the\nproject (ie, a sibling of `node_modules` and `package.json`) will set\nconfig values specific to this project.\n\nNote that this only applies to the root of the project that you're running\nnpm in.  It has no effect when your module is published.  For example, you\ncan't publish a module that forces itself to install globally, or in a\ndifferent location.\n\nAdditionally, this file is not read in global mode, such as when running\n`npm install -g`.\n\n#### Per-user config file\n\n`$HOME/.npmrc` (or the `userconfig` param, if set in the environment or on\nthe command line)\n\n#### Global config file\n\n`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): This file\nis an ini-file formatted list of `key = value` parameters.  Environment\nvariables can be replaced as above.\n\n#### Built-in config file\n\n`path/to/npm/itself/npmrc`\n\nThis is an unchangeable \"builtin\" configuration file that npm keeps\nconsistent across updates.  Set fields in here using the `./configure`\nscript that comes with npm.  This is primarily for distribution maintainers\nto override default configs in a standard and consistent manner.\n\n### Auth related configuration\n\nThe settings `_auth`, `_authToken`, `username` and `_password` must all be\nscoped to a specific registry. This ensures that `npm` will never send\ncredentials to the wrong host.\n\nIn order to scope these values, they must be prefixed by a URI fragment.\nIf the credential is meant for any request to a registry on a single host,\nthe scope may look like `//registry.npmjs.org/:`. If it must be scoped to a\nspecific path on the host that path may also be provided, such as\n`//my-custom-registry.org/unique/path:`.\n\n```\n; bad config\n_authToken=MYTOKEN\n\n; good config\n@myorg:registry=https://somewhere-else.com/myorg\n@another:registry=https://somewhere-else.com/another\n//registry.npmjs.org/:_authToken=MYTOKEN\n; would apply to both @myorg and @another\n; //somewhere-else.com/:_authToken=MYTOKEN\n; would apply only to @myorg\n//somewhere-else.com/myorg/:_authToken=MYTOKEN1\n; would apply only to @another\n//somewhere-else.com/another/:_authToken=MYTOKEN2\n```\n\n### See also\n\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm config](/cli/v8/commands/npm-config)\n* [config](/cli/v8/using-npm/config)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm](/cli/v8/commands/npm)\n"},{"id":"028add9e-cc31-5167-ab1e-3181ca331a85","frontmatter":{"title":"package.json"},"rawBody":"---\ntitle: package.json\nsection: 5\ndescription: Specifics of npm's package.json handling\nredirect_from:\n  - /configuring-npm/package-json\n  - /configuring-npm/package-json.html\n  - /configuring-npm/package.json\n  - /creating-a-packge-json-file\n  - /files/package.json\n  - /files/package.json.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/package-json.md\n---\n\n### Description\n\nThis document is all you need to know about what's required in your\npackage.json file.  It must be actual JSON, not just a JavaScript object\nliteral.\n\nA lot of the behavior described in this document is affected by the config\nsettings described in [`config`](/cli/v8/using-npm/config).\n\n### name\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The\nname and version together form an identifier that is assumed to be\ncompletely unique.  Changes to the package should come along with changes\nto the version. If you don't plan to publish your package, the name and\nversion fields are optional.\n\nThe name is what your thing is called.\n\nSome rules:\n\n* The name must be less than or equal to 214 characters. This includes the\n  scope for scoped packages.\n* The names of scoped packages can begin with a dot or an underscore. This\n  is not permitted without a scope.\n* New packages must not have uppercase letters in the name.\n* The name ends up being part of a URL, an argument on the command line,\n  and a folder name. Therefore, the name can't contain any non-URL-safe\n  characters.\n\nSome tips:\n\n* Don't use the same name as a core Node module.\n* Don't put \"js\" or \"node\" in the name.  It's assumed that it's js, since\n  you're writing a package.json file, and you can specify the engine using\n  the \"engines\" field.  (See below.)\n* The name will probably be passed as an argument to require(), so it\n  should be something short, but also reasonably descriptive.\n* You may want to check the npm registry to see if there's something by\n  that name already, before you get too attached to it.\n  <https://www.npmjs.com/>\n\nA name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See\n[`scope`](/cli/v8/using-npm/scope) for more detail.\n\n### version\n\nIf you plan to publish your package, the *most* important things in your\npackage.json are the name and version fields as they will be required. The\nname and version together form an identifier that is assumed to be\ncompletely unique.  Changes to the package should come along with changes\nto the version. If you don't plan to publish your package, the name and\nversion fields are optional.\n\nVersion must be parseable by\n[node-semver](https://github.com/npm/node-semver), which is bundled with\nnpm as a dependency.  (`npm install semver` to use it yourself.)\n\n### description\n\nPut a description in it.  It's a string.  This helps people discover your\npackage, as it's listed in `npm search`.\n\n### keywords\n\nPut keywords in it.  It's an array of strings.  This helps people discover\nyour package as it's listed in `npm search`.\n\n### homepage\n\nThe url to the project homepage.\n\nExample:\n\n```json\n\"homepage\": \"https://github.com/owner/project#readme\"\n```\n\n### bugs\n\nThe url to your project's issue tracker and / or the email address to which\nissues should be reported. These are helpful for people who encounter\nissues with your package.\n\nIt should look like this:\n\n```json\n{\n  \"url\" : \"https://github.com/owner/project/issues\",\n  \"email\" : \"project@hostname.com\"\n}\n```\n\nYou can specify either one or both values. If you want to provide only a\nurl, you can specify the value for \"bugs\" as a simple string instead of an\nobject.\n\nIf a url is provided, it will be used by the `npm bugs` command.\n\n### license\n\nYou should specify a license for your package so that people know how they\nare permitted to use it, and any restrictions you're placing on it.\n\nIf you're using a common license such as BSD-2-Clause or MIT, add a current\nSPDX license identifier for the license you're using, like this:\n\n```json\n{\n  \"license\" : \"BSD-3-Clause\"\n}\n```\n\nYou can check [the full list of SPDX license\nIDs](https://spdx.org/licenses/).  Ideally you should pick one that is\n[OSI](https://opensource.org/licenses/alphabetical) approved.\n\nIf your package is licensed under multiple common licenses, use an [SPDX\nlicense expression syntax version 2.0\nstring](https://spdx.dev/specifications/), like this:\n\n```json\n{\n  \"license\" : \"(ISC OR GPL-3.0)\"\n}\n```\nIf you are using a license that hasn't been assigned an SPDX identifier, or if\nyou are using a custom license, use a string value like this one:\n\n```json\n{\n  \"license\" : \"SEE LICENSE IN <filename>\"\n}\n```\nThen include a file named `<filename>` at the top level of the package.\n\nSome old packages used license objects or a \"licenses\" property containing\nan array of license objects:\n\n```json\n// Not valid metadata\n{\n  \"license\" : {\n    \"type\" : \"ISC\",\n    \"url\" : \"https://opensource.org/licenses/ISC\"\n  }\n}\n\n// Not valid metadata\n{\n  \"licenses\" : [\n    {\n      \"type\": \"MIT\",\n      \"url\": \"https://www.opensource.org/licenses/mit-license.php\"\n    },\n    {\n      \"type\": \"Apache-2.0\",\n      \"url\": \"https://opensource.org/licenses/apache2.0.php\"\n    }\n  ]\n}\n```\n\nThose styles are now deprecated. Instead, use SPDX expressions, like this:\n\n```json\n{\n  \"license\": \"ISC\"\n}\n```\n\n```json\n{\n  \"license\": \"(MIT OR Apache-2.0)\"\n}\n```\n\nFinally, if you do not wish to grant others the right to use a private or\nunpublished package under any terms:\n\n```json\n{\n  \"license\": \"UNLICENSED\"\n}\n```\n\nConsider also setting `\"private\": true` to prevent accidental publication.\n\n### people fields: author, contributors\n\nThe \"author\" is one person.  \"contributors\" is an array of people.  A\n\"person\" is an object with a \"name\" field and optionally \"url\" and \"email\",\nlike this:\n\n```json\n{\n  \"name\" : \"Barney Rubble\",\n  \"email\" : \"b@rubble.com\",\n  \"url\" : \"http://barnyrubble.tumblr.com/\"\n}\n```\n\nOr you can shorten that all into a single string, and npm will parse it for\nyou:\n\n```json\n{\n  \"author\": \"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)\"\n}\n```\n\nBoth email and url are optional either way.\n\nnpm also sets a top-level \"maintainers\" field with your npm user info.\n\n### funding\n\nYou can specify an object containing a URL that provides up-to-date\ninformation about ways to help fund development of your package, or a\nstring URL, or an array of these:\n\n```json\n{\n  \"funding\": {\n    \"type\" : \"individual\",\n    \"url\" : \"http://example.com/donate\"\n  },\n\n  \"funding\": {\n    \"type\" : \"patreon\",\n    \"url\" : \"https://www.patreon.com/my-account\"\n  },\n\n  \"funding\": \"http://example.com/donate\",\n\n  \"funding\": [\n    {\n      \"type\" : \"individual\",\n      \"url\" : \"http://example.com/donate\"\n    },\n    \"http://example.com/donateAlso\",\n    {\n      \"type\" : \"patreon\",\n      \"url\" : \"https://www.patreon.com/my-account\"\n    }\n  ]\n}\n```\n\nUsers can use the `npm fund` subcommand to list the `funding` URLs of all\ndependencies of their project, direct and indirect. A shortcut to visit\neach funding url is also available when providing the project name such as:\n`npm fund <projectname>` (when there are multiple URLs, the first one will\nbe visited)\n\n### files\n\nThe optional `files` field is an array of file patterns that describes the\nentries to be included when your package is installed as a dependency. File\npatterns follow a similar syntax to `.gitignore`, but reversed: including a\nfile, directory, or glob pattern (`*`, `**/*`, and such) will make it so\nthat file is included in the tarball when it's packed. Omitting the field\nwill make it default to `[\"*\"]`, which means it will include all files.\n\nSome special files and directories are also included or excluded regardless\nof whether they exist in the `files` array (see below).\n\nYou can also provide a `.npmignore` file in the root of your package or in\nsubdirectories, which will keep files from being included. At the root of\nyour package it will not override the \"files\" field, but in subdirectories\nit will. The `.npmignore` file works just like a `.gitignore`. If there is\na `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents\nwill be used instead.\n\nFiles included with the \"package.json#files\" field _cannot_ be excluded\nthrough `.npmignore` or `.gitignore`.\n\nCertain files are always included, regardless of settings:\n\n* `package.json`\n* `README`\n* `LICENSE` / `LICENCE`\n* The file in the \"main\" field\n\n`README` & `LICENSE` can have any case and extension.\n\nConversely, some files are always ignored:\n\n* `.git`\n* `CVS`\n* `.svn`\n* `.hg`\n* `.lock-wscript`\n* `.wafpickle-N`\n* `.*.swp`\n* `.DS_Store`\n* `._*`\n* `npm-debug.log`\n* `.npmrc`\n* `node_modules`\n* `config.gypi`\n* `*.orig`\n* `package-lock.json` (use\n  [`npm-shrinkwrap.json`](/cli/v8/configuring-npm/npm-shrinkwrap-json) if you wish\n  it to be published)\n\n### main\n\nThe main field is a module ID that is the primary entry point to your\nprogram.  That is, if your package is named `foo`, and a user installs it,\nand then does `require(\"foo\")`, then your main module's exports object will\nbe returned.\n\nThis should be a module relative to the root of your package folder.\n\nFor most modules, it makes the most sense to have a main script and often\nnot much else.\n\nIf `main` is not set it defaults to `index.js` in the package's root folder.\n\n### browser\n\nIf your module is meant to be used client-side the browser field should be\nused instead of the main field. This is helpful to hint users that it might\nrely on primitives that aren't available in Node.js modules. (e.g.\n`window`)\n\n### bin\n\nA lot of packages have one or more executable files that they'd like to\ninstall into the PATH. npm makes this pretty easy (in fact, it uses this\nfeature to install the \"npm\" executable.)\n\nTo use this, supply a `bin` field in your package.json which is a map of\ncommand name to local file name. When this package is installed\nglobally, that file will be linked where global bins go so it is\navailable to run by name.  When this package is installed as a\ndependency in another package, the file will be linked where it will be\navailable to that package either directly by `npm exec` or by name in other\nscripts when invoking them via `npm run-script`.\n\n\nFor example, myapp could have this:\n\n```json\n{\n  \"bin\": {\n    \"myapp\": \"./cli.js\"\n  }\n}\n```\n\nSo, when you install myapp, it'll create a symlink from the `cli.js` script\nto `/usr/local/bin/myapp`.\n\nIf you have a single executable, and its name should be the name of the\npackage, then you can just supply it as a string.  For example:\n\n```json\n{\n  \"name\": \"my-program\",\n  \"version\": \"1.2.5\",\n  \"bin\": \"./path/to/program\"\n}\n```\n\nwould be the same as this:\n\n```json\n{\n  \"name\": \"my-program\",\n  \"version\": \"1.2.5\",\n  \"bin\": {\n    \"my-program\": \"./path/to/program\"\n  }\n}\n```\n\nPlease make sure that your file(s) referenced in `bin` starts with\n`#!/usr/bin/env node`, otherwise the scripts are started without the node\nexecutable!\n\nNote that you can also set the executable files using [directories.bin](#directoriesbin).\n\nSee [folders](/cli/v8/configuring-npm/folders#executables) for more info on\nexecutables.\n\n### man\n\nSpecify either a single file or an array of filenames to put in place for\nthe `man` program to find.\n\nIf only a single file is provided, then it's installed such that it is the\nresult from `man <pkgname>`, regardless of its actual filename.  For\nexample:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": \"./man/doc.1\"\n}\n```\n\nwould link the `./man/doc.1` file in such that it is the target for `man\nfoo`\n\nIf the filename doesn't start with the package name, then it's prefixed.\nSo, this:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": [\n    \"./man/foo.1\",\n    \"./man/bar.1\"\n  ]\n}\n```\n\nwill create files to do `man foo` and `man foo-bar`.\n\nMan files must end with a number, and optionally a `.gz` suffix if they are\ncompressed.  The number dictates which man section the file is installed\ninto.\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"1.2.3\",\n  \"description\": \"A packaged foo fooer for fooing foos\",\n  \"main\": \"foo.js\",\n  \"man\": [\n    \"./man/foo.1\",\n    \"./man/foo.2\"\n  ]\n}\n```\n\nwill create entries for `man foo` and `man 2 foo`\n\n### directories\n\nThe CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec\ndetails a few ways that you can indicate the structure of your package\nusing a `directories` object. If you look at [npm's\npackage.json](https://registry.npmjs.org/npm/latest), you'll see that it\nhas directories for doc, lib, and man.\n\nIn the future, this information may be used in other creative ways.\n\n#### directories.bin\n\nIf you specify a `bin` directory in `directories.bin`, all the files in\nthat folder will be added.\n\nBecause of the way the `bin` directive works, specifying both a `bin` path\nand setting `directories.bin` is an error. If you want to specify\nindividual files, use `bin`, and for all the files in an existing `bin`\ndirectory, use `directories.bin`.\n\n#### directories.man\n\nA folder that is full of man pages.  Sugar to generate a \"man\" array by\nwalking the folder.\n\n### repository\n\nSpecify the place where your code lives. This is helpful for people who\nwant to contribute.  If the git repo is on GitHub, then the `npm docs`\ncommand will be able to find you.\n\nDo it like this:\n\n```json\n{\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/npm/cli.git\"\n  }\n}\n```\n\nThe URL should be a publicly available (perhaps read-only) url that can be\nhanded directly to a VCS program without any modification.  It should not\nbe a url to an html project page that you put in your browser.  It's for\ncomputers.\n\nFor GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the\nsame shortcut syntax you use for `npm install`:\n\n```json\n{\n  \"repository\": \"npm/npm\",\n\n  \"repository\": \"github:user/repo\",\n\n  \"repository\": \"gist:11081aaa281\",\n\n  \"repository\": \"bitbucket:user/repo\",\n\n  \"repository\": \"gitlab:user/repo\"\n}\n```\n\nIf the `package.json` for your package is not in the root directory (for\nexample if it is part of a monorepo), you can specify the directory in\nwhich it lives:\n\n```json\n{\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/facebook/react.git\",\n    \"directory\": \"packages/react-dom\"\n  }\n}\n```\n\n### scripts\n\nThe \"scripts\" property is a dictionary containing script commands that are\nrun at various times in the lifecycle of your package.  The key is the\nlifecycle event, and the value is the command to run at that point.\n\nSee [`scripts`](/cli/v8/using-npm/scripts) to find out more about writing package\nscripts.\n\n### config\n\nA \"config\" object can be used to set configuration parameters used in\npackage scripts that persist across upgrades.  For instance, if a package\nhad the following:\n\n```json\n{\n  \"name\": \"foo\",\n  \"config\": {\n    \"port\": \"8080\"\n  }\n}\n```\n\nIt could also have a \"start\" command that referenced the\n`npm_package_config_port` environment variable.\n\n### dependencies\n\nDependencies are specified in a simple object that maps a package name to a\nversion range. The version range is a string which has one or more\nspace-separated descriptors.  Dependencies can also be identified with a\ntarball or git URL.\n\n**Please do not put test harnesses or transpilers or other \"development\"\ntime tools in your `dependencies` object.**  See `devDependencies`, below.\n\nSee [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges.\n\n* `version` Must match `version` exactly\n* `>version` Must be greater than `version`\n* `>=version` etc\n* `<version`\n* `<=version`\n* `~version` \"Approximately equivalent to version\"  See\n  [semver](https://github.com/npm/node-semver#versions)\n* `^version` \"Compatible with version\"  See [semver](https://github.com/npm/node-semver#versions)\n* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0\n* `http://...` See 'URLs as Dependencies' below\n* `*` Matches any version\n* `\"\"` (just an empty string) Same as `*`\n* `version1 - version2` Same as `>=version1 <=version2`.\n* `range1 || range2` Passes if either range1 or range2 are satisfied.\n* `git...` See 'Git URLs as Dependencies' below\n* `user/repo` See 'GitHub URLs' below\n* `tag` A specific version tagged and published as `tag`  See [`npm\n  dist-tag`](/cli/v8/commands/npm-dist-tag)\n* `path/path/path` See [Local Paths](#local-paths) below\n\nFor example, these are all valid:\n\n```json\n{\n  \"dependencies\": {\n    \"foo\": \"1.0.0 - 2.9999.9999\",\n    \"bar\": \">=1.0.2 <2.1.2\",\n    \"baz\": \">1.0.2 <=2.3.4\",\n    \"boo\": \"2.0.1\",\n    \"qux\": \"<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0\",\n    \"asd\": \"http://asdf.com/asdf.tar.gz\",\n    \"til\": \"~1.2\",\n    \"elf\": \"~1.2.3\",\n    \"two\": \"2.x\",\n    \"thr\": \"3.3.x\",\n    \"lat\": \"latest\",\n    \"dyl\": \"file:../dyl\"\n  }\n}\n```\n\n#### URLs as Dependencies\n\nYou may specify a tarball URL in place of a version range.\n\nThis tarball will be downloaded and installed locally to your package at\ninstall time.\n\n#### Git URLs as Dependencies\n\nGit urls are of the form:\n\n```bash\n<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]\n```\n\n`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or\n`git+file`.\n\nIf `#<commit-ish>` is provided, it will be used to clone exactly that\ncommit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can\nbe any valid semver range or exact version, and npm will look for any tags\nor refs matching that range in the remote repository, much as it would for\na registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is\nspecified, then the default branch is used.\n\nExamples:\n\n```bash\ngit+ssh://git@github.com:npm/cli.git#v1.0.27\ngit+ssh://git@github.com:npm/cli#semver:^5.0\ngit+https://isaacs@github.com/npm/cli.git\ngit://github.com/npm/cli.git#v1.0.27\n```\n\nWhen installing from a `git` repository, the presence of certain fields in the\n`package.json` will cause npm to believe it needs to perform a build. To do so\nyour repository will be cloned into a temporary directory, all of its deps\ninstalled, relevant scripts run, and the resulting directory packed and\ninstalled.\n\nThis flow will occur if your git dependency uses `workspaces`, or if any of the\nfollowing scripts are present:\n\n* `build`\n* `prepare`\n* `prepack`\n* `preinstall`\n* `install`\n* `postinstall`\n\nIf your git repository includes pre-built artifacts, you will likely want to\nmake sure that none of the above scripts are defined, or your dependency\nwill be rebuilt for every installation.\n\n#### GitHub URLs\n\nAs of version 1.1.65, you can refer to GitHub urls as just \"foo\":\n\"user/foo-project\".  Just as with git URLs, a `commit-ish` suffix can be\nincluded.  For example:\n\n```json\n{\n  \"name\": \"foo\",\n  \"version\": \"0.0.0\",\n  \"dependencies\": {\n    \"express\": \"expressjs/express\",\n    \"mocha\": \"mochajs/mocha#4727d357ea\",\n    \"module\": \"user/repo#feature\\/branch\"\n  }\n}\n```\n\n#### Local Paths\n\nAs of version 2.0.0 you can provide a path to a local directory that\ncontains a package. Local paths can be saved using `npm install -S` or `npm\ninstall --save`, using any of these forms:\n\n```bash\n../foo/bar\n~/foo/bar\n./foo/bar\n/foo/bar\n```\n\nin which case they will be normalized to a relative path and added to your\n`package.json`. For example:\n\n```json\n{\n  \"name\": \"baz\",\n  \"dependencies\": {\n    \"bar\": \"file:../foo/bar\"\n  }\n}\n```\n\nThis feature is helpful for local offline development and creating tests\nthat require npm installing where you don't want to hit an external server,\nbut should not be used when publishing packages to the public registry.\n\n*note*: Packages linked by local path will not have their own\ndependencies installed when `npm install` is ran in this case.  You must\nrun `npm install` from inside the local path itself.\n\n### devDependencies\n\nIf someone is planning on downloading and using your module in their\nprogram, then they probably don't want or need to download and build the\nexternal test or documentation framework that you use.\n\nIn this case, it's best to map these additional items in a\n`devDependencies` object.\n\nThese things will be installed when doing `npm link` or `npm install` from\nthe root of a package, and can be managed like any other npm configuration\nparam.  See [`config`](/cli/v8/using-npm/config) for more on the topic.\n\nFor build steps that are not platform-specific, such as compiling\nCoffeeScript or other languages to JavaScript, use the `prepare` script to\ndo this, and make the required package a devDependency.\n\nFor example:\n\n```json\n{\n  \"name\": \"ethopia-waza\",\n  \"description\": \"a delightfully fruity coffee varietal\",\n  \"version\": \"1.2.3\",\n  \"devDependencies\": {\n    \"coffee-script\": \"~1.6.3\"\n  },\n  \"scripts\": {\n    \"prepare\": \"coffee -o lib/ -c src/waza.coffee\"\n  },\n  \"main\": \"lib/waza.js\"\n}\n```\n\nThe `prepare` script will be run before publishing, so that users can\nconsume the functionality without requiring them to compile it themselves.\nIn dev mode (ie, locally running `npm install`), it'll run this script as\nwell, so that you can test it easily.\n\n### peerDependencies\n\nIn some cases, you want to express the compatibility of your package with a\nhost tool or library, while not necessarily doing a `require` of this host.\nThis is usually referred to as a *plugin*. Notably, your module may be\nexposing a specific interface, expected and specified by the host\ndocumentation.\n\nFor example:\n\n```json\n{\n  \"name\": \"tea-latte\",\n  \"version\": \"1.3.5\",\n  \"peerDependencies\": {\n    \"tea\": \"2.x\"\n  }\n}\n```\n\nThis ensures your package `tea-latte` can be installed *along* with the\nsecond major version of the host package `tea` only. `npm install\ntea-latte` could possibly yield the following dependency graph:\n\n```bash\n├── tea-latte@1.3.5\n└── tea@2.2.0\n```\n\nIn npm versions 3 through 6, `peerDependencies` were not automatically\ninstalled, and would raise a warning if an invalid version of the peer\ndependency was found in the tree.  As of npm v7, peerDependencies _are_\ninstalled by default.\n\nTrying to install another plugin with a conflicting requirement may cause\nan error if the tree cannot be resolved correctly. For this reason, make\nsure your plugin requirement is as broad as possible, and not to lock it\ndown to specific patch versions.\n\nAssuming the host complies with [semver](https://semver.org/), only changes\nin the host package's major version will break your plugin. Thus, if you've\nworked with every 1.x version of the host package, use `\"^1.0\"` or `\"1.x\"`\nto express this. If you depend on features introduced in 1.5.2, use\n`\"^1.5.2\"`.\n\n### peerDependenciesMeta\n\nWhen a user installs your package, npm will emit warnings if packages\nspecified in `peerDependencies` are not already installed. The\n`peerDependenciesMeta` field serves to provide npm more information on how\nyour peer dependencies are to be used. Specifically, it allows peer\ndependencies to be marked as optional.\n\nFor example:\n\n```json\n{\n  \"name\": \"tea-latte\",\n  \"version\": \"1.3.5\",\n  \"peerDependencies\": {\n    \"tea\": \"2.x\",\n    \"soy-milk\": \"1.2\"\n  },\n  \"peerDependenciesMeta\": {\n    \"soy-milk\": {\n      \"optional\": true\n    }\n  }\n}\n```\n\nMarking a peer dependency as optional ensures npm will not emit a warning\nif the `soy-milk` package is not installed on the host. This allows you to\nintegrate and interact with a variety of host packages without requiring\nall of them to be installed.\n\n### bundleDependencies\n\nThis defines an array of package names that will be bundled when publishing\nthe package.\n\nIn cases where you need to preserve npm packages locally or have them\navailable through a single file download, you can bundle the packages in a\ntarball file by specifying the package names in the `bundleDependencies`\narray and executing `npm pack`.\n\nFor example:\n\nIf we define a package.json like this:\n\n```json\n{\n  \"name\": \"awesome-web-framework\",\n  \"version\": \"1.0.0\",\n  \"bundleDependencies\": [\n    \"renderized\",\n    \"super-streams\"\n  ]\n}\n```\n\nwe can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`.\nThis file contains the dependencies `renderized` and `super-streams` which\ncan be installed in a new project by executing `npm install\nawesome-web-framework-1.0.0.tgz`.  Note that the package names do not\ninclude any versions, as that information is specified in `dependencies`.\n\nIf this is spelled `\"bundledDependencies\"`, then that is also honored.\n\nAlternatively, `\"bundleDependencies\"` can be defined as a boolean value. A\nvalue of `true` will bundle all dependencies, a value of `false` will bundle\nnone.\n\n### optionalDependencies\n\nIf a dependency can be used, but you would like npm to proceed if it cannot\nbe found or fails to install, then you may put it in the\n`optionalDependencies` object.  This is a map of package name to version or\nurl, just like the `dependencies` object.  The difference is that build\nfailures do not cause installation to fail.  Running `npm install\n--omit=optional` will prevent these dependencies from being installed.\n\nIt is still your program's responsibility to handle the lack of the\ndependency.  For example, something like this:\n\n```js\ntry {\n  var foo = require('foo')\n  var fooVersion = require('foo/package.json').version\n} catch (er) {\n  foo = null\n}\nif ( notGoodFooVersion(fooVersion) ) {\n  foo = null\n}\n\n// .. then later in your program ..\n\nif (foo) {\n  foo.doFooThings()\n}\n```\n\nEntries in `optionalDependencies` will override entries of the same name in\n`dependencies`, so it's usually best to only put in one place.\n\n### overrides\n\nIf you need to make specific changes to dependencies of your dependencies, for\nexample replacing the version of a dependency with a known security issue,\nreplacing an existing dependency with a fork, or making sure that the same\nversion of a package is used everywhere, then you may add an override.\n\nOverrides provide a way to replace a package in your dependency tree with\nanother version, or another package entirely. These changes can be scoped as\nspecific or as vague as desired.\n\nTo make sure the package `foo` is always installed as version `1.0.0` no matter\nwhat version your dependencies rely on:\n\n```json\n{\n  \"overrides\": {\n    \"foo\": \"1.0.0\"\n  }\n}\n```\n\nThe above is a short hand notation, the full object form can be used to allow\noverriding a package itself as well as a child of the package. This will cause\n`foo` to always be `1.0.0` while also making `bar` at any depth beyond `foo`\nalso `1.0.0`:\n\n```json\n{\n  \"overrides\": {\n    \"foo\": {\n      \".\": \"1.0.0\",\n      \"bar\": \"1.0.0\"\n    }\n  }\n}\n```\n\nTo only override `foo` to be `1.0.0` when it's a child (or grandchild, or great\ngrandchild, etc) of the package `bar`:\n\n```json\n{\n  \"overrides\": {\n    \"bar\": {\n      \"foo\": \"1.0.0\"\n    }\n  }\n}\n```\n\nKeys can be nested to any arbitrary length. To override `foo` only when it's a\nchild of `bar` and only when `bar` is a child of `baz`:\n\n```json\n{\n  \"overrides\": {\n    \"baz\": {\n      \"bar\": {\n        \"foo\": \"1.0.0\"\n      }\n    }\n  }\n}\n```\n\nThe key of an override can also include a version, or range of versions.\nTo override `foo` to `1.0.0`, but only when it's a child of `bar@2.0.0`:\n\n```json\n{\n  \"overrides\": {\n    \"bar@2.0.0\": {\n      \"foo\": \"1.0.0\"\n    }\n  }\n}\n```\n\nYou may not set an override for a package that you directly depend on unless\nboth the dependency and the override itself share the exact same spec. To make\nthis limitation easier to deal with, overrides may also be defined as a\nreference to a spec for a direct dependency by prefixing the name of the\npackage you wish the version to match with a `$`.\n\n```json\n{\n  \"dependencies\": {\n    \"foo\": \"^1.0.0\"\n  },\n  \"overrides\": {\n    // BAD, will throw an EOVERRIDE error\n    // \"foo\": \"^2.0.0\"\n    // GOOD, specs match so override is allowed\n    // \"foo\": \"^1.0.0\"\n    // BEST, the override is defined as a reference to the dependency\n    \"foo\": \"$foo\",\n    // the referenced package does not need to match the overridden one\n    \"bar\": \"$foo\"\n  }\n}\n```\n\n### engines\n\nYou can specify the version of node that your stuff works on:\n\n```json\n{\n  \"engines\": {\n    \"node\": \">=0.10.3 <15\"\n  }\n}\n```\n\nAnd, like with dependencies, if you don't specify the version (or if you\nspecify \"\\*\" as the version), then any version of node will do.\n\nYou can also use the \"engines\" field to specify which versions of npm are\ncapable of properly installing your program.  For example:\n\n```json\n{\n  \"engines\": {\n    \"npm\": \"~1.0.20\"\n  }\n}\n```\n\nUnless the user has set the `engine-strict` config flag, this field is\nadvisory only and will only produce warnings when your package is installed\nas a dependency.\n\n### os\n\nYou can specify which operating systems your\nmodule will run on:\n\n```json\n{\n  \"os\": [\n    \"darwin\",\n    \"linux\"\n  ]\n}\n```\n\nYou can also block instead of allowing operating systems, just prepend the\nblocked os with a '!':\n\n```json\n{\n  \"os\": [\n    \"!win32\"\n  ]\n}\n```\n\nThe host operating system is determined by `process.platform`\n\nIt is allowed to both block and allow an item, although there isn't any\ngood reason to do this.\n\n### cpu\n\nIf your code only runs on certain cpu architectures,\nyou can specify which ones.\n\n```json\n{\n  \"cpu\": [\n    \"x64\",\n    \"ia32\"\n  ]\n}\n```\n\nLike the `os` option, you can also block architectures:\n\n```json\n{\n  \"cpu\": [\n    \"!arm\",\n    \"!mips\"\n  ]\n}\n```\n\nThe host architecture is determined by `process.arch`\n\n### private\n\nIf you set `\"private\": true` in your package.json, then npm will refuse to\npublish it.\n\nThis is a way to prevent accidental publication of private repositories.\nIf you would like to ensure that a given package is only ever published to\na specific registry (for example, an internal registry), then use the\n`publishConfig` dictionary described below to override the `registry`\nconfig param at publish-time.\n\n### publishConfig\n\nThis is a set of config values that will be used at publish-time. It's\nespecially handy if you want to set the tag, registry or access, so that\nyou can ensure that a given package is not tagged with \"latest\", published\nto the global public registry or that a scoped module is private by\ndefault.\n\nSee [`config`](/cli/v8/using-npm/config) to see the list of config options that\ncan be overridden.\n\n### workspaces\n\nThe optional `workspaces` field is an array of file patterns that describes\nlocations within the local file system that the install client should look\nup to find each [workspace](/cli/v8/using-npm/workspaces) that needs to be\nsymlinked to the top level `node_modules` folder.\n\nIt can describe either the direct paths of the folders to be used as\nworkspaces or it can define globs that will resolve to these same folders.\n\nIn the following example, all folders located inside the folder\n`./packages` will be treated as workspaces as long as they have valid\n`package.json` files inside them:\n\n```json\n{\n  \"name\": \"workspace-example\",\n  \"workspaces\": [\n    \"./packages/*\"\n  ]\n}\n```\n\nSee [`workspaces`](/cli/v8/using-npm/workspaces) for more examples.\n\n### DEFAULT VALUES\n\nnpm will default some values based on package contents.\n\n* `\"scripts\": {\"start\": \"node server.js\"}`\n\n  If there is a `server.js` file in the root of your package, then npm will\n  default the `start` command to `node server.js`.\n\n* `\"scripts\":{\"install\": \"node-gyp rebuild\"}`\n\n  If there is a `binding.gyp` file in the root of your package and you have\n  not defined an `install` or `preinstall` script, npm will default the\n  `install` command to compile using node-gyp.\n\n* `\"contributors\": [...]`\n\n  If there is an `AUTHORS` file in the root of your package, npm will treat\n  each line as a `Name <email> (url)` format, where email and url are\n  optional.  Lines which start with a `#` or are blank, will be ignored.\n\n### SEE ALSO\n\n* [semver](https://github.com/npm/node-semver#versions)\n* [workspaces](/cli/v8/using-npm/workspaces)\n* [npm init](/cli/v8/commands/npm-init)\n* [npm version](/cli/v8/commands/npm-version)\n* [npm config](/cli/v8/commands/npm-config)\n* [npm help](/cli/v8/commands/npm-help)\n* [npm install](/cli/v8/commands/npm-install)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm uninstall](/cli/v8/commands/npm-uninstall)\n"},{"id":"530eb4bf-8335-5d6b-8cd2-02011e4c1b04","frontmatter":{"title":"package-lock.json"},"rawBody":"---\ntitle: package-lock.json\nsection: 5\ndescription: A manifestation of the manifest\nredirect_from:\n  - /configuring-npm/package-lock-json\n  - /configuring-npm/package-lock-json.html\n  - /files/package-lock.json\n  - /files/package-lock.json.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/configuring-npm/package-lock-json.md\n---\n\n### Description\n\n`package-lock.json` is automatically generated for any operations where npm\nmodifies either the `node_modules` tree, or `package.json`. It describes the\nexact tree that was generated, such that subsequent installs are able to\ngenerate identical trees, regardless of intermediate dependency updates.\n\nThis file is intended to be committed into source repositories, and serves\nvarious purposes:\n\n* Describe a single representation of a dependency tree such that\n  teammates, deployments, and continuous integration are guaranteed to\n  install exactly the same dependencies.\n\n* Provide a facility for users to \"time-travel\" to previous states of\n  `node_modules` without having to commit the directory itself.\n\n* Facilitate greater visibility of tree changes through readable source\n  control diffs.\n\n* Optimize the installation process by allowing npm to skip repeated\n  metadata resolutions for previously-installed packages.\n\n* As of npm v7, lockfiles include enough information to gain a complete\n  picture of the package tree, reducing the need to read `package.json`\n  files, and allowing for significant performance improvements.\n\n### `package-lock.json` vs `npm-shrinkwrap.json`\n\nBoth of these files have the same format, and perform similar functions in\nthe root of a project.\n\nThe difference is that `package-lock.json` cannot be published, and it will \nbe ignored if found in any place other than the root project.\n\nIn contrast, [npm-shrinkwrap.json](/cli/v8/configuring-npm/npm-shrinkwrap-json) allows\npublication, and defines the dependency tree from the point encountered.\nThis is not recommended unless deploying a CLI tool or otherwise using the\npublication process for producing production packages.\n\nIf both `package-lock.json` and `npm-shrinkwrap.json` are present in the\nroot of a project, `npm-shrinkwrap.json` will take precedence and\n`package-lock.json` will be ignored.\n\n### Hidden Lockfiles\n\nIn order to avoid processing the `node_modules` folder repeatedly, npm as\nof v7 uses a \"hidden\" lockfile present in\n`node_modules/.package-lock.json`.  This contains information about the\ntree, and is used in lieu of reading the entire `node_modules` hierarchy\nprovided that the following conditions are met:\n\n- All package folders it references exist in the `node_modules` hierarchy.\n- No package folders exist in the `node_modules` hierarchy that are not\n  listed in the lockfile.\n- The modified time of the file is at least as recent as all of the package\n  folders it references.\n\nThat is, the hidden lockfile will only be relevant if it was created as\npart of the most recent update to the package tree.  If another CLI mutates\nthe tree in any way, this will be detected, and the hidden lockfile will be\nignored.\n\nNote that it _is_ possible to manually change the _contents_ of a package\nin such a way that the modified time of the package folder is unaffected.\nFor example, if you add a file to `node_modules/foo/lib/bar.js`, then the\nmodified time on `node_modules/foo` will not reflect this change.  If you\nare manually editing files in `node_modules`, it is generally best to\ndelete the file at `node_modules/.package-lock.json`.\n\nAs the hidden lockfile is ignored by older npm versions, it does not\ncontain the backwards compatibility affordances present in \"normal\"\nlockfiles.  That is, it is `lockfileVersion: 3`, rather than\n`lockfileVersion: 2`.\n\n### Handling Old Lockfiles\n\nWhen npm detects a lockfile from npm v6 or before during the package\ninstallation process, it is automatically updated to fetch missing\ninformation from either the `node_modules` tree or (in the case of empty\n`node_modules` trees or very old lockfile formats) the npm registry.\n\n### File Format\n\n#### `name`\n\nThe name of the package this is a package-lock for. This will match what's\nin `package.json`.\n\n#### `version`\n\nThe version of the package this is a package-lock for. This will match\nwhat's in `package.json`.\n\n#### `lockfileVersion`\n\nAn integer version, starting at `1` with the version number of this\ndocument whose semantics were used when generating this\n`package-lock.json`.\n\nNote that the file format changed significantly in npm v7 to track\ninformation that would have otherwise required looking in `node_modules` or\nthe npm registry.  Lockfiles generated by npm v7 will contain\n`lockfileVersion: 2`.\n\n* No version provided: an \"ancient\" shrinkwrap file from a version of npm\n  prior to npm v5.\n* `1`: The lockfile version used by npm v5 and v6.\n* `2`: The lockfile version used by npm v7, which is backwards compatible\n  to v1 lockfiles.\n* `3`: The lockfile version used by npm v7, _without_ backwards\n  compatibility affordances.  This is used for the hidden lockfile at\n  `node_modules/.package-lock.json`, and will likely be used in a future\n  version of npm, once support for npm v6 is no longer relevant.\n\nnpm will always attempt to get whatever data it can out of a lockfile, even\nif it is not a version that it was designed to support.\n\n#### `packages`\n\nThis is an object that maps package locations to an object containing the\ninformation about that package.\n\nThe root project is typically listed with a key of `\"\"`, and all other\npackages are listed with their relative paths from the root project folder.\n\nPackage descriptors have the following fields:\n\n* version: The version found in `package.json`\n\n* resolved: The place where the package was actually resolved from.  In\n  the case of packages fetched from the registry, this will be a url to a\n  tarball.  In the case of git dependencies, this will be the full git url\n  with commit sha.  In the case of link dependencies, this will be the\n  location of the link target. `registry.npmjs.org` is a magic value meaning\n  \"the currently configured registry\".\n\n* integrity: A `sha512` or `sha1` [Standard Subresource\n  Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)\n  string for the artifact that was unpacked in this location.\n\n* link: A flag to indicate that this is a symbolic link.  If this is\n  present, no other fields are specified, since the link target will also\n  be included in the lockfile.\n\n* dev, optional, devOptional: If the package is strictly part of the\n  `devDependencies` tree, then `dev` will be true.  If it is strictly part\n  of the `optionalDependencies` tree, then `optional` will be set.  If it\n  is both a `dev` dependency _and_ an `optional` dependency of a non-dev\n  dependency, then `devOptional` will be set.  (An `optional` dependency of\n  a `dev` dependency will have both `dev` and `optional` set.)\n\n* inBundle: A flag to indicate that the package is a bundled dependency.\n\n* hasInstallScript: A flag to indicate that the package has a `preinstall`,\n  `install`, or `postinstall` script.\n\n* hasShrinkwrap: A flag to indicate that the package has an\n  `npm-shrinkwrap.json` file.\n\n* bin, license, engines, dependencies, optionalDependencies: fields from\n  `package.json`\n\n#### dependencies\n\nLegacy data for supporting versions of npm that use `lockfileVersion: 1`.\nThis is a mapping of package names to dependency objects.  Because the\nobject structure is strictly hierarchical, symbolic link dependencies are\nsomewhat challenging to represent in some cases.\n\nnpm v7 ignores this section entirely if a `packages` section is present,\nbut does keep it up to date in order to support switching between npm v6\nand npm v7.\n\nDependency objects have the following fields:\n\n* version: a specifier that varies depending on the nature of the package,\n  and is usable in fetching a new copy of it.\n\n    * bundled dependencies: Regardless of source, this is a version number\n      that is purely for informational purposes.\n    * registry sources: This is a version number. (eg, `1.2.3`)\n    * git sources: This is a git specifier with resolved committish. (eg,\n      `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`)\n    * http tarball sources: This is the URL of the tarball. (eg,\n      `https://example.com/example-1.3.0.tgz`)\n    * local tarball sources: This is the file URL of the tarball. (eg\n      `file:///opt/storage/example-1.3.0.tgz`)\n    * local link sources: This is the file URL of the link. (eg\n      `file:libs/our-module`)\n\n* integrity: A `sha512` or `sha1` [Standard Subresource\n  Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)\n  string for the artifact that was unpacked in this location.  For git\n  dependencies, this is the commit sha.\n\n* resolved: For registry sources this is path of the tarball relative to\n  the registry URL.  If the tarball URL isn't on the same server as the\n  registry URL then this is a complete URL. `registry.npmjs.org` is a magic\n  value meaning \"the currently configured registry\".\n\n* bundled:  If true, this is the bundled dependency and will be installed\n  by the parent module.  When installing, this module will be extracted\n  from the parent module during the extract phase, not installed as a\n  separate dependency.\n\n* dev: If true then this dependency is either a development dependency ONLY\n  of the top level module or a transitive dependency of one.  This is false\n  for dependencies that are both a development dependency of the top level\n  and a transitive dependency of a non-development dependency of the top\n  level.\n\n* optional: If true then this dependency is either an optional dependency\n  ONLY of the top level module or a transitive dependency of one.  This is\n  false for dependencies that are both an optional dependency of the top\n  level and a transitive dependency of a non-optional dependency of the top\n  level.\n\n* requires: This is a mapping of module name to version.  This is a list of\n  everything this module requires, regardless of where it will be\n  installed.  The version should match via normal matching rules a\n  dependency either in our `dependencies` or in a level higher than us.\n\n* dependencies: The dependencies of this dependency, exactly as at the top\n  level.\n\n### See also\n\n* [npm shrinkwrap](/cli/v8/commands/npm-shrinkwrap)\n* [npm-shrinkwrap.json](/cli/v8/configuring-npm/npm-shrinkwrap-json)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"5ce52e22-945d-5201-a997-293db7c88bb9","frontmatter":{"title":"config"},"rawBody":"---\ntitle: config\nsection: 7\ndescription: More than you probably want to know about npm configuration\nredirect_from:\n  - /using-npm/config\n  - /using-npm/config.html\n  - /misc/config\n  - /misc/config.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/config.md\n---\n\n### Description\n\nnpm gets its configuration values from the following sources, sorted by priority:\n\n#### Command Line Flags\n\nPutting `--foo bar` on the command line sets the `foo` configuration\nparameter to `\"bar\"`.  A `--` argument tells the cli parser to stop\nreading flags.  Using `--flag` without specifying any value will set\nthe value to `true`.\n\nExample: `--flag1 --flag2` will set both configuration parameters\nto `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,\nand `flag2` to `bar`.  Finally, `--flag1 --flag2 -- bar` will set\nboth configuration parameters to `true`, and the `bar` is taken\nas a command argument.\n\n#### Environment Variables\n\nAny environment variables that start with `npm_config_` will be\ninterpreted as a configuration parameter.  For example, putting\n`npm_config_foo=bar` in your environment will set the `foo`\nconfiguration parameter to `bar`.  Any environment configurations that\nare not given a value will be given the value of `true`.  Config\nvalues are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the\nsame. However, please note that inside [`scripts`](/cli/v8/using-npm/scripts)\nnpm will set its own environment variables and Node will prefer\nthose lowercase versions over any uppercase ones that you might set.\nFor details see [this issue](https://github.com/npm/npm/issues/14528).\n\nNotice that you need to use underscores instead of dashes, so `--allow-same-version`\nwould become `npm_config_allow_same_version=true`.\n\n#### npmrc Files\n\nThe four relevant files are:\n\n* per-project configuration file (`/path/to/my/project/.npmrc`)\n* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI\n  option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)\n* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via\n  CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)\n* npm's built-in configuration file (`/path/to/npm/npmrc`)\n\nSee [npmrc](/cli/v8/configuring-npm/npmrc) for more details.\n\n#### Default Configs\n\nRun `npm config ls -l` to see a set of configuration parameters that are\ninternal to npm, and are defaults if nothing else is specified.\n\n### Shorthands and Other CLI Niceties\n\nThe following shorthands are parsed on the command-line:\n\n<!-- AUTOGENERATED CONFIG SHORTHANDS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n* `-a`: `--all`\n* `--enjoy-by`: `--before`\n* `-c`: `--call`\n* `--desc`: `--description`\n* `-f`: `--force`\n* `-g`: `--global`\n* `--iwr`: `--include-workspace-root`\n* `-L`: `--location`\n* `-d`: `--loglevel info`\n* `-s`: `--loglevel silent`\n* `--silent`: `--loglevel silent`\n* `--ddd`: `--loglevel silly`\n* `--dd`: `--loglevel verbose`\n* `--verbose`: `--loglevel verbose`\n* `-q`: `--loglevel warn`\n* `--quiet`: `--loglevel warn`\n* `-l`: `--long`\n* `-m`: `--message`\n* `--local`: `--no-global`\n* `-n`: `--no-yes`\n* `--no`: `--no-yes`\n* `-p`: `--parseable`\n* `--porcelain`: `--parseable`\n* `-C`: `--prefix`\n* `--readonly`: `--read-only`\n* `--reg`: `--registry`\n* `-S`: `--save`\n* `-B`: `--save-bundle`\n* `-D`: `--save-dev`\n* `-E`: `--save-exact`\n* `-O`: `--save-optional`\n* `-P`: `--save-prod`\n* `-?`: `--usage`\n* `-h`: `--usage`\n* `-H`: `--usage`\n* `--help`: `--usage`\n* `-v`: `--version`\n* `-w`: `--workspace`\n* `--ws`: `--workspaces`\n* `-y`: `--yes`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n<!-- AUTOGENERATED CONFIG SHORTHANDS END -->\n\nIf the specified configuration param resolves unambiguously to a known\nconfiguration parameter, then it is expanded to that configuration\nparameter.  For example:\n\n```bash\nnpm ls --par\n# same as:\nnpm ls --parseable\n```\n\nIf multiple single-character shorthands are strung together, and the\nresulting combination is unambiguously not some other configuration\nparam, then it is expanded to its various component pieces.  For\nexample:\n\n```bash\nnpm ls -gpld\n# same as:\nnpm ls --global --parseable --long --loglevel info\n```\n\n### Config Settings\n\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n#### `_auth`\n\n* Default: null\n* Type: null or String\n\nA basic-auth string to use when authenticating against the npm registry.\nThis will ONLY be used to authenticate against the npm registry. For other\nregistries you will need to scope it like \"//other-registry.tld/:_auth\"\n\nWarning: This should generally not be set via a command-line option. It is\nsafer to use a registry-provided authentication bearer token stored in the\n~/.npmrc file by running `npm login`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `access`\n\n* Default: 'restricted' for scoped packages, 'public' for unscoped packages\n* Type: null, \"restricted\", or \"public\"\n\nWhen publishing scoped packages, the access level defaults to `restricted`.\nIf you want your scoped package to be publicly viewable (and installable)\nset `--access=public`. The only valid values for `access` are `public` and\n`restricted`. Unscoped packages _always_ have an access level of `public`.\n\nNote: Using the `--access` flag on the `npm publish` command will only set\nthe package access level on the initial publish of the package. Any\nsubsequent `npm publish` commands using the `--access` flag will not have an\neffect to the access level. To make changes to the access level after the\ninitial publish use `npm access`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `all`\n\n* Default: false\n* Type: Boolean\n\nWhen running `npm outdated` and `npm ls`, setting `--all` will show all\noutdated or installed packages, rather than only those directly depended\nupon by the current project.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `allow-same-version`\n\n* Default: false\n* Type: Boolean\n\nPrevents throwing an error when `npm version` is used to set the new version\nto the same value as the current version.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" submit audit reports alongside the current npm command to the\ndefault registry and all registries configured for scopes. See the\ndocumentation for [`npm audit`](/cli/v8/commands/npm-audit) for details on what is\nsubmitted.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `audit-level`\n\n* Default: null\n* Type: null, \"info\", \"low\", \"moderate\", \"high\", \"critical\", or \"none\"\n\nThe minimum level of vulnerability for `npm audit` to exit with a non-zero\nexit code.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `auth-type`\n\n* Default: \"legacy\"\n* Type: \"legacy\", \"web\", \"sso\", \"saml\", \"oauth\", or \"webauthn\"\n\nNOTE: auth-type values \"sso\", \"saml\", \"oauth\", and \"webauthn\" will be\nremoved in a future version.\n\nWhat authentication strategy to use with `login`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `before`\n\n* Default: null\n* Type: null or Date\n\nIf passed to `npm install`, will rebuild the npm tree such that only\nversions that were available **on or before** the `--before` time get\ninstalled. If there's no versions available for the current set of direct\ndependencies, the command will error.\n\nIf the requested version is a `dist-tag` and the given tag does not pass the\n`--before` filter, the most recent version less than or equal to that tag\nwill be used. For example, `foo@latest` might install `foo@1.2` even though\n`latest` is `2.0`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `bin-links`\n\n* Default: true\n* Type: Boolean\n\nTells npm to create symlinks (or `.cmd` shims on Windows) for package\nexecutables.\n\nSet to false to have it not do this. This can be used to work around the\nfact that some file systems don't support symlinks, even on ostensibly Unix\nsystems.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `browser`\n\n* Default: OS X: `\"open\"`, Windows: `\"start\"`, Others: `\"xdg-open\"`\n* Type: null, Boolean, or String\n\nThe browser that is called by npm commands to open websites.\n\nSet to `false` to suppress browser behavior and instead print urls to\nterminal.\n\nSet to `true` to use default system URL opener.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ca`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThe Certificate Authority signing certificate that is trusted for SSL\nconnections to the registry. Values should be in PEM format (Windows calls\nit \"Base-64 encoded X.509 (.CER)\") with newlines replaced by the string\n\"\\n\". For example:\n\n```ini\nca=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nSet to `null` to only allow \"known\" registrars, or to a specific CA cert to\ntrust only that specific signing authority.\n\nMultiple CAs can be trusted by specifying an array of certificates:\n\n```ini\nca[]=\"...\"\nca[]=\"...\"\n```\n\nSee also the `strict-ssl` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache`\n\n* Default: Windows: `%LocalAppData%\\npm-cache`, Posix: `~/.npm`\n* Type: Path\n\nThe location of npm's cache directory. See [`npm\ncache`](/cli/v8/commands/npm-cache)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cafile`\n\n* Default: null\n* Type: Path\n\nA path to a file containing one or multiple Certificate Authority signing\ncertificates. Similar to the `ca` setting, but allows for multiple CA's, as\nwell as for the CA information to be stored in a file on disk.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `call`\n\n* Default: \"\"\n* Type: String\n\nOptional companion option for `npm exec`, `npx` that allows for specifying a\ncustom command to be run along with the installed packages.\n\n```bash\nnpm exec --package yo --package generator-node --call \"yo node\"\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cert`\n\n* Default: null\n* Type: null or String\n\nA client certificate to pass when accessing the registry. Values should be\nin PEM format (Windows calls it \"Base-64 encoded X.509 (.CER)\") with\nnewlines replaced by the string \"\\n\". For example:\n\n```ini\ncert=\"-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----\"\n```\n\nIt is _not_ the path to a certificate file, though you can set a\nregistry-scoped \"certfile\" path like\n\"//other-registry.tld/:certfile=/path/to/cert.pem\".\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ci-name`\n\n* Default: The name of the current CI system, or `null` when not on a known CI\n  platform.\n* Type: null or String\n\nThe name of a continuous integration system. If not set explicitly, npm will\ndetect the current CI environment using the\n[`@npmcli/ci-detect`](http://npm.im/@npmcli/ci-detect) module.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cidr`\n\n* Default: null\n* Type: null or String (can be set multiple times)\n\nThis is a list of CIDR address to be used when configuring limited access\ntokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `color`\n\n* Default: true unless the NO_COLOR environ is set to something other than '0'\n* Type: \"always\" or Boolean\n\nIf false, never shows colors. If `\"always\"` then always shows colors. If\ntrue, then only prints color codes for tty file descriptors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `commit-hooks`\n\n* Default: true\n* Type: Boolean\n\nRun git commit hooks when using the `npm version` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `depth`\n\n* Default: `Infinity` if `--all` is set, otherwise `1`\n* Type: null or Number\n\nThe depth to go when recursing packages for `npm ls`.\n\nIf not set, `npm ls` will show only the immediate dependencies of the root\nproject. If `--all` is set, then npm will show all dependencies by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `description`\n\n* Default: true\n* Type: Boolean\n\nShow the description in `npm search`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff`\n\n* Default:\n* Type: String (can be set multiple times)\n\nDefine arguments to compare in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-dst-prefix`\n\n* Default: \"b/\"\n* Type: String\n\nDestination prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-ignore-all-space`\n\n* Default: false\n* Type: Boolean\n\nIgnore whitespace when comparing lines in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-name-only`\n\n* Default: false\n* Type: Boolean\n\nPrints only filenames when using `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-no-prefix`\n\n* Default: false\n* Type: Boolean\n\nDo not show any source or destination prefix in `npm diff` output.\n\nNote: this causes `npm diff` to ignore the `--diff-src-prefix` and\n`--diff-dst-prefix` configs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-src-prefix`\n\n* Default: \"a/\"\n* Type: String\n\nSource prefix to be used in `npm diff` output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-text`\n\n* Default: false\n* Type: Boolean\n\nTreat all files as text in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `diff-unified`\n\n* Default: 3\n* Type: Number\n\nThe number of lines of context to print in `npm diff`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dry-run`\n\n* Default: false\n* Type: Boolean\n\nIndicates that you don't want npm to make any changes and that it should\nonly report what it would have done. This can be passed into any of the\ncommands that modify your local installation, eg, `install`, `update`,\n`dedupe`, `uninstall`, as well as `pack` and `publish`.\n\nNote: This is NOT honored by other network related commands, eg `dist-tags`,\n`owner`, etc.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `editor`\n\n* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on\n  Windows, or 'vim' on Unix systems\n* Type: String\n\nThe command to run for `npm edit` and `npm config edit`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `engine-strict`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then npm will stubbornly refuse to install (or even consider\ninstalling) any package that claims to not be compatible with the current\nNode.js version.\n\nThis can be overridden by setting the `--force` flag.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retries`\n\n* Default: 2\n* Type: Number\n\nThe \"retries\" config for the `retry` module to use when fetching packages\nfrom the registry.\n\nnpm will retry idempotent read requests to the registry in the case of\nnetwork failures or 5xx HTTP errors.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-factor`\n\n* Default: 10\n* Type: Number\n\nThe \"factor\" config for the `retry` module to use when fetching packages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-maxtimeout`\n\n* Default: 60000 (1 minute)\n* Type: Number\n\nThe \"maxTimeout\" config for the `retry` module to use when fetching\npackages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-retry-mintimeout`\n\n* Default: 10000 (10 seconds)\n* Type: Number\n\nThe \"minTimeout\" config for the `retry` module to use when fetching\npackages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fetch-timeout`\n\n* Default: 300000 (5 minutes)\n* Type: Number\n\nThe maximum amount of time to wait for HTTP requests to complete.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `force`\n\n* Default: false\n* Type: Boolean\n\nRemoves various protections against unfortunate side effects, common\nmistakes, unnecessary performance degradation, and malicious input.\n\n* Allow clobbering non-npm files in global installs.\n* Allow the `npm version` command to work on an unclean git repository.\n* Allow deleting the cache folder with `npm cache clean`.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of npm.\n* Allow installing packages that have an `engines` declaration requiring a\n  different version of `node`, even if `--engine-strict` is enabled.\n* Allow `npm audit fix` to install modules outside your stated dependency\n  range (including SemVer-major changes).\n* Allow unpublishing all versions of a published package.\n* Allow conflicting peerDependencies to be installed in the root project.\n* Implicitly set `--yes` during `npm init`.\n* Allow clobbering existing values in `npm pkg`\n* Allow unpublishing of entire packages (not just a single version).\n\nIf you don't have a clear idea of what you want to do, it is strongly\nrecommended that you do not use this option!\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `foreground-scripts`\n\n* Default: false\n* Type: Boolean\n\nRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)\nscripts for installed packages in the foreground process, sharing standard\ninput, output, and error with the main npm process.\n\nNote that this will generally make installs run slower, and be much noisier,\nbut can be useful for debugging.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `format-package-lock`\n\n* Default: true\n* Type: Boolean\n\nFormat `package-lock.json` or `npm-shrinkwrap.json` as a human readable\nfile.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `fund`\n\n* Default: true\n* Type: Boolean\n\nWhen \"true\" displays the message at the end of each `npm install`\nacknowledging the number of dependencies looking for funding. See [`npm\nfund`](/cli/v8/commands/npm-fund) for details.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git`\n\n* Default: \"git\"\n* Type: String\n\nThe command to use for git commands. If git is installed on the computer,\nbut is not in the `PATH`, then set this to the full path to the git binary.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `git-tag-version`\n\n* Default: true\n* Type: Boolean\n\nTag the commit when using the `npm version` command. Setting this to false\nresults in no commit being made at all.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global`\n\n* Default: false\n* Type: Boolean\n\nOperates in \"global\" mode, so that packages are installed into the `prefix`\nfolder instead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `global-style`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package into your local `node_modules` folder with\nthe same layout it uses with the global `node_modules` folder. Only your\ndirect dependencies will show in `node_modules` and everything they depend\non will be flattened in their `node_modules` folders. This obviously will\neliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `globalconfig`\n\n* Default: The global --prefix setting plus 'etc/npmrc'. For example,\n  '/usr/local/etc/npmrc'\n* Type: Path\n\nThe config file to read for global config options.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `heading`\n\n* Default: \"npm\"\n* Type: String\n\nThe string that starts all the debugging log output.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `https-proxy`\n\n* Default: null\n* Type: null or URL\n\nA proxy to use for outgoing https requests. If the `HTTPS_PROXY` or\n`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,\nproxy settings will be honored by the underlying `make-fetch-happen`\nlibrary.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `if-present`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm will not exit with an error code when `run-script` is invoked\nfor a script that isn't defined in the `scripts` section of `package.json`.\nThis option can be used when it's desirable to optionally run a script when\nit's present and fail if the script fails. This is useful, for example, when\nrunning scripts that may only apply for some builds in an otherwise generic\nCI setup.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `ignore-scripts`\n\n* Default: false\n* Type: Boolean\n\nIf true, npm does not run scripts specified in package.json files.\n\nNote that commands explicitly intended to run a particular script, such as\n`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`\nwill still run their intended script if `ignore-scripts` is set, but they\nwill *not* run any pre- or post-scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include`\n\n* Default:\n* Type: \"prod\", \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nOption that allows for defining which types of dependencies to install.\n\nThis is the inverse of `--omit=<type>`.\n\nDependency types specified in `--include` will not be omitted, regardless of\nthe order in which omit/include are specified on the command-line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-staged`\n\n* Default: false\n* Type: Boolean\n\nAllow installing \"staged\" published packages, as defined by [npm RFC PR\n#92](https://github.com/npm/rfcs/pull/92).\n\nThis is experimental, and not implemented by the npm public registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `include-workspace-root`\n\n* Default: false\n* Type: Boolean\n\nInclude the workspace root when workspaces are enabled for a command.\n\nWhen false, specifying individual workspaces via the `workspace` config, or\nall workspaces via the `workspaces` flag, will cause npm to operate only on\nthe specified workspaces, and not on the root project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-email`\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's email.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-name`\n\n* Default: \"\"\n* Type: String\n\nThe value `npm init` should use by default for the package author's name.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-author-url`\n\n* Default: \"\"\n* Type: \"\" or URL\n\nThe value `npm init` should use by default for the package author's\nhomepage.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-license`\n\n* Default: \"ISC\"\n* Type: String\n\nThe value `npm init` should use by default for the package license.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-module`\n\n* Default: \"~/.npm-init.js\"\n* Type: Path\n\nA module that will be loaded by the `npm init` command. See the\ndocumentation for the\n[init-package-json](https://github.com/npm/init-package-json) module for\nmore information, or [npm init](/cli/v8/commands/npm-init).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init-version`\n\n* Default: \"1.0.0\"\n* Type: SemVer string\n\nThe value that `npm init` should use by default for the package version\nnumber, if not already set in package.json.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `install-links`\n\n* Default: false\n* Type: Boolean\n\nWhen set file: protocol dependencies that exist outside of the project root\nwill be packed and installed as regular dependencies instead of creating a\nsymlink. This option has no effect on workspaces.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `json`\n\n* Default: false\n* Type: Boolean\n\nWhether or not to output JSON data, rather than the normal output.\n\n* In `npm pkg set` it enables parsing set values with JSON.parse() before\n  saving them to your `package.json`.\n\nNot supported by all npm commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `key`\n\n* Default: null\n* Type: null or String\n\nA client key to pass when accessing the registry. Values should be in PEM\nformat with newlines replaced by the string \"\\n\". For example:\n\n```ini\nkey=\"-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----\"\n```\n\nIt is _not_ the path to a key file, though you can set a registry-scoped\n\"keyfile\" path like \"//other-registry.tld/:keyfile=/path/to/key.pem\".\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-bundling`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to install the package such that versions of npm prior to 1.4,\nsuch as the one included with node 0.8, can install the package. This\neliminates all automatic deduping. If used with `global-style` this option\nwill be preferred.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `legacy-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nCauses npm to completely ignore `peerDependencies` when building a package\ntree, as in npm versions 3 through 6.\n\nIf a package cannot be installed because of overly strict `peerDependencies`\nthat collide, it provides a way to move forward resolving the situation.\n\nThis differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking\n`peerDependencies` on disk, but will still design a tree such that\n`peerDependencies` _could_ be unpacked in a correct place.\n\nUse of `legacy-peer-deps` is not recommended, as it will not enforce the\n`peerDependencies` contract that meta-dependencies may rely on.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `link`\n\n* Default: false\n* Type: Boolean\n\nUsed with `npm ls`, limiting output to only those packages that are linked.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `local-address`\n\n* Default: null\n* Type: IP Address\n\nThe IP address of the local interface to use when making connections to the\nnpm registry. Must be IPv4 in versions of Node prior to 0.12.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `location`\n\n* Default: \"user\" unless `--global` is passed, which will also set this value\n  to \"global\"\n* Type: \"global\", \"user\", or \"project\"\n\nWhen passed to `npm config` this refers to which config file to use.\n\nWhen set to \"global\" mode, packages are installed into the `prefix` folder\ninstead of the current working directory. See\n[folders](/cli/v8/configuring-npm/folders) for more on the differences in behavior.\n\n* packages are installed into the `{prefix}/lib/node_modules` folder, instead\n  of the current working directory.\n* bin files are linked to `{prefix}/bin`\n* man pages are linked to `{prefix}/share/man`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `lockfile-version`\n\n* Default: Version 2 if no lockfile or current lockfile version less than or\n  equal to 2, otherwise maintain current lockfile version\n* Type: null, 1, 2, 3, \"1\", \"2\", or \"3\"\n\nSet the lockfile format version to be used in package-lock.json and\nnpm-shrinkwrap-json files. Possible options are:\n\n1: The lockfile version used by npm versions 5 and 6. Lacks some data that\nis used during the install, resulting in slower and possibly less\ndeterministic installs. Prevents lockfile churn when interoperating with\nolder npm versions.\n\n2: The default lockfile version used by npm version 7. Includes both the\nversion 1 lockfile data and version 3 lockfile data, for maximum determinism\nand interoperability, at the expense of more bytes on disk.\n\n3: Only the new lockfile information introduced in npm version 7. Smaller on\ndisk than lockfile version 2, but not interoperable with older npm versions.\nIdeal if all users are on npm version 7 and higher.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `loglevel`\n\n* Default: \"notice\"\n* Type: \"silent\", \"error\", \"warn\", \"notice\", \"http\", \"timing\", \"info\",\n  \"verbose\", or \"silly\"\n\nWhat level of logs to report. All logs are written to a debug log, with the\npath to that file printed if the execution of a command fails.\n\nAny logs of a higher level than the setting are shown. The default is\n\"notice\".\n\nSee also the `foreground-scripts` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `logs-dir`\n\n* Default: A directory named `_logs` inside the cache\n* Type: null or Path\n\nThe location of npm's log directory. See [`npm logging`](/cli/v8/using-npm/logging)\nfor more information.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `logs-max`\n\n* Default: 10\n* Type: Number\n\nThe maximum number of log files to store.\n\nIf set to 0, no log files will be written for the current run.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `long`\n\n* Default: false\n* Type: Boolean\n\nShow extended information in `ls`, `search`, and `help-search`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `maxsockets`\n\n* Default: 15\n* Type: Number\n\nThe maximum number of connections to use per origin (protocol/host/port\ncombination).\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `message`\n\n* Default: \"%s\"\n* Type: String\n\nCommit message which is used by `npm version` when creating version commit.\n\nAny \"%s\" in the message will be replaced with the version number.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `node-options`\n\n* Default: null\n* Type: null or String\n\nOptions to pass through to Node.js via the `NODE_OPTIONS` environment\nvariable. This does not impact how npm itself is executed but it does impact\nhow lifecycle scripts are called.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `node-version`\n\n* Default: Node.js `process.version` value\n* Type: SemVer string\n\nThe node version to use when checking a package's `engines` setting.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `noproxy`\n\n* Default: The value of the NO_PROXY environment variable\n* Type: String (can be set multiple times)\n\nDomain extensions that should bypass any proxies.\n\nAlso accepts a comma-delimited string.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `npm-version`\n\n* Default: Output of `npm --version`\n* Type: SemVer string\n\nThe npm version to use when checking a package's `engines` setting.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `offline`\n\n* Default: false\n* Type: Boolean\n\nForce offline mode: no network requests will be done during install. To\nallow the CLI to fill in missing cache data, see `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit`\n\n* Default: 'dev' if the `NODE_ENV` environment variable is set to\n  'production', otherwise empty.\n* Type: \"dev\", \"optional\", or \"peer\" (can be set multiple times)\n\nDependency types to omit from the installation tree on disk.\n\nNote that these dependencies _are_ still resolved and added to the\n`package-lock.json` or `npm-shrinkwrap.json` file. They are just not\nphysically installed on disk.\n\nIf a package type appears in both the `--include` and `--omit` lists, then\nit will be included.\n\nIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment\nvariable will be set to `'production'` for all lifecycle scripts.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `omit-lockfile-registry-resolved`\n\n* Default: false\n* Type: Boolean\n\nThis option causes npm to create lock files without a `resolved` key for\nregistry dependencies. Subsequent installs will need to resolve tarball\nendpoints with the configured registry, likely resulting in a longer install\ntime.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `otp`\n\n* Default: null\n* Type: null or String\n\nThis is a one-time password from a two-factor authenticator. It's needed\nwhen publishing or changing package permissions with `npm access`.\n\nIf not set, and a registry response fails with a challenge for a one-time\npassword, npm will prompt on the command line for one.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `pack-destination`\n\n* Default: \".\"\n* Type: String\n\nDirectory in which `npm pack` will save tarballs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package`\n\n* Default:\n* Type: String (can be set multiple times)\n\nThe package or packages to install for [`npm exec`](/cli/v8/commands/npm-exec)\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock`\n\n* Default: true\n* Type: Boolean\n\nIf set to false, then ignore `package-lock.json` files when installing. This\nwill also prevent _writing_ `package-lock.json` if `save` is true.\n\nThis configuration does not affect `npm ci`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `package-lock-only`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, the current operation will only use the `package-lock.json`,\nignoring `node_modules`.\n\nFor `update` this means only the `package-lock.json` will be updated,\ninstead of checking `node_modules` and downloading dependencies.\n\nFor `list` this means the output will be based on the tree described by the\n`package-lock.json`, rather than the contents of `node_modules`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `parseable`\n\n* Default: false\n* Type: Boolean\n\nOutput parseable results from commands that write to standard output. For\n`npm search`, this will be tab-separated table format.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-offline`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be bypassed, but missing data\nwill be requested from the server. To force full offline mode, use\n`--offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefer-online`\n\n* Default: false\n* Type: Boolean\n\nIf true, staleness checks for cached data will be forced, making the CLI\nlook for updates immediately even for fresh package data.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `prefix`\n\n* Default: In global mode, the folder where the node executable is installed.\n  In local mode, the nearest parent folder containing either a package.json\n  file or a node_modules folder.\n* Type: Path\n\nThe location to install global items. If set on the command line, then it\nforces non-global commands to run in the specified folder.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `preid`\n\n* Default: \"\"\n* Type: String\n\nThe \"prerelease identifier\" to use as a prefix for the \"prerelease\" part of\na semver. Like the `rc` in `1.2.0-rc.8`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `progress`\n\n* Default: `true` unless running in a known CI system\n* Type: Boolean\n\nWhen set to `true`, npm will display a progress bar during time intensive\noperations, if `process.stderr` is a TTY.\n\nSet to `false` to suppress the progress bar.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `proxy`\n\n* Default: null\n* Type: null, false, or URL\n\nA proxy to use for outgoing http requests. If the `HTTP_PROXY` or\n`http_proxy` environment variables are set, proxy settings will be honored\nby the underlying `request` library.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `read-only`\n\n* Default: false\n* Type: Boolean\n\nThis is used to mark a token as unable to publish when configuring limited\naccess tokens with the `npm token create` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `rebuild-bundle`\n\n* Default: true\n* Type: Boolean\n\nRebuild bundled dependencies after installation.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `registry`\n\n* Default: \"https://registry.npmjs.org/\"\n* Type: URL\n\nThe base URL of the npm registry.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `replace-registry-host`\n\n* Default: \"npmjs\"\n* Type: \"npmjs\", \"never\", \"always\", or String\n\nDefines behavior for replacing the registry host in a lockfile with the\nconfigured registry.\n\nThe default behavior is to replace package dist URLs from the default\nregistry (https://registry.npmjs.org) to the configured registry. If set to\n\"never\", then use the registry value. If set to \"always\", then replace the\nregistry host with the configured host every time.\n\nYou may also specify a bare hostname (e.g., \"registry.npmjs.org\").\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save`\n\n* Default: `true` unless when using `npm update` where it defaults to `false`\n* Type: Boolean\n\nSave installed packages to a `package.json` file as dependencies.\n\nWhen used with the `npm rm` command, removes the dependency from\n`package.json`.\n\nWill also prevent writing to `package-lock.json` if set to `false`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-bundle`\n\n* Default: false\n* Type: Boolean\n\nIf a package would be saved at install time by the use of `--save`,\n`--save-dev`, or `--save-optional`, then also put it in the\n`bundleDependencies` list.\n\nIgnored if `--save-peer` is set, since peerDependencies cannot be bundled.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-dev`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `devDependencies`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-exact`\n\n* Default: false\n* Type: Boolean\n\nDependencies saved to package.json will be configured with an exact version\nrather than using npm's default semver range operator.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-optional`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `optionalDependencies`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-peer`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages to a package.json file as `peerDependencies`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-prefix`\n\n* Default: \"^\"\n* Type: String\n\nConfigure how versions of packages installed to a package.json file via\n`--save` or `--save-dev` get prefixed.\n\nFor example if a package has version `1.2.3`, by default its version is set\nto `^1.2.3` which allows minor upgrades for that package, but after `npm\nconfig set save-prefix='~'` it would be set to `~1.2.3` which only allows\npatch upgrades.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `save-prod`\n\n* Default: false\n* Type: Boolean\n\nSave installed packages into `dependencies` specifically. This is useful if\na package already exists in `devDependencies` or `optionalDependencies`, but\nyou want to move it to be a non-optional production dependency.\n\nThis is the default behavior if `--save` is true, and neither `--save-dev`\nor `--save-optional` are true.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `scope`\n\n* Default: the scope of the current project, if any, or \"\"\n* Type: String\n\nAssociate an operation with a scope for a scoped registry.\n\nUseful when logging in to or out of a private registry:\n\n```\n# log in, linking the scope to the custom registry\nnpm login --scope=@mycorp --registry=https://registry.mycorp.com\n\n# log out, removing the link and the auth token\nnpm logout --scope=@mycorp\n```\n\nThis will cause `@mycorp` to be mapped to the registry for future\ninstallation of packages specified according to the pattern\n`@mycorp/package`.\n\nThis will also cause `npm init` to create a scoped package.\n\n```\n# accept all defaults, and create a package named \"@foo/whatever\",\n# instead of just named \"whatever\"\nnpm init --scope=@foo --yes\n```\n\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `script-shell`\n\n* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows\n* Type: null or String\n\nThe shell to use for scripts run with the `npm exec`, `npm run` and `npm\ninit <package-spec>` commands.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchexclude`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that limit the results from search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchlimit`\n\n* Default: 20\n* Type: Number\n\nNumber of items to limit search results to. Will not apply at all to legacy\nsearches.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchopts`\n\n* Default: \"\"\n* Type: String\n\nSpace-separated options that are always passed to search.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `searchstaleness`\n\n* Default: 900\n* Type: Number\n\nThe age of the cache, in seconds, before another registry request is made if\nusing legacy search endpoint.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `shell`\n\n* Default: SHELL environment variable, or \"bash\" on Posix, or \"cmd.exe\" on\n  Windows\n* Type: String\n\nThe shell to run for the `npm explore` command.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-commit`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will commit the new package\nversion using `-S` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sign-git-tag`\n\n* Default: false\n* Type: Boolean\n\nIf set to true, then the `npm version` command will tag the version using\n`-s` to add a signature.\n\nNote that git requires you to have set up GPG keys in your git configs for\nthis to work properly.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-peer-deps`\n\n* Default: false\n* Type: Boolean\n\nIf set to `true`, and `--legacy-peer-deps` is not set, then _any_\nconflicting `peerDependencies` will be treated as an install failure, even\nif npm could reasonably guess the appropriate resolution based on non-peer\ndependency relationships.\n\nBy default, conflicting `peerDependencies` deep in the dependency graph will\nbe resolved using the nearest non-peer dependency specification, even if\ndoing so will result in some packages receiving a peer dependency outside\nthe range set in their package's `peerDependencies` object.\n\nWhen such and override is performed, a warning is printed, explaining the\nconflict and the packages involved. If `--strict-peer-deps` is set, then\nthis warning is treated as a failure.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `strict-ssl`\n\n* Default: true\n* Type: Boolean\n\nWhether or not to do SSL key validation when making requests to the registry\nvia https.\n\nSee also the `ca` config.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag`\n\n* Default: \"latest\"\n* Type: String\n\nIf you ask npm to install a package and don't tell it a specific version,\nthen it will install the specified tag.\n\nAlso the tag that is added to the package@version specified by the `npm tag`\ncommand, if no explicit tag is given.\n\nWhen used by the `npm diff` command, this is the tag used to fetch the\ntarball that will be compared with the local files by default.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tag-version-prefix`\n\n* Default: \"v\"\n* Type: String\n\nIf set, alters the prefix used when tagging a new version when performing a\nversion increment using `npm-version`. To remove the prefix altogether, set\nit to the empty string: `\"\"`.\n\nBecause other tools may rely on the convention that npm version tags look\nlike `v1.0.0`, _only use this property if it is absolutely necessary_. In\nparticular, use care when overriding this setting for public packages.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `timing`\n\n* Default: false\n* Type: Boolean\n\nIf true, writes a debug log to `logs-dir` and timing information to\n`_timing.json` in the cache, even if the command completes successfully.\n`_timing.json` is a newline delimited list of JSON objects.\n\nYou can quickly view it with this [json](https://npm.im/json) command line:\n`npm exec -- json -g < ~/.npm/_timing.json`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `umask`\n\n* Default: 0\n* Type: Octal numeric string in range 0000..0777 (0..511)\n\nThe \"umask\" value to use when setting the file creation mode on files and\nfolders.\n\nFolders and executables are given a mode which is `0o777` masked against\nthis value. Other files are given a mode which is `0o666` masked against\nthis value.\n\nNote that the underlying system will _also_ apply its own umask value to\nfiles and folders that are created, and npm does not circumvent this, but\nrather adds the `--umask` config to it.\n\nThus, the effective default umask value on most POSIX systems is 0o22,\nmeaning that folders and executables are created with a mode of 0o755 and\nother files are created with a mode of 0o644.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `unicode`\n\n* Default: false on windows, true on mac/unix systems with a unicode locale,\n  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.\n* Type: Boolean\n\nWhen set to true, npm uses unicode characters in the tree output. When\nfalse, it uses ascii characters instead of unicode glyphs.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `update-notifier`\n\n* Default: true\n* Type: Boolean\n\nSet to false to suppress the update notification when using an older version\nof npm than the latest.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `usage`\n\n* Default: false\n* Type: Boolean\n\nShow short usage output about the command specified.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `user-agent`\n\n* Default: \"npm/{npm-version} node/{node-version} {platform} {arch}\n  workspaces/{workspaces} {ci}\"\n* Type: String\n\nSets the User-Agent request header. The following fields are replaced with\ntheir actual counterparts:\n\n* `{npm-version}` - The npm version in use\n* `{node-version}` - The Node.js version in use\n* `{platform}` - The value of `process.platform`\n* `{arch}` - The value of `process.arch`\n* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options\n  are set.\n* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or\n  an empty string if `ci-name` is empty.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `userconfig`\n\n* Default: \"~/.npmrc\"\n* Type: Path\n\nThe location of user-level configuration settings.\n\nThis may be overridden by the `npm_config_userconfig` environment variable\nor the `--userconfig` command line option, but may _not_ be overridden by\nsettings in the `globalconfig` file.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `version`\n\n* Default: false\n* Type: Boolean\n\nIf true, output the npm version and exit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `versions`\n\n* Default: false\n* Type: Boolean\n\nIf true, output the npm version as well as node's `process.versions` map and\nthe version in the current working directory's `package.json` file if one\nexists, and exit successfully.\n\nOnly relevant when specified explicitly on the command line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `viewer`\n\n* Default: \"man\" on Posix, \"browser\" on Windows\n* Type: String\n\nThe program to use to view help content.\n\nSet to `\"browser\"` to view html help content in the default web browser.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `which`\n\n* Default: null\n* Type: null or Number\n\nIf there are multiple funding sources, which 1-indexed source URL to open.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspace`\n\n* Default:\n* Type: String (can be set multiple times)\n\nEnable running a command in the context of the configured workspaces of the\ncurrent project while filtering by running only the workspaces defined by\nthis configuration option.\n\nValid values for the `workspace` config are either:\n\n* Workspace names\n* Path to a workspace directory\n* Path to a parent workspace directory (will result in selecting all\n  workspaces within that folder)\n\nWhen set for the `npm init` command, this may be set to the folder of a\nworkspace which does not yet exist, to create the folder and set it up as a\nbrand new workspace within the project.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces`\n\n* Default: null\n* Type: null or Boolean\n\nSet to true to run the command in the context of **all** configured\nworkspaces.\n\nExplicitly setting this to false will cause commands like `install` to\nignore workspaces altogether. When not set explicitly:\n\n- Commands that operate on the `node_modules` tree (install, update, etc.)\nwill link workspaces into the `node_modules` folder. - Commands that do\nother things (test, exec, publish, etc.) will operate on the root project,\n_unless_ one or more workspaces are specified in the `workspace` config.\n\nThis value is not exported to the environment for child processes.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `workspaces-update`\n\n* Default: true\n* Type: Boolean\n\nIf set to true, the npm cli will run an update after operations that may\npossibly change the workspaces installed to the `node_modules` folder.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `yes`\n\n* Default: null\n* Type: null or Boolean\n\nAutomatically answer \"yes\" to any prompts that npm might print on the\ncommand line.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `also`\n\n* Default: null\n* Type: null, \"dev\", or \"development\"\n* DEPRECATED: Please use --include=dev instead.\n\nWhen set to `dev` or `development`, this is an alias for `--include=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache-max`\n\n* Default: Infinity\n* Type: Number\n* DEPRECATED: This option has been deprecated in favor of `--prefer-online`\n\n`--cache-max=0` is an alias for `--prefer-online`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `cache-min`\n\n* Default: 0\n* Type: Number\n* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`.\n\n`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `dev`\n\n* Default: false\n* Type: Boolean\n* DEPRECATED: Please use --include=dev instead.\n\nAlias for `--include=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.email`\n\n* Default: \"\"\n* Type: String\n* DEPRECATED: Use `--init-author-email` instead.\n\nAlias for `--init-author-email`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.name`\n\n* Default: \"\"\n* Type: String\n* DEPRECATED: Use `--init-author-name` instead.\n\nAlias for `--init-author-name`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.author.url`\n\n* Default: \"\"\n* Type: \"\" or URL\n* DEPRECATED: Use `--init-author-url` instead.\n\nAlias for `--init-author-url`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.license`\n\n* Default: \"ISC\"\n* Type: String\n* DEPRECATED: Use `--init-license` instead.\n\nAlias for `--init-license`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.module`\n\n* Default: \"~/.npm-init.js\"\n* Type: Path\n* DEPRECATED: Use `--init-module` instead.\n\nAlias for `--init-module`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `init.version`\n\n* Default: \"1.0.0\"\n* Type: SemVer string\n* DEPRECATED: Use `--init-version` instead.\n\nAlias for `--init-version`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `only`\n\n* Default: null\n* Type: null, \"prod\", or \"production\"\n* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install.\n\nWhen set to `prod` or `production`, this is an alias for `--omit=dev`.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `optional`\n\n* Default: null\n* Type: null or Boolean\n* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or\n  `--include=optional` to include them.\n\nDefault value does install optional deps unless otherwise omitted.\n\nAlias for --include=optional or --omit=optional\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `production`\n\n* Default: null\n* Type: null or Boolean\n* DEPRECATED: Use `--omit=dev` instead.\n\nAlias for `--omit=dev`\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `shrinkwrap`\n\n* Default: true\n* Type: Boolean\n* DEPRECATED: Use the --package-lock setting instead.\n\nAlias for --package-lock\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sso-poll-frequency`\n\n* Default: 500\n* Type: Number\n* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a\n  future version of npm in favor of web-based login.\n\nWhen used with SSO-enabled `auth-type`s, configures how regularly the\nregistry should be polled while the user is completing authentication.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `sso-type`\n\n* Default: \"oauth\"\n* Type: null, \"oauth\", or \"saml\"\n* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a\n  future version of npm in favor of web-based login.\n\nIf `--auth-type=sso`, the type of SSO type to use.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n\n#### `tmp`\n\n* Default: The value returned by the Node.js `os.tmpdir()` method\n  <https://nodejs.org/api/os.html#os_os_tmpdir>\n* Type: Path\n* DEPRECATED: This setting is no longer used. npm stores temporary files in a\n  special location in the cache, and they are managed by\n  [`cacache`](http://npm.im/cacache).\n\nHistorically, the location where temporary files were stored. No longer\nrelevant.\n\n<!-- automatically generated, do not edit manually -->\n<!-- see lib/utils/config/definitions.js -->\n<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->\n\n### See also\n\n* [npm config](/cli/v8/commands/npm-config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm folders](/cli/v8/configuring-npm/folders)\n* [npm](/cli/v8/commands/npm)\n"},{"id":"088968c3-b245-5617-904d-444fcb15ee19","frontmatter":{"title":"Dependency Selector Syntax & Querying"},"rawBody":"---\ntitle: Dependency Selector Syntax & Querying\nsection: 7\ndescription: Dependency Selector Syntax & Querying\nredirect_from:\n  - /using-npm/dependency-selectors\n  - /using-npm/dependency-selectors.html\n  - /misc/dependency-selectors\n  - /misc/dependency-selectors.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/dependency-selectors.md\n---\n\n### Description\n\nThe [`npm query`](/cli/v8/commands/npm-query) commmand exposes a new dependency selector syntax (informed by & respecting many aspects of the [CSS Selectors 4 Spec](https://dev.w3.org/csswg/selectors4/#relational)) which:\n\n- Standardizes the shape of, & querying of, dependency graphs with a robust object model, metadata & selector syntax\n- Leverages existing, known language syntax & operators from CSS to make disparate package information broadly accessible\n- Unlocks the ability to answer complex, multi-faceted questions about dependencies, their relationships & associative metadata\n- Consolidates redundant logic of similar query commands in `npm` (ex. `npm fund`, `npm ls`, `npm outdated`, `npm audit` ...)\n\n### Dependency Selector Syntax `v1.0.0`\n\n#### Overview:\n\n- there is no \"type\" or \"tag\" selectors (ex. `div, h1, a`) as a dependency/target is the only type of `Node` that can be queried\n- the term \"dependencies\" is in reference to any `Node` found in a `tree` returned by `Arborist`\n\n#### Combinators\n\n- `>` direct descendant/child\n- ` ` any descendant/child\n- `~` sibling\n\n#### Selectors\n\n- `*` universal selector\n- `#<name>` dependency selector (equivalent to `[name=\"...\"]`)\n- `#<name>@<version>` (equivalent to `[name=<name>]:semver(<version>)`)\n- `,` selector list delimiter\n- `.` dependency type selector\n- `:` pseudo selector\n\n#### Dependency Type Selectors\n\n- `.prod` dependency found in the `dependencies` section of `package.json`, or is a child of said dependency\n- `.dev` dependency found in the `devDependencies` section of `package.json`, or is a child of said dependency\n- `.optional` dependency found in the `optionalDependencies` section of `package.json`, or has `\"optional\": true` set in its entry in the `peerDependenciesMeta` section of `package.json`, or a child of said dependency\n- `.peer` dependency found in the `peerDependencies` section of `package.json`\n- `.workspace` dependency found in the [`workspaces`](https://docs.npmjs.com/cli/v8/using-npm/workspaces) section of `package.json`\n- `.bundled` dependency found in the `bundleDependencies` section of `package.json`, or is a child of said dependency\n\n#### Pseudo Selectors\n- [`:not(<selector>)`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not)\n- [`:has(<selector>)`](https://developer.mozilla.org/en-US/docs/Web/CSS/:has)\n- [`:is(<selector list>)`](https://developer.mozilla.org/en-US/docs/Web/CSS/:is)\n- [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) matches the root node/dependency\n- [`:scope`](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) matches node/dependency it was queried against\n- [`:empty`](https://developer.mozilla.org/en-US/docs/Web/CSS/:empty) when a dependency has no dependencies\n- [`:private`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#private) when a dependency is private\n- `:link` when a dependency is linked (for instance, workspaces or packages manually [`linked`](https://docs.npmjs.com/cli/v8/commands/npm-link)\n- `:deduped` when a dependency has been deduped (note that this does *not* always mean the dependency has been hoisted to the root of node_modules)\n- `:overridden` when a dependency has been overridden\n- `:extraneous` when a dependency exists but is not defined as a dependency of any node\n- `:invalid` when a dependency version is out of its ancestors specified range\n- `:missing` when a dependency is not found on disk\n- `:semver(<spec>)` matching a valid [`node-semver`](https://github.com/npm/node-semver) spec\n- `:path(<path>)` [glob](https://www.npmjs.com/package/glob) matching based on dependencies path relative to the project\n- `:type(<type>)` [based on currently recognized types](https://github.com/npm/npm-package-arg#result-object)\n\n#### [Attribute Selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors)\n\nThe attribute selector evaluates the key/value pairs in `package.json` if they are `String`s.\n\n- `[]` attribute selector (ie. existence of attribute)\n- `[attribute=value]` attribute value is equivalant...\n- `[attribute~=value]` attribute value contains word...\n- `[attribute*=value]` attribute value contains string...\n- `[attribute|=value]` attribute value is equal to or starts with...\n- `[attribute^=value]` attribute value starts with...\n- `[attribute$=value]` attribute value ends with...\n\n#### `Array` & `Object` Attribute Selectors\n\nThe generic `:attr()` pseudo selector standardizes a pattern which can be used for attribute selection of `Object`s, `Array`s or `Arrays` of `Object`s accessible via `Arborist`'s `Node.package` metadata. This allows for iterative attribute selection beyond top-level `String` evaluation. The last argument passed to `:attr()` must be an `attribute` selector or a nested `:attr()`. See examples below:\n\n#### `Objects`\n\n```css\n/* return dependencies that have a `scripts.test` containing `\"tap\"` */\n*:attr(scripts, [test~=tap])\n```\n\n#### Nested `Objects`\n\nNested objects are expressed as sequential arguments to `:attr()`.\n\n```css\n/* return dependencies that have a testling config for opera browsers */\n*:attr(testling, browsers, [~=opera])\n```\n\n#### `Arrays`\n\n`Array`s specifically uses a special/reserved `.` character in place of a typical attribute name. `Arrays` also support exact `value` matching when a `String` is passed to the selector.\n\n##### Example of an `Array` Attribute Selection:\n```css\n/* removes the distinction between properties & arrays */\n/* ie. we'd have to check the property & iterate to match selection */\n*:attr([keywords^=react])\n*:attr(contributors, :attr([name~=Jordan]))\n```\n\n##### Example of an `Array` matching directly to a value:\n```css\n/* return dependencies that have the exact keyword \"react\" */\n/* this is equivalent to `*:keywords([value=\"react\"])` */\n*:attr([keywords=react])\n```\n\n##### Example of an `Array` of `Object`s:\n```css\n/* returns */\n*:attr(contributors, [email=ruyadorno@github.com])\n```\n\n### Groups\n\nDependency groups are defined by the package relationships to their ancestors (ie. the dependency types that are defined in `package.json`). This approach is user-centric as the ecosystem has been taught to think about dependencies in these groups first-and-foremost. Dependencies are allowed to be included in multiple groups (ex. a `prod` dependency may also be a `dev` dependency (in that it's also required by another `dev` dependency) & may also be `bundled` - a selector for that type of dependency would look like: `*.prod.dev.bundled`).\n\n- `.prod`\n- `.dev`\n- `.optional`\n- `.peer`\n- `.bundled`\n- `.workspace`\n\nPlease note that currently `workspace` deps are always `prod` dependencies.  Additionally the `.root` dependency is also considered a `prod` dependency.\n\n### Programmatic Usage\n\n- `Arborist`'s `Node` Class has a `.querySelectorAll()` method\n  - this method will return a filtered, flattened dependency Arborist `Node` list based on a valid query selector\n\n```js\nconst Arborist = require('@npmcli/arborist')\nconst arb = new Arborist({})\n```\n\n```js\n// root-level\narb.loadActual().then(async (tree) => {\n  // query all production dependencies\n  const results = await tree.querySelectorAll('.prod')\n  console.log(results)\n})\n```\n\n```js\n// iterative\narb.loadActual().then(async (tree) => {\n  // query for the deduped version of react\n  const results = await tree.querySelectorAll('#react:not(:deduped)')\n  // query the deduped react for git deps\n  const deps = await results[0].querySelectorAll(':type(git)')\n  console.log(deps)\n})\n```\n\n## See Also\n\n* [npm query](/cli/v8/commands/npm-query)\n* [@npmcli/arborist](https://npm.im/@npmcli/arborist)\n"},{"id":"e70187e3-9daf-5c36-807c-3d592314f427","frontmatter":{"title":"developers"},"rawBody":"---\ntitle: developers\nsection: 7\ndescription: Developer Guide\nredirect_from:\n  - /using-npm/developers\n  - /using-npm/developers.html\n  - /misc/developers\n  - /misc/developers.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/developers.md\n---\n\n### Description\n\nSo, you've decided to use npm to develop (and maybe publish/deploy)\nyour project.\n\nFantastic!\n\nThere are a few things that you need to do above the simple steps\nthat your users will do to install your program.\n\n### About These Documents\n\nThese are man pages.  If you install npm, you should be able to\nthen do `man npm-thing` to get the documentation on a particular\ntopic, or `npm help thing` to see the same information.\n\n### What is a Package\n\nA package is:\n\n* a) a folder containing a program described by a package.json file\n* b) a gzipped tarball containing (a)\n* c) a url that resolves to (b)\n* d) a `<name>@<version>` that is published on the registry with (c)\n* e) a `<name>@<tag>` that points to (d)\n* f) a `<name>` that has a \"latest\" tag satisfying (e)\n* g) a `git` url that, when cloned, results in (a).\n\nEven if you never publish your package, you can still get a lot of\nbenefits of using npm if you just want to write a node program (a), and\nperhaps if you also want to be able to easily install it elsewhere\nafter packing it up into a tarball (b).\n\nGit urls can be of the form:\n\n```bash\ngit://github.com/user/project.git#commit-ish\ngit+ssh://user@hostname:project.git#commit-ish\ngit+http://user@hostname/project/blah.git#commit-ish\ngit+https://user@hostname/project/blah.git#commit-ish\n```\n\nThe `commit-ish` can be any tag, sha, or branch which can be supplied as\nan argument to `git checkout`.  The default is whatever the repository uses\nas its default branch.\n\n### The package.json File\n\nYou need to have a `package.json` file in the root of your project to do\nmuch of anything with npm.  That is basically the whole interface.\n\nSee [`package.json`](/cli/v8/configuring-npm/package-json) for details about what\ngoes in that file.  At the very least, you need:\n\n* name: This should be a string that identifies your project.  Please do\n  not use the name to specify that it runs on node, or is in JavaScript.\n  You can use the \"engines\" field to explicitly state the versions of node\n  (or whatever else) that your program requires, and it's pretty well\n  assumed that it's JavaScript.\n\n  It does not necessarily need to match your github repository name.\n\n  So, `node-foo` and `bar-js` are bad names.  `foo` or `bar` are better.\n\n* version: A semver-compatible version.\n\n* engines: Specify the versions of node (or whatever else) that your\n  program runs on.  The node API changes a lot, and there may be bugs or\n  new functionality that you depend on.  Be explicit.\n\n* author: Take some credit.\n\n* scripts: If you have a special compilation or installation script, then\n  you should put it in the `scripts` object.  You should definitely have at\n  least a basic smoke-test command as the \"scripts.test\" field.  See\n  [scripts](/cli/v8/using-npm/scripts).\n\n* main: If you have a single module that serves as the entry point to your\n  program (like what the \"foo\" package gives you at require(\"foo\")), then\n  you need to specify that in the \"main\" field.\n\n* directories: This is an object mapping names to folders.  The best ones\n  to include are \"lib\" and \"doc\", but if you use \"man\" to specify a folder\n  full of man pages, they'll get installed just like these ones.\n\nYou can use `npm init` in the root of your package in order to get you\nstarted with a pretty basic package.json file.  See [`npm\ninit`](/cli/v8/commands/npm-init) for more info.\n\n### Keeping files *out* of your Package\n\nUse a `.npmignore` file to keep stuff out of your package.  If there's no\n`.npmignore` file, but there *is* a `.gitignore` file, then npm will ignore\nthe stuff matched by the `.gitignore` file.  If you *want* to include\nsomething that is excluded by your `.gitignore` file, you can create an\nempty `.npmignore` file to override it. Like `git`, `npm` looks for\n`.npmignore` and `.gitignore` files in all subdirectories of your package,\nnot only the root directory.\n\n`.npmignore` files follow the [same pattern\nrules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)\nas `.gitignore` files:\n\n* Blank lines or lines starting with `#` are ignored.\n* Standard glob patterns work.\n* You can end patterns with a forward slash `/` to specify a directory.\n* You can negate a pattern by starting it with an exclamation point `!`.\n\nBy default, the following paths and files are ignored, so there's no\nneed to add them to `.npmignore` explicitly:\n\n* `.*.swp`\n* `._*`\n* `.DS_Store`\n* `.git`\n* `.gitignore`\n* `.hg`\n* `.npmignore`\n* `.npmrc`\n* `.lock-wscript`\n* `.svn`\n* `.wafpickle-*`\n* `config.gypi`\n* `CVS`\n* `npm-debug.log`\n\nAdditionally, everything in `node_modules` is ignored, except for\nbundled dependencies. npm automatically handles this for you, so don't\nbother adding `node_modules` to `.npmignore`.\n\nThe following paths and files are never ignored, so adding them to\n`.npmignore` is pointless:\n\n* `package.json`\n* `README` (and its variants)\n* `CHANGELOG` (and its variants)\n* `LICENSE` / `LICENCE`\n\nIf, given the structure of your project, you find `.npmignore` to be a\nmaintenance headache, you might instead try populating the `files`\nproperty of `package.json`, which is an array of file or directory names\nthat should be included in your package. Sometimes manually picking\nwhich items to allow is easier to manage than building a block list.\n\n#### Testing whether your `.npmignore` or `files` config works\n\nIf you want to double check that your package will include only the files\nyou intend it to when published, you can run the `npm pack` command locally\nwhich will generate a tarball in the working directory, the same way it\ndoes for publishing.\n\n### Link Packages\n\n`npm link` is designed to install a development package and see the\nchanges in real time without having to keep re-installing it.  (You do\nneed to either re-link or `npm rebuild -g` to update compiled packages,\nof course.)\n\nMore info at [`npm link`](/cli/v8/commands/npm-link).\n\n### Before Publishing: Make Sure Your Package Installs and Works\n\n**This is important.**\n\nIf you can not install it locally, you'll have\nproblems trying to publish it.  Or, worse yet, you'll be able to\npublish it, but you'll be publishing a broken or pointless package.\nSo don't do that.\n\nIn the root of your package, do this:\n\n```bash\nnpm install . -g\n```\n\nThat'll show you that it's working.  If you'd rather just create a symlink\npackage that points to your working directory, then do this:\n\n```bash\nnpm link\n```\n\nUse `npm ls -g` to see if it's there.\n\nTo test a local install, go into some other folder, and then do:\n\n```bash\ncd ../some-other-folder\nnpm install ../my-package\n```\n\nto install it locally into the node_modules folder in that other place.\n\nThen go into the node-repl, and try using require(\"my-thing\") to\nbring in your module's main module.\n\n### Create a User Account\n\nCreate a user with the adduser command.  It works like this:\n\n```bash\nnpm adduser\n```\n\nand then follow the prompts.\n\nThis is documented better in [npm adduser](/cli/v8/commands/npm-adduser).\n\n### Publish your Package\n\nThis part's easy.  In the root of your folder, do this:\n\n```bash\nnpm publish\n```\n\nYou can give publish a url to a tarball, or a filename of a tarball,\nor a path to a folder.\n\nNote that pretty much **everything in that folder will be exposed**\nby default.  So, if you have secret stuff in there, use a\n`.npmignore` file to list out the globs to ignore, or publish\nfrom a fresh checkout.\n\n### Brag about it\n\nSend emails, write blogs, blab in IRC.\n\nTell the world how easy it is to install your program!\n\n### See also\n\n* [npm](/cli/v8/commands/npm)\n* [npm init](/cli/v8/commands/npm-init)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm scripts](/cli/v8/using-npm/scripts)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm adduser](/cli/v8/commands/npm-adduser)\n* [npm registry](/cli/v8/using-npm/registry)\n"},{"id":"ddfb8523-0b66-5825-9426-9df1ac3cae04","frontmatter":{"title":"Using npm"},"rawBody":"---\nredirect_from:\n  - using-npm\n  - /cli/using-npm\n  - /cli-documentation/misc\n  - /cli-documentation/using-npm\n  - /misc/index.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/nav.yml\ntitle: Using npm\n---\n\n<Index depth=\"1\" />\n"},{"id":"c7e445fd-e34c-52d7-8bd0-9b88f376852a","frontmatter":{"title":"Logging"},"rawBody":"---\ntitle: Logging\nsection: 7\ndescription: Why, What & How We Log\nredirect_from:\n  - /using-npm/logging\n  - /using-npm/logging.html\n  - /misc/logging\n  - /misc/logging.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/logging.md\n---\n\n### Description\n\nThe `npm` CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments.\n\n### Setting Log File Location\n\nAll logs are written to a debug log, with the path to that file printed if the execution of a command fails.\n\nThe default location of the logs directory is a directory named `_logs` inside the npm cache. This can be changed\nwith the `logs-dir` config option.\n\nLog files will be removed from the `logs-dir` when the number of log files exceeds `logs-max`, with the oldest logs being deleted first.\n\nTo turn off logs completely set `--logs-max=0`.\n\n### Setting Log Levels\n\n#### `loglevel`\n\n`loglevel` is a global argument/config that can be set to determine the type of information to be displayed.\n\nThe default value of `loglevel` is `\"notice\"` but there are several levels/types of logs available, including:\n\n- `\"silent\"`\n- `\"error\"`\n- `\"warn\"`\n- `\"notice\"`\n- `\"http\"`\n- `\"timing\"`\n- `\"info\"`\n- `\"verbose\"`\n- `\"silly\"`\n\nAll logs pertaining to a level proceeding the current setting will be shown.\n\n##### Aliases\n\nThe log levels listed above have various corresponding aliases, including:\n\n- `-d`: `--loglevel info`\n- `--dd`: `--loglevel verbose`\n- `--verbose`: `--loglevel verbose`\n- `--ddd`: `--loglevel silly`\n- `-q`: `--loglevel warn`\n- `--quiet`: `--loglevel warn`\n- `-s`: `--loglevel silent`\n- `--silent`: `--loglevel silent`\n\n#### `foreground-scripts`\n\nThe `npm` CLI began hiding the output of lifecycle scripts for `npm install` as of `v7`. Notably, this means you will not see logs/output from packages that may be using \"install scripts\" to display information back to you or from your own project's scripts defined in `package.json`. If you'd like to change this behavior & log this output you can set `foreground-scripts` to `true`.\n\n### Timing Information\n\nThe `--timing` config can be set which does two things:\n\n1. Always shows the full path to the debug log regardless of command exit status\n1. Write timing information to a timing file in the cache or `logs-dir`\n\nThis file is a newline delimited list of JSON  objects that can be inspected to see timing data for each task in a `npm` CLI run.\n\n### Registry Response Headers\n\n#### `npm-notice`\n\nThe `npm` CLI reads from & logs any `npm-notice` headers that are returned from the configured registry. This mechanism can be used by third-party registries to provide useful information when network-dependent requests occur.\n\nThis header is not cached, and will not be logged if the request is served from the cache.\n\n### Logs and Sensitive Information\n\nThe `npm` CLI makes a best effort to redact the following from terminal output and log files:\n\n- Passwords inside basic auth URLs\n- npm tokens\n\nHowever, this behavior should not be relied on to keep all possible sensitive information redacted. If you are concerned about secrets in your log file or terminal output, you can use `--loglevel=silent` and `--logs-max=0` to ensure no logs are written to your terminal or filesystem.\n\n### See also\n\n* [config](/cli/v8/using-npm/config)\n"},{"id":"ec078305-4a20-5ecc-a386-adf491a9e5b8","frontmatter":{"title":"orgs"},"rawBody":"---\ntitle: orgs\nsection: 7\ndescription: Working with Teams & Orgs\nredirect_from:\n  - /using-npm/orgs\n  - /using-npm/orgs.html\n  - /misc/orgs\n  - /misc/orgs.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/orgs.md\n---\n\n### Description\n\nThere are three levels of org users:\n\n1. Super admin, controls billing & adding people to the org.\n2. Team admin, manages team membership & package access.\n3. Developer, works on packages they are given access to.  \n\nThe super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to.\n\nThe team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.\n\nThe developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.\n\nThere are two main commands:\n\n1. `npm team` see [npm team](/cli/v8/commands/npm-team) for more details\n2. `npm access` see [npm access](/cli/v8/commands/npm-access) for more details\n\n### Team Admins create teams\n\n* Check who you’ve added to your org:\n\n```bash\nnpm team ls <org>:developers\n```\n\n* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command.\n\n* Create a new team:\n\n```bash\nnpm team create <org:team>\n```\n\n* Add members to that team:\n\n```bash\nnpm team add <org:team> <user>\n```\n\n### Publish a package and adjust package access\n\n* In package directory, run\n\n```bash\nnpm init --scope=<org>\n```\nto scope it for your org & publish as usual\n\n* Grant access:  \n\n```bash\nnpm access grant <read-only|read-write> <org:team> [<package>]\n```\n\n* Revoke access:\n\n```bash\nnpm access revoke <org:team> [<package>]\n```\n\n### Monitor your package access\n\n* See what org packages a team member can access:\n\n```bash\nnpm access ls-packages <org> <user>\n```\n\n* See packages available to a specific team:\n\n```bash\nnpm access ls-packages <org:team>\n```\n\n* Check which teams are collaborating on a package:\n\n```bash\nnpm access ls-collaborators <pkg>\n```\n\n### See also\n\n* [npm team](/cli/v8/commands/npm-team)\n* [npm access](/cli/v8/commands/npm-access)\n* [npm scope](/cli/v8/using-npm/scope)\n"},{"id":"b934461a-391f-5a50-89b7-e4784a65e69a","frontmatter":{"title":"package-spec"},"rawBody":"---\ntitle: package-spec\nsection: 7\ndescription: Package name specifier\nredirect_from:\n  - /using-npm/package-spec\n  - /using-npm/package-spec.html\n  - /misc/package-spec\n  - /misc/package-spec.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/package-spec.md\n---\n\n\n### Description\n\nCommands like `npm install` and the dependency sections in the\n`package.json` use a package name specifier.  This can be many different\nthings that all refer to a \"package\".  Examples include a package name,\ngit url, tarball, or local directory.  These will generally be referred\nto as `<package-spec>` in the help output for the npm commands that use\nthis package name specifier.\n\n### Package name\n\n* `[<@scope>/]<pkg>`\n* `[<@scope>/]<pkg>@<tag>`\n* `[<@scope>/]<pkg>@<version>`\n* `[<@scope>/]<pkg>@<version range>`\n\nRefers to a package by name, with or without a scope, and optionally\ntag, version, or version range.  This is typically used in combination\nwith the [registry](/cli/v8/using-npm/config#registry) config to refer to a\npackage in a registry.\n\nExamples:\n* `npm`\n* `@npmcli/arborist`\n* `@npmcli/arborist@latest`\n* `npm@6.13.1`\n* `npm@^4.0.0`\n\n### Aliases\n\n* `<alias>@npm:<name>`\n\nPrimarily used by commands like `npm install` and in the dependency\nsections in the `package.json`, this refers to a package by an alias.\nThe `<alias>` is the name of the package as it is reified in the\n`node_modules` folder, and the `<name>` refers to a package name as\nfound in the configured registry.\n\nSee `Package name` above for more info on referring to a package by\nname, and [registry](/cli/v8/using-npm/config#registry) for configuring which\nregistry is used when referring to a package by name.\n\nExamples:\n* `semver:@npm:@npmcli/semver-with-patch`\n* `semver:@npm:semver@7.2.2`\n* `semver:@npm:semver@legacy`\n\n### Folders\n\n* `<folder>`\n\nThis refers to a package on the local filesystem.  Specifically this is\na folder with a `package.json` file in it.  This *should* always be\nprefixed with a `/` or `./` (or your OS equivalent) to reduce confusion.\nnpm currently will parse a string with more than one `/` in it as a\nfolder, but this is legacy behavior that may be removed in a future\nversion.\n\nExamples:\n\n* `./my-package`\n* `/opt/npm/my-package`\n\n### Tarballs\n\n* `<tarball file>`\n* `<tarball url>`\n\nExamples:\n\n* `./my-package.tgz`\n* `https://registry.npmjs.org/semver/-/semver-1.0.0.tgz`\n\nRefers to a package in a tarball format, either on the local filesystem\nor remotely via url.  This is the format that packages exist in when\nuploaded to a registry.\n\n### git urls\n\n* `<git:// url>`\n* `<github username>/<github project>`\n\nRefers to a package in a git repo.  This can be a full git url, git\nshorthand, or a username/package on GitHub.  You can specify a\ngit tag, branch, or other git ref by appending `#ref`.\n\nExamples:\n\n* `https://github.com/npm/cli.git`\n* `git@github.com:npm/cli.git`\n* `git+ssh://git@github.com/npm/cli#v6.0.0`\n* `github:npm/cli#HEAD`\n* `npm/cli#c12ea07`\n\n### See also\n\n[npm-package-arg](https://npm.im/npm-package-arg)\n[scope](/cli/v8/using-npm/scope)\n[config](/cli/v8/using-npm/config)\n"},{"id":"9e22921e-14d6-56db-9059-fed1aafc58bc","frontmatter":{"title":"registry"},"rawBody":"---\ntitle: registry\nsection: 7\ndescription: The JavaScript Package Registry\nredirect_from:\n  - /using-npm/registry\n  - /using-npm/registry.html\n  - /misc/registry\n  - /misc/registry.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/registry.md\n---\n\n### Description\n\nTo resolve packages by name and version, npm talks to a registry website\nthat implements the CommonJS Package Registry specification for reading\npackage info.\n\nnpm is configured to use the **npm public registry** at\n<https://registry.npmjs.org> by default. Use of the npm public registry is\nsubject to terms of use available at <https://docs.npmjs.com/policies/terms>.\n\nYou can configure npm to use any compatible registry you like, and even run\nyour own registry. Use of someone else's registry may be governed by their\nterms of use.\n\nnpm's package registry implementation supports several\nwrite APIs as well, to allow for publishing packages and managing user\naccount information.\n\nThe npm public registry is powered by a CouchDB database,\nof which there is a public mirror at <https://skimdb.npmjs.com/registry>.\n\nThe registry URL used is determined by the scope of the package (see\n[`scope`](/cli/v8/using-npm/scope). If no scope is specified, the default registry is used, which is\nsupplied by the `registry` config parameter.  See [`npm config`](/cli/v8/commands/npm-config),\n[`npmrc`](/cli/v8/configuring-npm/npmrc), and [`config`](/cli/v8/using-npm/config) for more on managing npm's configuration.\n\nWhen the default registry is used in a package-lock or shrinkwrap is has the\nspecial meaning of \"the currently configured registry\". If you create a lock\nfile while using the default registry you can switch to another registry and\nnpm will install packages from the new registry, but if you create a lock\nfile while using a custom registry packages will be installed from that\nregistry even after you change to another registry.\n\n### Does npm send any information about me back to the registry?\n\nYes.\n\nWhen making requests of the registry npm adds two headers with information\nabout your environment:\n\n* `Npm-Scope` – If your project is scoped, this header will contain its\n  scope. In the future npm hopes to build registry features that use this\n  information to allow you to customize your experience for your\n  organization.\n* `Npm-In-CI` – Set to \"true\" if npm believes this install is running in a\n  continuous integration environment, \"false\" otherwise. This is detected by\n  looking for the following environment variables: `CI`, `TDDIUM`,\n  `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find\n  the [original PR](https://github.com/npm/npm-registry-client/pull/129)\n  interesting.\n  This is used to gather better metrics on how npm is used by humans, versus\n  build farms.\n\nThe npm registry does not try to correlate the information in these headers\nwith any authenticated accounts that may be used in the same requests.\n\n### How can I prevent my package from being published in the official registry?\n\nSet `\"private\": true` in your `package.json` to prevent it from being\npublished at all, or\n`\"publishConfig\":{\"registry\":\"http://my-internal-registry.local\"}`\nto force it to be published only to your internal/private registry.\n\nSee [`package.json`](/cli/v8/configuring-npm/package-json) for more info on what goes in the package.json file.\n\n### Where can I find my own, & other's, published packages?\n\n<https://www.npmjs.com/>\n\n### See also\n\n* [npm config](/cli/v8/commands/npm-config)\n* [config](/cli/v8/using-npm/config)\n* [npmrc](/cli/v8/configuring-npm/npmrc)\n* [npm developers](/cli/v8/using-npm/developers)\n"},{"id":"29df584a-4bac-57db-8f97-232985d190ac","frontmatter":{"title":"removal"},"rawBody":"---\ntitle: removal\nsection: 7\ndescription: Cleaning the Slate\nredirect_from:\n  - /using-npm/removal\n  - /using-npm/removal.html\n  - /misc/removal\n  - /misc/removal.html\n  - /misc/removing-npm\n  - /misc/removing-npm.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/removal.md\n---\n\n### Synopsis\n\nSo sad to see you go.\n\n```bash\nsudo npm uninstall npm -g\n```\n\nOr, if that fails, get the npm source code, and do:\n\n```bash\nsudo make uninstall\n```\n\n### More Severe Uninstalling\n\nUsually, the above instructions are sufficient.  That will remove\nnpm, but leave behind anything you've installed.\n\nIf that doesn't work, or if you require more drastic measures,\ncontinue reading.\n\nNote that this is only necessary for globally-installed packages.  Local\ninstalls are completely contained within a project's `node_modules`\nfolder.  Delete that folder, and everything is gone less a package's\ninstall script is particularly ill-behaved).\n\nThis assumes that you installed node and npm in the default place.  If\nyou configured node with a different `--prefix`, or installed npm with a\ndifferent prefix setting, then adjust the paths accordingly, replacing\n`/usr/local` with your install prefix.\n\nTo remove everything npm-related manually:\n\n```bash\nrm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*\n```\n\nIf you installed things *with* npm, then your best bet is to uninstall\nthem with npm first, and then install them again once you have a\nproper install.  This can help find any symlinks that are lying\naround:\n\n```bash\nls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm\n```\n\nPrior to version 0.3, npm used shim files for executables and node\nmodules.  To track those down, you can do the following:\n\n```bash\nfind /usr/local/{lib/node,bin} -exec grep -l npm \\{\\} \\; ;\n```\n\n### See also\n\n* [npm uninstall](/cli/v8/commands/npm-uninstall)\n* [npm prune](/cli/v8/commands/npm-prune)\n"},{"id":"083f25c0-000c-5a0b-b396-1e3e9297c5e2","frontmatter":{"title":"scope"},"rawBody":"---\ntitle: scope\nsection: 7\ndescription: Scoped packages\nredirect_from:\n  - /using-npm/scope\n  - /using-npm/scope.html\n  - /misc/scope\n  - /misc/scope.html\n  - /using-npm/npm-scope\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/scope.md\n---\n\n### Description\n\nAll npm packages have a name. Some package names also have a scope. A scope\nfollows the usual rules for package names (URL-safe characters, no leading dots\nor underscores). When used in package names, scopes are preceded by an `@` symbol\nand followed by a slash, e.g.\n\n```bash\n@somescope/somepackagename\n```\n\nScopes are a way of grouping related packages together, and also affect a few\nthings about the way npm treats the package.\n\nEach npm user/organization has their own scope, and only you can add packages\nin your scope. This means you don't have to worry about someone taking your\npackage name ahead of you. Thus it is also a good way to signal official packages\nfor organizations.\n\nScoped packages can be published and installed as of `npm@2` and are supported\nby the primary npm registry. Unscoped packages can depend on scoped packages and\nvice versa. The npm client is backwards-compatible with unscoped registries,\nso it can be used to work with scoped and unscoped registries at the same time.\n\n### Installing scoped packages\n\nScoped packages are installed to a sub-folder of the regular installation\nfolder, e.g. if your other packages are installed in `node_modules/packagename`,\nscoped modules will be installed in `node_modules/@myorg/packagename`. The scope\nfolder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can\ncontain any number of scoped packages.\n\nA scoped package is installed by referencing it by name, preceded by an\n`@` symbol, in `npm install`:\n\n```bash\nnpm install @myorg/mypackage\n```\n\nOr in `package.json`:\n\n```json\n\"dependencies\": {\n  \"@myorg/mypackage\": \"^1.3.0\"\n}\n```\n\nNote that if the `@` symbol is omitted, in either case, npm will instead attempt to\ninstall from GitHub; see [`npm install`](/cli/v8/commands/npm-install).\n\n### Requiring scoped packages\n\nBecause scoped packages are installed into a scope folder, you have to\ninclude the name of the scope when requiring them in your code, e.g.\n\n```javascript\nrequire('@myorg/mypackage')\n```\n\nThere is nothing special about the way Node treats scope folders. This\nsimply requires the `mypackage` module in the folder named `@myorg`.\n\n### Publishing scoped packages\n\nScoped packages can be published from the CLI as of `npm@2` and can be\npublished to any registry that supports them, including the primary npm\nregistry.\n\n(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry\n**does** support scoped packages.)\n\nIf you wish, you may associate a scope with a registry; see below.\n\n#### Publishing public scoped packages to the primary npm registry\n\nPublishing to a scope, you have two options:\n\n- Publishing to your user scope (example: `@username/module`)\n- Publishing to an organization scope (example: `@org/module`)\n\nIf publishing a public module to an organization scope, you must\nfirst either create an organization with the name of the scope\nthat you'd like to publish to or be added to an existing organization\nwith the appropriate permisssions. For example, if you'd like to \npublish to `@org`, you would  need to create the `org` organization \non npmjs.com prior to trying to publish.\n\nScoped packages are not public by default.  You will need to specify\n`--access public` with the initial `npm publish` command.  This will publish\nthe package and set access to `public` as if you had run `npm access public`\nafter publishing.  You do not need to do this when publishing new versions of\nan existing scoped package.\n\n#### Publishing private scoped packages to the npm registry\n\nTo publish a private scoped package to the npm registry, you must have\nan [npm Private Modules](https://docs.npmjs.com/private-modules/intro)\naccount.\n\nYou can then publish the module with `npm publish` or `npm publish\n--access restricted`, and it will be present in the npm registry, with\nrestricted access. You can then change the access permissions, if\ndesired, with `npm access` or on the npmjs.com website.\n\n### Associating a scope with a registry\n\nScopes can be associated with a separate registry. This allows you to\nseamlessly use a mix of packages from the primary npm registry and one or more\nprivate registries, such as [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org)\nproject.\n\nYou can associate a scope with a registry at login, e.g.\n\n```bash\nnpm login --registry=http://reg.example.com --scope=@myco\n```\n\nScopes have a many-to-one relationship with registries: one registry can\nhost multiple scopes, but a scope only ever points to one registry.\n\nYou can also associate a scope with a registry using `npm config`:\n\n```bash\nnpm config set @myco:registry http://reg.example.com\n```\n\nOnce a scope is associated with a registry, any `npm install` for a package\nwith that scope will request packages from that registry instead. Any\n`npm publish` for a package name that contains the scope will be published to\nthat registry instead.\n\n### See also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm access](/cli/v8/commands/npm-access)\n* [npm registry](/cli/v8/using-npm/registry)\n"},{"id":"d42b64d5-de06-5b84-a7d2-e856a6592efe","frontmatter":{"title":"scripts"},"rawBody":"---\ntitle: scripts\nsection: 7\ndescription: How npm handles the \"scripts\" field\nredirect_from:\n  - /using-npm/scripts\n  - /using-npm/scripts.html\n  - /misc/scripts\n  - /misc/scripts.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/scripts.md\n---\n\n### Description\n\nThe `\"scripts\"` property of your `package.json` file supports a number\nof built-in scripts and their preset life cycle events as well as\narbitrary scripts. These all can be executed by running\n`npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post*\ncommands with matching names will be run for those as well (e.g. `premyscript`,\n`myscript`, `postmyscript`). Scripts from dependencies can be run with\n`npm explore <pkg> -- npm run <stage>`.\n\n### Pre & Post Scripts\n\nTo create \"pre\" or \"post\" scripts for any scripts defined in the\n`\"scripts\"` section of the `package.json`, simply create another script\n*with a matching name* and add \"pre\" or \"post\" to the beginning of them.\n\n```json\n{\n  \"scripts\": {\n    \"precompress\": \"{{ executes BEFORE the `compress` script }}\",\n    \"compress\": \"{{ run command to compress files }}\",\n    \"postcompress\": \"{{ executes AFTER `compress` script }}\"\n  }\n}\n```\n\nIn this example `npm run compress` would execute these scripts as\ndescribed.\n\n### Life Cycle Scripts\n\nThere are some special life cycle scripts that happen only in certain\nsituations. These scripts happen in addition to the `pre<event>`, `post<event>`, and\n`<event>` scripts.\n\n* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`, `dependencies`\n\n**prepare** (since `npm@4.0.0`)\n* Runs any time before the package is packed, i.e. during `npm publish`\n    and `npm pack`\n* Runs BEFORE the package is packed\n* Runs BEFORE the package is published\n* Runs on local `npm install` without any arguments\n* Run AFTER `prepublish`, but BEFORE `prepublishOnly`\n\n* NOTE: If a package being installed through git contains a `prepare`\n script, its `dependencies` and `devDependencies` will be installed, and\n the prepare script will be run, before the package is packaged and\n installed.\n\n* As of `npm@7` these scripts run in the background.\n  To see the output, run with: `--foreground-scripts`.\n\n**prepublish** (DEPRECATED)\n* Does not run during `npm publish`, but does run during `npm ci`\n  and `npm install`. See below for more info.\n\n**prepublishOnly**\n* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.\n\n**prepack**\n* Runs BEFORE a tarball is packed (on \"`npm pack`\", \"`npm publish`\", and when installing a git dependencies).\n* NOTE: \"`npm run pack`\" is NOT the same as \"`npm pack`\". \"`npm run pack`\" is an arbitrary user defined script name, where as, \"`npm pack`\" is a CLI defined command.\n\n**postpack**\n* Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally)\n\n**dependencies**\n* Runs AFTER any operations that modify the `node_modules` directory IF changes occurred.\n* Does NOT run in global mode\n\n#### Prepare and Prepublish\n\n**Deprecation Note: prepublish**\n\nSince `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below).  It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074).  As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape).\n\nSee <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further reading, for this change.\n\n**Use Cases**\n\nIf you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as:\n\n* Compiling CoffeeScript source code into JavaScript.\n* Creating minified versions of JavaScript source code.\n* Fetching remote resources that your package will use.\n\nThe advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:\n\n* You can depend on `coffee-script` as a `devDependency`, and thus\n  your users don't need to have it installed.\n* You don't need to include minifiers in your package, reducing\n  the size for your users.\n* You don't need to rely on your users having `curl` or `wget` or\n  other system tools on the target machines.\n\n#### Dependencies\n\nThe `dependencies` script is run any time an `npm` command causes changes to the `node_modules` directory. It is run AFTER the changes have been applied and the `package.json` and `package-lock.json` files have been updated.\n\n### Life Cycle Operation Order\n\n#### [`npm cache add`](/cli/v8/commands/npm-cache)\n\n* `prepare`\n\n#### [`npm ci`](/cli/v8/commands/npm-ci)\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepublish`\n* `preprepare`\n* `prepare`\n* `postprepare`\n\n These all run after the actual installation of modules into\n `node_modules`, in order, with no internal actions happening in between\n\n#### [`npm diff`](/cli/v8/commands/npm-diff)\n\n* `prepare`\n\n#### [`npm install`](/cli/v8/commands/npm-install)\n\nThese also run when you run `npm install -g <pkg-name>`\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepublish`\n* `preprepare`\n* `prepare`\n* `postprepare`\n\nIf there is a `binding.gyp` file in the root of your package and you\nhaven't defined your own `install` or `preinstall` scripts, npm will\ndefault the `install` command to compile using node-gyp via `node-gyp\nrebuild`\n\nThese are run from the scripts of `<pkg-name>`\n\n#### [`npm pack`](/cli/v8/commands/npm-pack)\n\n* `prepack`\n* `prepare`\n* `postpack`\n\n#### [`npm publish`](/cli/v8/commands/npm-publish)\n\n* `prepublishOnly`\n* `prepack`\n* `prepare`\n* `postpack`\n* `publish`\n* `postpublish`\n\n`prepare` will not run during `--dry-run`\n\n#### [`npm rebuild`](/cli/v8/commands/npm-rebuild)\n\n* `preinstall`\n* `install`\n* `postinstall`\n* `prepare`\n\n`prepare` is only run if the current directory is a symlink (e.g. with\nlinked packages)\n\n#### [`npm restart`](/cli/v8/commands/npm-restart)\n\nIf there is a `restart` script defined, these events are run, otherwise\n`stop` and `start` are both run if present, including their `pre` and\n`post` iterations)\n\n* `prerestart`\n* `restart`\n* `postrestart`\n\n#### [`npm run <user defined>`](/cli/v8/commands/npm-run-script)\n\n* `pre<user-defined>`\n* `<user-defined>`\n* `post<user-defined>`\n\n#### [`npm start`](/cli/v8/commands/npm-start)\n\n* `prestart`\n* `start`\n* `poststart`\n\nIf there is a `server.js` file in the root of your package, then npm\nwill default the `start` command to `node server.js`.  `prestart` and\n`poststart` will still run in this case.\n\n#### [`npm stop`](/cli/v8/commands/npm-stop)\n\n* `prestop`\n* `stop`\n* `poststop`\n\n#### [`npm test`](/cli/v8/commands/npm-test)\n\n* `pretest`\n* `test`\n* `posttest`\n\n#### [`npm version`](/cli/v8/commands/npm-version)\n\n* `preversion`\n* `version`\n* `postversion`\n\n#### A Note on a lack of [`npm uninstall`](/cli/v8/commands/npm-uninstall) scripts\n\nWhile npm v6 had `uninstall` lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful. \n\nReasons for a package removal include:\n\n* a user directly uninstalled this package\n* a user uninstalled a dependant package and so this dependency is being uninstalled\n* a user uninstalled a dependant package but another package also depends on this version\n* this version has been merged as a duplicate with another version\n* etc.\n\nDue to the lack of necessary context, `uninstall` lifecycle scripts are not implemented and will not function.\n\n### User\n\nWhen npm is run as root, scripts are always run with the effective uid\nand gid of the working directory owner.\n\n### Environment\n\nPackage scripts run in an environment where many pieces of information\nare made available regarding the setup of npm and the current state of\nthe process.\n\n#### path\n\nIf you depend on modules that define executable scripts, like test\nsuites, then those executables will be added to the `PATH` for\nexecuting the scripts.  So, if your package.json has this:\n\n```json\n{\n  \"name\" : \"foo\",\n  \"dependencies\" : {\n    \"bar\" : \"0.1.x\"\n  },\n  \"scripts\": {\n    \"start\" : \"bar ./test\"\n  }\n}\n```\n\nthen you could run `npm start` to execute the `bar` script, which is\nexported into the `node_modules/.bin` directory on `npm install`.\n\n#### package.json vars\n\nThe package.json fields are tacked onto the `npm_package_` prefix. So,\nfor instance, if you had `{\"name\":\"foo\", \"version\":\"1.2.5\"}` in your\npackage.json file, then your package scripts would have the\n`npm_package_name` environment variable set to \"foo\", and the\n`npm_package_version` set to \"1.2.5\".  You can access these variables\nin your code with `process.env.npm_package_name` and\n`process.env.npm_package_version`, and so on for other fields.\n\nSee [`package.json`](/cli/v8/configuring-npm/package-json) for more on package configs.\n\n#### current lifecycle event\n\nLastly, the `npm_lifecycle_event` environment variable is set to\nwhichever stage of the cycle is being executed. So, you could have a\nsingle script used for different parts of the process which switches\nbased on what's currently happening.\n\nObjects are flattened following this format, so if you had\n`{\"scripts\":{\"install\":\"foo.js\"}}` in your package.json, then you'd\nsee this in the script:\n\n```bash\nprocess.env.npm_package_scripts_install === \"foo.js\"\n```\n\n### Examples\n\nFor example, if your package.json contains this:\n\n```json\n{\n  \"scripts\" : {\n    \"install\" : \"scripts/install.js\",\n    \"postinstall\" : \"scripts/install.js\",\n    \"uninstall\" : \"scripts/uninstall.js\"\n  }\n}\n```\n\nthen `scripts/install.js` will be called for the install\nand post-install stages of the lifecycle, and `scripts/uninstall.js`\nwill be called when the package is uninstalled.  Since\n`scripts/install.js` is running for two different phases, it would\nbe wise in this case to look at the `npm_lifecycle_event` environment\nvariable.\n\nIf you want to run a make command, you can do so.  This works just\nfine:\n\n```json\n{\n  \"scripts\" : {\n    \"preinstall\" : \"./configure\",\n    \"install\" : \"make && make install\",\n    \"test\" : \"make test\"\n  }\n}\n```\n\n### Exiting\n\nScripts are run by passing the line as a script argument to `sh`.\n\nIf the script exits with a code other than 0, then this will abort the\nprocess.\n\nNote that these script files don't have to be Node.js or even\nJavaScript programs. They just have to be some kind of executable\nfile.\n\n### Best Practices\n\n* Don't exit with a non-zero error code unless you *really* mean it.\n  Except for uninstall scripts, this will cause the npm action to\n  fail, and potentially be rolled back.  If the failure is minor or\n  only will prevent some optional features, then it's better to just\n  print a warning and exit successfully.\n* Try not to use scripts to do what npm can do for you.  Read through\n  [`package.json`](/cli/v8/configuring-npm/package-json) to see all the things that you can specify and enable\n  by simply describing your package appropriately.  In general, this\n  will lead to a more robust and consistent state.\n* Inspect the env to determine where to put things.  For instance, if\n  the `npm_config_binroot` environment variable is set to `/home/user/bin`, then\n  don't try to install executables into `/usr/local/bin`.  The user\n  probably set it up that way for a reason.\n* Don't prefix your script commands with \"sudo\".  If root permissions\n  are required for some reason, then it'll fail with that error, and\n  the user will sudo the npm command in question.\n* Don't use `install`. Use a `.gyp` file for compilation, and `prepare`\n  for anything else. You should almost never have to explicitly set a\n  preinstall or install script. If you are doing this, please consider if\n  there is another option. The only valid use of `install` or `preinstall`\n  scripts is for compilation which must be done on the target architecture.\n* Scripts are run from the root of the package folder, regardless of what the\n  current working directory is when `npm` is invoked. If you want your\n  script to use different behavior based on what subdirectory you're in, you\n  can use the `INIT_CWD` environment variable, which holds the full path you\n  were in when you ran `npm run`.\n\n### See Also\n\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [package.json](/cli/v8/configuring-npm/package-json)\n* [npm developers](/cli/v8/using-npm/developers)\n* [npm install](/cli/v8/commands/npm-install)\n"},{"id":"8b045aed-b7f2-58d8-90cb-eb206ffaae59","frontmatter":{"title":"workspaces"},"rawBody":"---\ntitle: workspaces\nsection: 7\ndescription: Working with workspaces\nredirect_from:\n  - /using-npm/workspaces\n  - /using-npm/workspaces.html\n  - /misc/workspaces\n  - /misc/workspaces.html\ngithub_repo: npm/cli\ngithub_branch: latest\ngithub_path: docs/content/using-npm/workspaces.md\n---\n\n### Description\n\n**Workspaces** is a generic term that refers to the set of features in the\nnpm cli that provides support to managing multiple packages from your local\nfile system from within a singular top-level, root package.\n\nThis set of features makes up for a much more streamlined workflow handling\nlinked packages from the local file system. Automating the linking process\nas part of `npm install` and avoiding manually having to use `npm link` in\norder to add references to packages that should be symlinked into the current\n`node_modules` folder.\n\nWe also refer to these packages being auto-symlinked during `npm install` as a\nsingle **workspace**, meaning it's a nested package within the current local\nfile system that is explicitly defined in the [`package.json`](/cli/v8/configuring-npm/package-json#workspaces)\n`workspaces` configuration.\n\n### Defining workspaces\n\nWorkspaces are usually defined via the `workspaces` property of the\n[`package.json`](/cli/v8/configuring-npm/package-json#workspaces) file, e.g:\n\n```json\n{\n  \"name\": \"my-workspaces-powered-project\",\n  \"workspaces\": [\n    \"packages/a\"\n  ]\n}\n```\n\nGiven the above `package.json` example living at a current working\ndirectory `.` that contains a folder named `packages/a` that itself contains\na `package.json` inside it, defining a Node.js package, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n```\n\nThe expected result once running `npm install` in this current working\ndirectory `.` is that the folder `packages/a` will get symlinked to the\n`node_modules` folder of the current working dir.\n\nBelow is a post `npm install` example, given that same previous example\nstructure of files and folders:\n\n```\n.\n+-- node_modules\n|  `-- a -> ../packages/a\n+-- package-lock.json\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n```\n\n### Getting started with workspaces\n\nYou may automate the required steps to define a new workspace using\n[npm init](/cli/v8/commands/npm-init). For example in a project that already has a\n`package.json` defined you can run:\n\n```\nnpm init -w ./packages/a\n```\n\nThis command will create the missing folders and a new `package.json`\nfile (if needed) while also making sure to properly configure the\n`\"workspaces\"` property of your root project `package.json`.\n\n### Adding dependencies to a workspace\n\nIt's possible to directly add/remove/update dependencies of your workspaces\nusing the [`workspace` config](/cli/v8/using-npm/config#workspace).\n\nFor example, assuming the following structure:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- b\n       `-- package.json\n```\n\nIf you want to add a dependency named `abbrev` from the registry as a\ndependency of your workspace **a**, you may use the workspace config to tell\nthe npm installer that package should be added as a dependency of the provided\nworkspace:\n\n```\nnpm install abbrev -w a\n```\n\nNote: other installing commands such as `uninstall`, `ci`, etc will also\nrespect the provided `workspace` configuration.\n\n### Using workspaces\n\nGiven the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace\nby its declared `package.json` `name`. Continuing from the example defined\nabove, let's also create a Node.js script that will require the workspace `a`\nexample module, e.g:\n\n```\n// ./packages/a/index.js\nmodule.exports = 'a'\n\n// ./lib/index.js\nconst moduleA = require('a')\nconsole.log(moduleA) // -> a\n```\n\nWhen running it with:\n\n`node lib/index.js`\n\nThis demonstrates how the nature of `node_modules` resolution allows for\n**workspaces** to enable a portable workflow for requiring each **workspace**\nin such a way that is also easy to [publish](/cli/v8/commands/npm-publish) these\nnested workspaces to be consumed elsewhere.\n\n### Running commands in the context of workspaces\n\nYou can use the `workspace` configuration option to run commands in the context\nof a configured workspace.\nAdditionally, if your current directory is in a workspace, the `workspace`\nconfiguration is implicitly set, and `prefix` is set to the root workspace.\n\nFollowing is a quick example on how to use the `npm run` command in the context\nof nested workspaces. For a project containing multiple workspaces, e.g:\n\n```\n.\n+-- package.json\n`-- packages\n   +-- a\n   |   `-- package.json\n   `-- b\n       `-- package.json\n```\n\nBy running a command using the `workspace` option, it's possible to run the\ngiven command in the context of that specific workspace. e.g:\n\n```\nnpm run test --workspace=a\n```\n\nYou could also run the command within the workspace.\n\n```\ncd packages/a && npm run test\n```\n\nEither will run the `test` script defined within the\n`./packages/a/package.json` file.\n\nPlease note that you can also specify this argument multiple times in the\ncommand-line in order to target multiple workspaces, e.g:\n\n```\nnpm run test --workspace=a --workspace=b\n```\n\nIt's also possible to use the `workspaces` (plural) configuration option to\nenable the same behavior but running that command in the context of **all**\nconfigured workspaces. e.g:\n\n```\nnpm run test --workspaces\n```\n\nWill run the `test` script in both `./packages/a` and `./packages/b`.\n\nCommands will be run in each workspace in the order they appear in your `package.json`\n\n```\n{\n  \"workspaces\": [ \"packages/a\", \"packages/b\" ]\n}\n```\n\nOrder of run is different with:\n\n```\n{\n  \"workspaces\": [ \"packages/b\", \"packages/a\" ]\n}\n```\n\n### Ignoring missing scripts\n\nIt is not required for all of the workspaces to implement scripts run with the `npm run` command.\n\nBy running the command with the `--if-present` flag, npm will ignore workspaces missing target script.\n\n```\nnpm run test --workspaces --if-present\n```\n\n### See also\n\n* [npm install](/cli/v8/commands/npm-install)\n* [npm publish](/cli/v8/commands/npm-publish)\n* [npm run-script](/cli/v8/commands/npm-run-script)\n* [config](/cli/v8/using-npm/config)\n\n"},{"id":"9d2d08dd-753e-5630-8adb-cbce90506ae8","frontmatter":{"title":"Using npm packages in your projects"},"rawBody":"---\ntitle: Using npm packages in your projects\n---\n\nOnce you have [installed a package][install-pkg] in `node_modules`, you can use it in your code.\n\n## Using unscoped packages in your projects\n\n### Node.js module\n\nIf you are creating a Node.js module, you can use a package in your module by passing it as an argument to the `require` function.\n\n\n```javascript\nvar lodash = require('lodash');\n\nvar output = lodash.without([1, 2, 3], 1);\nconsole.log(output);\n```\n\n\n### package.json file\n\nIn `package.json`, list the package under dependencies. You can optionally include a [semantic version][semver].\n\n```json\n{\n  \"dependencies\": {\n    \"@package_name\": \"^1.0.0\"\n  }\n}\n```\n\n## Using scoped packages in your projects\n\nTo use a scoped package, simply include the scope wherever you use the package name.\n\n### Node.js module\n\n\n```js\nvar projectName = require(\"@scope/package-name\")\n```\n\n### package.json file\n\nIn `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"@scope/package_name\": \"^1.0.0\"\n  }\n}\n```\n\n## Resolving \"Cannot find module\" errors\n\nIf you have not properly installed a package, you will receive an error when you try to use it in your code. For example, if you reference the `lodash` package without installing it, you would see the following error:\n\n```\nmodule.js:340\n    throw err;\n          ^\nError: Cannot find module 'lodash'\n```\n\n\n- For scoped packages, run `npm install <@scope/package_name>`\n- For unscoped packages, run `npm install <package_name>`\n\n\n[install-pkg]: downloading-and-installing-packages\n[semver]: about-semantic-versioning\n"},{"id":"25144378-3db6-5cce-bd22-6683b13abe00","frontmatter":{"title":"About private packages"},"rawBody":"---\ntitle: About private packages\n---\n\n<div class=\"note\">\n\nTo use private packages, you must\n\n<ul>\n<li> be using npm version 2.7.0 or greater. To upgrade, on the command line, run <code class=\"highlighter-rouge\">npm install npm@latest -g</code></li>\n<li>have a <a href=\"https://www.npmjs.com/pricing\">paid user or organization account</a></li>\n</ul>\n\n</div>\n\nWith npm private packages, you can use the npm registry to host code that is only visible to you and chosen collaborators, allowing you to manage and use private code alongside public code in your projects.\n\nPrivate packages always have a scope, and scoped packages are private by default.\n\n* **User-scoped private packages** can only be accessed by you and collaborators to whom you have granted read or read/write access. For more information, see \"[Adding collaborators to private packages owned by a user account][user-pkg-add]\".\n* **Organization-scoped private packages** can only be accessed by teams that have been granted read or read/write access. For more information, see \"[Managing team access to organization packages][team-pkg-add]\".\n\n## Next steps\n\n- \"[Creating and publishing private packages][create-priv-pkg]\"\n- \"[Using npm packages in your projects][use-pkg]\"\n\n## Resources\n\n<iframe src=\"https://www.youtube.com/embed/O6JoXGnHK_Y\" frameborder=\"0\" allowfullscreen></iframe>\n\n[paid-acct]: https://www.npmjs.com/pricing\n[user-pkg-add]: adding-collaborators-to-private-packages-owned-by-a-user-account\n[team-pkg-add]: managing-team-access-to-organization-packages\n[create-priv-pkg]: creating-and-publishing-private-packages\n[install-pkgs]: installing-packages-and-dependencies#installing-private-packages\n[use-pkg]: using-npm-packages-in-your-projects\n"},{"id":"7ae02fc8-d625-545d-b259-c93500eb9ee0","frontmatter":{"title":"About packages and modules"},"rawBody":"---\ntitle: About packages and modules\nredirect_from:\n  - /getting-started/packages\n---\n\nThe npm registry contains packages, many of which are also Node modules, or contain Node modules. Read on to understand how they differ and how they interact.\n\n## About packages\n\nA **package** is a file or directory that is described by a `package.json` file. A package must contain a `package.json` file in order to be published to the npm registry. For more information on creating a `package.json` file, see \"[Creating a package.json file][pkg-json]\".\n\nPackages can be unscoped or scoped to a user or organization, and scoped packages can be private or public. For more information, see\n- \"[About scopes][about-scopes]\"\n- \"[About private packages][private-pkgs]\"\n- \"[Package scope, access level, and visibility][pkg-viz]\"\n\n### About package formats\n\nA package is any of the following:\n\n* a) A folder containing a program described by a `package.json` file.\n* b) A gzipped tarball containing (a).\n* c) A URL that resolves to (b).\n* d) A `<name>@<version>` that is published on the registry with (c).\n* e) A `<name>@<tag>` that points to (d).\n* f) A `<name>` that has a `latest` tag satisfying (e).\n* g) A `git` url that, when cloned, results in (a).\n\n### npm package git URL formats\n\nGit URLs used for npm packages can be formatted in the following ways:\n\n- `git://github.com/user/project.git#commit-ish`\n- `git+ssh://user@hostname:project.git#commit-ish`\n- `git+http://user@hostname/project/blah.git#commit-ish`\n- `git+https://user@hostname/project/blah.git#commit-ish`\n\nThe `commit-ish` can be any tag, sha, or branch that can be supplied as\nan argument to `git checkout`. The default `commit-ish` is `master`.\n\n## About modules\n\nA **module** is any file or directory in the `node_modules` directory that can be loaded by the Node.js `require()` function.\n\nTo be loaded by the Node.js `require()` function, a module must be one of the following:\n\n* A folder with a `package.json` file containing a `\"main\"` field.\n* A JavaScript file.\n\n<div class=\"note\">\n\n<span class=\"bold\">**Note:** </span>\nSince modules are not required to have a `package.json` file, not all modules are packages. Only modules that have a `package.json` file are also packages.\n\n</div>\n\nIn the context of a Node program, the `module` is also the thing that\nwas loaded *from* a file. For example, in the following program:\n\n    var req = require('request')\n\nwe might say that \"The variable `req` refers to the `request` module\".\n\n\n[about-scopes]: about-scopes\n[private-pkgs]: about-private-packages\n[pkg-json]: creating-a-package-json-file\n[pkg-viz]: package-scope-access-level-and-visibility\n"}]},"allSitePage":{"nodes":[{"path":"/dev-404-page/","context":null},{"path":"/","context":{"mdxId":"b1d3cb34-c318-586b-9266-222d028078c6"}},{"path":"/policies/conduct","context":{"mdxId":"58db92e8-dce3-5a1e-b913-f79c2a48b295"}},{"path":"/policies/crawlers","context":{"mdxId":"c7497fb8-e6f6-5aaa-91d5-8936ab928206"}},{"path":"/policies/disputes","context":{"mdxId":"b54fef29-b102-56ad-ba37-1d4df97760a7"}},{"path":"/policies/dmca","context":{"mdxId":"b2a2a71f-2085-595e-9f97-d88d708d0809"}},{"path":"/policies/logos-and-usage","context":{"mdxId":"2f01ca10-4508-533c-9f05-ee048975762e"}},{"path":"/policies/npm-license","context":{"mdxId":"f713097b-f232-5843-a30c-6ffb889bc494"}},{"path":"/policies/open-source-terms","context":{"mdxId":"fcd9f248-42e7-592d-b214-56213e4333b1"}},{"path":"/policies/orgs-plan","context":{"mdxId":"9418f0cc-6859-5eeb-b551-d0ef4ec3962b"}},{"path":"/policies/private-terms","context":{"mdxId":"f02b0527-03c2-5509-95fa-9a009d9f3601"}},{"path":"/policies/security","context":{"mdxId":"8401bedc-50a7-5606-8734-1c4968310a3c"}},{"path":"/policies/privacy","context":{"mdxId":"ddb65ff3-33a9-531a-8d6f-f01f9efd9b24"}},{"path":"/policies/solo-plan","context":{"mdxId":"8c8fa387-8290-544a-841e-9a1c64fd566b"}},{"path":"/policies/terms","context":{"mdxId":"e040aba0-1c41-5c2f-95cb-58b485828bee"}},{"path":"/policies/unpublish","context":{"mdxId":"efd79941-530d-5dba-a325-6ac81da74edd"}},{"path":"/about-npm-versions","context":{"mdxId":"e76706a2-24c0-5973-8df1-57d96ab264c9"}},{"path":"/downloading-and-installing-node-js-and-npm","context":{"mdxId":"578fd137-ccf1-5a39-ac65-dc1b61e4552d"}},{"path":"/changing-your-npm-username","context":{"mdxId":"e317af43-c1dc-5eaa-b2ff-670f443fe466"}},{"path":"/deleting-your-npm-user-account","context":{"mdxId":"422eb896-23dc-5cdc-869a-0399d18eabd7"}},{"path":"/managing-your-profile-settings","context":{"mdxId":"e37b4024-bb00-5906-9fd6-5dd28afd9438"}},{"path":"/requesting-your-data","context":{"mdxId":"879330bc-8716-51b1-90d1-adfab2561ce9"}},{"path":"/downgrading-to-a-free-user-account-plan","context":{"mdxId":"7cc320ea-bfc9-518f-812a-45547039cc5f"}},{"path":"/updating-user-account-billing-settings","context":{"mdxId":"f4c7df46-ea19-5170-aa87-9739c39c6d49"}},{"path":"/upgrading-to-a-paid-user-account-plan","context":{"mdxId":"13c754b6-7b70-529c-a1a8-c540b1ef50bb"}},{"path":"/viewing-downloading-and-emailing-receipts-for-your-user-account","context":{"mdxId":"77f08661-8284-5820-9d8a-aa0bff904c38"}},{"path":"/about-two-factor-authentication","context":{"mdxId":"5cd676bc-96f5-503a-9801-5c4f47c906d9"}},{"path":"/accessing-npm-using-2fa","context":{"mdxId":"c4bca38c-d340-5acd-9402-f7c58585f070"}},{"path":"/configuring-two-factor-authentication","context":{"mdxId":"d5a9a1bb-509b-5d30-8793-2167b550a5b7"}},{"path":"/creating-a-new-npm-user-account","context":{"mdxId":"e0e794c3-ad30-5e3a-98b1-0b4611178d1c"}},{"path":"/creating-a-strong-password","context":{"mdxId":"d4778273-0d95-5d86-a2ef-432443c2a492"}},{"path":"/receiving-a-one-time-password-over-email","context":{"mdxId":"d83880fa-6495-5619-86a4-d9fef92c07e0"}},{"path":"/recovering-your-2fa-enabled-account","context":{"mdxId":"19a60933-a190-5116-9334-a0093ff6349c"}},{"path":"/common-errors","context":{"mdxId":"bf88e123-0fc5-597b-8001-0c977af5a301"}},{"path":"/generating-and-locating-npm-debug.log-files","context":{"mdxId":"728d2f8c-08fe-5d94-b9ba-f029e904181f"}},{"path":"/try-the-latest-stable-version-of-node","context":{"mdxId":"bf4d8650-4fae-5004-bc1c-10de995e4dbd"}},{"path":"/try-the-latest-stable-version-of-npm","context":{"mdxId":"54c189d4-d5c0-57ce-9dbf-333004affc02"}},{"path":"/about-access-tokens","context":{"mdxId":"73230f6f-837a-5a6d-ae9f-6a3c66a0df72"}},{"path":"/creating-and-viewing-access-tokens","context":{"mdxId":"ab943f5c-9522-5170-b650-4a2c712fcce0"}},{"path":"/docker-and-private-modules","context":{"mdxId":"4028a386-ce9f-58ff-9ce1-ae63d4fef4f9"}},{"path":"/revoking-access-tokens","context":{"mdxId":"1a77b656-d6e2-5c82-b605-a9fb2901af2b"}},{"path":"/using-private-packages-in-a-ci-cd-workflow","context":{"mdxId":"38a1db2a-8775-530e-af4a-2084d7b321e9"}},{"path":"/converting-your-user-account-to-an-organization","context":{"mdxId":"af579523-b207-5f66-b328-d841acb14eb9"}},{"path":"/creating-an-organization","context":{"mdxId":"c26dd8cb-d09b-5374-8278-86bcdedf1fc7"}},{"path":"/deleting-an-organization","context":{"mdxId":"fc3923fc-2a45-5416-b332-41c36214a8ac"}},{"path":"/renaming-an-organization","context":{"mdxId":"98af0755-217e-5c3a-a443-878e4a3cb391"}},{"path":"/requiring-two-factor-authentication-in-your-organization","context":{"mdxId":"0d6ba636-852b-5a41-83dd-a1c4352f0ffa"}},{"path":"/accepting-or-rejecting-an-organization-invitation","context":{"mdxId":"a0b76b5e-8310-5a26-a80e-6ba39f6a6784"}},{"path":"/adding-members-to-your-organization","context":{"mdxId":"5592b863-7d90-54ce-b872-bc866088d468"}},{"path":"/managing-organization-permissions","context":{"mdxId":"8de562ce-23cc-51fd-8fdf-29c8255e1d40"}},{"path":"/organization-roles-and-permissions","context":{"mdxId":"311e83f9-33b7-5ef6-a86a-ebcab4c8792e"}},{"path":"/removing-members-from-your-organization","context":{"mdxId":"de5339a9-3038-5170-a2f2-ac0e6b79b810"}},{"path":"/about-organization-scopes-and-packages","context":{"mdxId":"ad80dfe0-f4ce-5304-88c1-7be7046eb2a1"}},{"path":"/configuring-your-npm-client-with-your-organization-settings","context":{"mdxId":"410b1d1f-113d-5a9d-b51a-a143b47c1219"}},{"path":"/creating-and-publishing-an-organization-scoped-package","context":{"mdxId":"42049605-d20b-57e0-b6e5-901b695177b8"}},{"path":"/about-developers-team","context":{"mdxId":"0e6abf6a-6ccd-522d-8c83-605eac25a31b"}},{"path":"/adding-organization-members-to-teams","context":{"mdxId":"83ff3b0d-be27-5293-a77d-765fd2f17bd0"}},{"path":"/creating-teams","context":{"mdxId":"48b5e3fe-2c84-5193-abd3-65be51db12e5"}},{"path":"/managing-team-access-to-organization-packages","context":{"mdxId":"f27144fd-023e-545d-a1e3-640f5b9ee816"}},{"path":"/removing-organization-members-from-teams","context":{"mdxId":"6f6baa2e-2974-5df7-91d2-46847cdcddab"}},{"path":"/removing-teams","context":{"mdxId":"bcbee485-e2c6-5f28-8ad3-c3ccdbeee37c"}},{"path":"/downgrading-to-a-free-organization-plan","context":{"mdxId":"dfbb9935-c3da-54aa-a03a-891778f6783d"}},{"path":"/updating-organization-billing-settings","context":{"mdxId":"79fdf7de-32a8-542e-b0e9-88e3695eb5f6"}},{"path":"/upgrading-to-a-paid-organization-plan","context":{"mdxId":"06bb4353-e17b-5c5d-b577-db71e9a34ea8"}},{"path":"/viewing-downloading-and-emailing-receipts-for-your-organization","context":{"mdxId":"a3cbc79d-ee49-59d2-9f06-00bf77f93421"}},{"path":"/about-package-readme-files","context":{"mdxId":"65a6d61d-d38c-5a38-8775-942c9a4d510f"}},{"path":"/about-semantic-versioning","context":{"mdxId":"d8839df6-a5ec-5f20-a850-732b11b9585b"}},{"path":"/adding-dist-tags-to-packages","context":{"mdxId":"37558650-3014-5356-a5e5-fd38dac4e8a6"}},{"path":"/creating-a-package-json-file","context":{"mdxId":"233012ba-94cb-56c7-bd1e-2fe6e89c78a1"}},{"path":"/creating-and-publishing-private-packages","context":{"mdxId":"d99e4216-f95b-5f5c-ad70-73e79e1e12ac"}},{"path":"/creating-and-publishing-scoped-public-packages","context":{"mdxId":"f60de04f-5cf2-5aa6-88f3-99d8c030e19e"}},{"path":"/creating-and-publishing-unscoped-public-packages","context":{"mdxId":"eabc01d0-cc01-5360-a41a-b7c5b9b5da7b"}},{"path":"/creating-node-js-modules","context":{"mdxId":"fdcd1921-0305-52ea-8756-68aee89ea71e"}},{"path":"/package-name-guidelines","context":{"mdxId":"7649271c-dacc-5c62-9a3d-a0b654eae11a"}},{"path":"/specifying-dependencies-and-devdependencies-in-a-package-json-file","context":{"mdxId":"431e9df4-2a18-51a9-9f1b-84cb07f0d2ff"}},{"path":"/downloading-and-installing-packages-globally","context":{"mdxId":"86f67d67-59ed-5978-91b8-2abb00bd0462"}},{"path":"/downloading-and-installing-packages-locally","context":{"mdxId":"731d5d33-7975-5aa7-80b1-7c30eefbf445"}},{"path":"/resolving-eacces-permissions-errors-when-installing-packages-globally","context":{"mdxId":"33219d4f-238c-5066-a1fe-8fb3d957961b"}},{"path":"/searching-for-and-choosing-packages-to-download","context":{"mdxId":"522d1fa1-fe39-5e2e-941e-e24cdc81f4a3"}},{"path":"/uninstalling-packages-and-dependencies","context":{"mdxId":"7d9d9535-012a-567c-8176-6c7b94ff4266"}},{"path":"/updating-packages-downloaded-from-the-registry","context":{"mdxId":"390e337e-8228-5443-a962-b4ef05b9c599"}},{"path":"/using-deprecated-packages","context":{"mdxId":"a2a0ad87-15c1-533a-b4b9-da7c74650bd0"}},{"path":"/about-public-packages","context":{"mdxId":"f2d08035-ab85-5ded-8de9-7c5379e530b3"}},{"path":"/about-scopes","context":{"mdxId":"fe6412d3-c106-5594-9a4f-cfec15480ace"}},{"path":"/about-the-public-npm-registry","context":{"mdxId":"a2192793-60a8-5837-9b0d-2ed914761f97"}},{"path":"/package-scope-access-level-and-visibility","context":{"mdxId":"18e92413-ebe9-5c75-8443-2e1fd1061b53"}},{"path":"/about-audit-reports","context":{"mdxId":"d1e4838e-50e0-5cc8-a0ac-dd7f44423237"}},{"path":"/about-pgp-signatures-for-packages-in-the-public-registry","context":{"mdxId":"5c502cd6-8abd-5a51-a247-d7dc53560527"}},{"path":"/about-registry-signatures","context":{"mdxId":"b2c7655d-db30-5b11-9e5f-09c1363a541f"}},{"path":"/auditing-package-dependencies-for-security-vulnerabilities","context":{"mdxId":"09c9e0ae-17d2-5e46-a753-97df56082d3a"}},{"path":"/reporting-malware-in-an-npm-package","context":{"mdxId":"0b2dcdcd-ffc7-5608-8ca3-f042c3444e0a"}},{"path":"/requiring-2fa-for-package-publishing-and-settings-modification","context":{"mdxId":"a3757046-836d-539b-8aff-c744bd263483"}},{"path":"/verifying-registry-signatures","context":{"mdxId":"3d80def4-6d17-5ed6-b57c-ba3ae046509e"}},{"path":"/verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry","context":{"mdxId":"b0617300-f370-5245-8e18-7b3f074ec5ad"}},{"path":"/adding-collaborators-to-private-packages-owned-by-a-user-account","context":{"mdxId":"1265aeaa-28ed-5446-9fb3-e272db6bd62b"}},{"path":"/changing-package-visibility","context":{"mdxId":"a6083216-2841-536c-aaa7-7148adf05d82"}},{"path":"/deprecating-and-undeprecating-packages-or-package-versions","context":{"mdxId":"ee828cfa-7b56-5963-8ded-42c3abc81e10"}},{"path":"/transferring-a-package-from-a-user-account-to-another-user-account","context":{"mdxId":"f436305c-225a-5ed4-b464-fdb7f7d9b8c5"}},{"path":"/unpublishing-packages-from-the-registry","context":{"mdxId":"8d1238b7-7bde-59b2-b084-f731213b0bad"}},{"path":"/updating-your-published-package-version-number","context":{"mdxId":"9b5f2016-386b-5b39-9579-da42ffe62e33"}},{"path":"/cli/v6/commands/npm-access","context":{"mdxId":"d624a318-4150-5c8a-aaa2-69946b51e041"}},{"path":"/cli/v6/commands/npm-adduser","context":{"mdxId":"56282ba5-718f-58fe-8c4e-7c079f7ddff2"}},{"path":"/cli/v6/commands/npm-audit","context":{"mdxId":"ce51fb4a-50b8-5d03-8a87-920dbd121e84"}},{"path":"/cli/v6/commands/npm-bin","context":{"mdxId":"35860864-7510-556a-a070-acf9316b0cb9"}},{"path":"/cli/v6/commands/npm-bugs","context":{"mdxId":"86ad796b-f3f9-55ab-a183-fecd20583d05"}},{"path":"/cli/v6/commands/npm-build","context":{"mdxId":"1b580263-503b-5bc5-bf2b-76aef1a83d85"}},{"path":"/cli/v6/commands/npm-bundle","context":{"mdxId":"3f229705-f996-5169-8477-94818e3c2515"}},{"path":"/cli/v6/commands/npm-cache","context":{"mdxId":"679734a4-84cd-5487-9280-1e027d8d83e0"}},{"path":"/cli/v6/commands/npm-ci","context":{"mdxId":"ca93a0a3-f79b-5d9a-a468-01605ba7ea46"}},{"path":"/cli/v6/commands/npm-completion","context":{"mdxId":"84cd9146-af0d-58f8-a84a-5680ca3b515d"}},{"path":"/cli/v6/commands/npm-config","context":{"mdxId":"70ca1a7f-b780-512e-a4b1-8040b72d3f81"}},{"path":"/cli/v6/commands/npm-dedupe","context":{"mdxId":"bfda055d-b160-52c2-9b5d-675ce3cdd0db"}},{"path":"/cli/v6/commands/npm-deprecate","context":{"mdxId":"9ea5feb3-b5a3-538e-9b9b-60d12f632e4b"}},{"path":"/cli/v6/commands/npm-dist-tag","context":{"mdxId":"288265f9-aebc-5ec1-bb41-cd8121edff9f"}},{"path":"/cli/v6/commands/npm-docs","context":{"mdxId":"fe5d9c8f-e7c5-5811-9fd2-410e277affde"}},{"path":"/cli/v6/commands/npm-doctor","context":{"mdxId":"b3646d42-771c-5781-8be1-d53d236233a9"}},{"path":"/cli/v6/commands/npm-edit","context":{"mdxId":"af6fd056-420d-53f4-af8e-3e7fb91d1a54"}},{"path":"/cli/v6/commands/npm-explore","context":{"mdxId":"0ffc3b3a-0889-58a4-9dcf-ebdb4092ac09"}},{"path":"/cli/v6/commands/npm-fund","context":{"mdxId":"5a1649c3-6819-5495-8548-7e6ec06e1024"}},{"path":"/cli/v6/commands/npm-help-search","context":{"mdxId":"d6d78c2a-5d49-5b55-86d1-c413aa42af84"}},{"path":"/cli/v6/commands/npm-help","context":{"mdxId":"1270eeff-8112-5ea4-8e99-789b5bca14d5"}},{"path":"/cli/v6/commands/npm-hook","context":{"mdxId":"06052cc6-757b-5f1f-8c99-ceace6591a1c"}},{"path":"/cli/v6/commands/npm-init","context":{"mdxId":"5cfa054f-6585-5be3-8a46-1263832cdbb9"}},{"path":"/cli/v6/commands/npm-install-ci-test","context":{"mdxId":"bf34eb7d-55a3-53d7-a9f8-54e074fd85db"}},{"path":"/cli/v6/commands/npm-install-test","context":{"mdxId":"8216c32a-ac02-5fa8-b76c-9afe9950119e"}},{"path":"/cli/v6/commands/npm-install","context":{"mdxId":"a378dccc-31e1-5f0e-9857-b4cf1261f588"}},{"path":"/cli/v6/commands/npm-link","context":{"mdxId":"57053709-f65f-5087-83bf-3443b5393051"}},{"path":"/cli/v6/commands/npm-logout","context":{"mdxId":"ec8a7031-474f-5f89-9b10-95183c10cae6"}},{"path":"/cli/v6/commands/npm-ls","context":{"mdxId":"a2a0f1ed-134e-5d4c-8d19-aa3f690a9800"}},{"path":"/cli/v6/commands/npm-org","context":{"mdxId":"7245ecf4-c02e-546f-bd49-cd8ceb106be1"}},{"path":"/cli/v6/commands/npm-outdated","context":{"mdxId":"637f8b33-2498-5d4c-a2e9-2430efb92643"}},{"path":"/cli/v6/commands/npm-owner","context":{"mdxId":"0294d076-5dce-5e94-a194-f4b968bc74a3"}},{"path":"/cli/v6/commands/npm-pack","context":{"mdxId":"17bb6002-5dfc-5b11-959f-e7d2130888c4"}},{"path":"/cli/v6/commands/npm-ping","context":{"mdxId":"7e64f0c2-7987-50a4-b5c9-c06836b448de"}},{"path":"/cli/v6/commands/npm-prefix","context":{"mdxId":"9cd88fad-47fb-5196-8690-2c60865a65e0"}},{"path":"/cli/v6/commands/npm-profile","context":{"mdxId":"24128289-0ed1-5e42-b9dc-01e90fe59769"}},{"path":"/cli/v6/commands/npm-prune","context":{"mdxId":"9a2f0496-4fae-53c5-8420-831106edf963"}},{"path":"/cli/v6/commands/npm-publish","context":{"mdxId":"8afb49dc-0d92-5acb-b8c6-4310c9726c7d"}},{"path":"/cli/v6/commands/npm-rebuild","context":{"mdxId":"4a8c15d0-dccb-5730-90f3-a5cb22dba3e1"}},{"path":"/cli/v6/commands/npm-repo","context":{"mdxId":"840db68c-c9c6-5e32-8954-7344d64fe0b8"}},{"path":"/cli/v6/commands/npm-restart","context":{"mdxId":"0daa3321-8d5d-5da2-8780-7ad105aef4fe"}},{"path":"/cli/v6/commands/npm-root","context":{"mdxId":"b968b4f2-5fcb-572a-8c77-5bc352403476"}},{"path":"/cli/v6/commands/npm-run-script","context":{"mdxId":"b063697b-6a4b-5d72-90b7-4d18eff43f77"}},{"path":"/cli/v6/commands/npm-search","context":{"mdxId":"e79bbd7e-191b-5c47-875b-5ca3af28cdc4"}},{"path":"/cli/v6/commands/npm-shrinkwrap","context":{"mdxId":"633fd5e1-e70b-52ca-8375-efa184a06714"}},{"path":"/cli/v6/commands/npm-star","context":{"mdxId":"3619520d-6774-5055-89fc-8e41110d643a"}},{"path":"/cli/v6/commands/npm-stars","context":{"mdxId":"4098b30d-0d4a-55b9-9ba5-eb7e0aade040"}},{"path":"/cli/v6/commands/npm-start","context":{"mdxId":"26cb4d18-2f3e-5d48-85b6-271fa5894a1c"}},{"path":"/cli/v6/commands/npm-stop","context":{"mdxId":"3cf224b5-f524-5dac-aba3-bfecc11b6f0c"}},{"path":"/cli/v6/commands/npm-team","context":{"mdxId":"0b327ca1-dada-5201-806e-64dd01ea9fdb"}},{"path":"/cli/v6/commands/npm-test","context":{"mdxId":"021e7073-2dd1-512c-a5a6-cc9571d5bee9"}},{"path":"/cli/v6/commands/npm-token","context":{"mdxId":"e44e5acb-ee4f-5c38-a922-31f086d35008"}},{"path":"/cli/v6/commands/npm-uninstall","context":{"mdxId":"ba9e47c4-ad68-5b3a-b518-ff375548c7d4"}},{"path":"/cli/v6/commands/npm-unpublish","context":{"mdxId":"5b2f6aef-4e61-5491-96cb-3e9a54f4e0b5"}},{"path":"/cli/v6/commands/npm-update","context":{"mdxId":"a9c99e3c-9a93-52ea-9525-8a54fbebd786"}},{"path":"/cli/v6/commands/npm-version","context":{"mdxId":"13138266-9a85-55ce-ae81-b3b00eff4d85"}},{"path":"/cli/v6/commands/npm-view","context":{"mdxId":"acd08402-c0e8-5aea-8655-ffd66d670b8c"}},{"path":"/cli/v6/commands/npm-whoami","context":{"mdxId":"fbf976e5-8765-596a-9b9a-28f2efd4acd3"}},{"path":"/cli/v6/commands/npm","context":{"mdxId":"cd1669d9-2598-5763-861f-0fce7ba1b4c1"}},{"path":"/cli/v6/configuring-npm/folders","context":{"mdxId":"1202a20e-a5d9-5d80-96e6-070e2c716bc3"}},{"path":"/cli/v6/configuring-npm/install","context":{"mdxId":"00b0c6ef-dcfc-5f0a-8586-7cf872054577"}},{"path":"/cli/v6/configuring-npm/npmrc","context":{"mdxId":"a22ab565-3e28-5a40-b4df-e12a9dcd1df9"}},{"path":"/cli/v6/configuring-npm/package-json","context":{"mdxId":"568a6fc8-febd-5105-8934-904fabeee747"}},{"path":"/cli/v6/configuring-npm/package-lock-json","context":{"mdxId":"16d9c3d5-46db-5161-b5d9-0ab0e248c348"}},{"path":"/cli/v6/configuring-npm/package-locks","context":{"mdxId":"1e23fd8f-c55b-587b-b99d-adf5980cfcd9"}},{"path":"/cli/v6/configuring-npm/shrinkwrap-json","context":{"mdxId":"ee207d02-c9f4-5e99-af8a-744309bf59c7"}},{"path":"/cli/v6/using-npm/config","context":{"mdxId":"b0af0d0d-c719-5cbf-a739-401713a5712b"}},{"path":"/cli/v6/using-npm/developers","context":{"mdxId":"16fb165c-4f16-5bd4-a775-1883e045389c"}},{"path":"/cli/v6/using-npm/orgs","context":{"mdxId":"5a5e55a6-af1b-51d5-bd52-89f1fe3f0181"}},{"path":"/cli/v6/using-npm/registry","context":{"mdxId":"460bacc9-db51-579e-9c7e-878cb76764b1"}},{"path":"/cli/v6/using-npm/removal","context":{"mdxId":"5b0cb7b5-9273-5a83-9253-6caedb7e5827"}},{"path":"/cli/v6/using-npm/scope","context":{"mdxId":"24f378eb-e5b7-5cd7-8466-270b73332a88"}},{"path":"/cli/v6/using-npm/scripts","context":{"mdxId":"670b3c4b-f44f-5740-a765-2174f54f48d8"}},{"path":"/cli/v6/using-npm/semver","context":{"mdxId":"accf5699-ba99-5edf-854a-9c3278cc9060"}},{"path":"/cli/v7/commands/npm-access","context":{"mdxId":"e7ff7e32-1d85-5725-9344-f82c87d91237"}},{"path":"/cli/v7/commands/npm-adduser","context":{"mdxId":"6fa754d5-9546-5dec-91a0-9f9c5c96aac5"}},{"path":"/cli/v7/commands/npm-audit","context":{"mdxId":"88386370-e4e7-5fc8-b6c7-36ee74311a49"}},{"path":"/cli/v7/commands/npm-bin","context":{"mdxId":"a2eff430-640c-5131-91f2-8dac3e3bdb37"}},{"path":"/cli/v7/commands/npm-bugs","context":{"mdxId":"16798f51-b3aa-52b8-9604-f38adc6df9cf"}},{"path":"/cli/v7/commands/npm-cache","context":{"mdxId":"bf47804f-c926-52d4-9304-cf146d1690f6"}},{"path":"/cli/v7/commands/npm-ci","context":{"mdxId":"8c392cf6-6b2c-5370-ae04-df70c70f41a1"}},{"path":"/cli/v7/commands/npm-completion","context":{"mdxId":"a249fbaa-4dd0-519e-9bbd-20f1f29e5a94"}},{"path":"/cli/v7/commands/npm-config","context":{"mdxId":"bebab92e-bf96-517b-8e2a-dd88a933261b"}},{"path":"/cli/v7/commands/npm-dedupe","context":{"mdxId":"cb6b0576-5045-5a6b-bc08-b0caf9523c34"}},{"path":"/cli/v7/commands/npm-deprecate","context":{"mdxId":"6dd5d1dd-08db-5610-b55e-27782d6315c9"}},{"path":"/cli/v7/commands/npm-diff","context":{"mdxId":"8f5c3a4d-92bf-5556-924d-5379e8e88a8b"}},{"path":"/cli/v7/commands/npm-dist-tag","context":{"mdxId":"a8fd44d5-1bc6-588f-9224-312e3af277ce"}},{"path":"/cli/v7/commands/npm-docs","context":{"mdxId":"09ad20e2-83c1-52df-a8c1-1c31b3638add"}},{"path":"/cli/v7/commands/npm-doctor","context":{"mdxId":"2d4abb52-a5c3-5075-ac4a-bb3904d99346"}},{"path":"/cli/v7/commands/npm-edit","context":{"mdxId":"d1878e1c-89d7-5a5b-a5ba-62b5753fd8cd"}},{"path":"/cli/v7/commands/npm-exec","context":{"mdxId":"a7da0e25-1e11-5b69-9b6f-ef073561e496"}},{"path":"/cli/v7/commands/npm-explain","context":{"mdxId":"7084f298-b09e-5777-9e51-535f7a5c5922"}},{"path":"/cli/v7/commands/npm-explore","context":{"mdxId":"f82da848-6eb9-5def-924f-d6f0001679ec"}},{"path":"/cli/v7/commands/npm-find-dupes","context":{"mdxId":"034a0e34-2dd2-5bf7-b5c1-7882160b4810"}},{"path":"/cli/v7/commands/npm-fund","context":{"mdxId":"31cd2341-b960-58f2-ba0b-2ba16bc02768"}},{"path":"/cli/v7/commands/npm-help-search","context":{"mdxId":"a3c74a66-d65a-57b6-bd74-1caebce4ac24"}},{"path":"/cli/v7/commands/npm-help","context":{"mdxId":"b457fa52-cbbf-5daf-8c17-1c0ccf2936f9"}},{"path":"/cli/v7/commands/npm-hook","context":{"mdxId":"ff51f4c0-bed8-5cf5-a8a6-f4fc78a0b569"}},{"path":"/cli/v7/commands/npm-init","context":{"mdxId":"5f028df4-d395-54de-a625-f56a459bd808"}},{"path":"/cli/v7/commands/npm-install-ci-test","context":{"mdxId":"c17fa124-8c80-50d6-84e8-f229dea529d2"}},{"path":"/cli/v7/commands/npm-install-test","context":{"mdxId":"161607ef-dbf8-5446-b9a5-d7663006a53e"}},{"path":"/cli/v7/commands/npm-install","context":{"mdxId":"61fac420-dca8-51aa-8b3c-a071623a42ef"}},{"path":"/cli/v7/commands/npm-link","context":{"mdxId":"92e3e89d-7f22-5c8c-9620-87a1ffa782ad"}},{"path":"/cli/v7/commands/npm-logout","context":{"mdxId":"4a34b301-60e9-5e2c-98c9-e947c9c556b6"}},{"path":"/cli/v7/commands/npm-ls","context":{"mdxId":"4af5ca60-bb04-5463-9403-3fca0b0f73b3"}},{"path":"/cli/v7/commands/npm-org","context":{"mdxId":"c8b0e66a-af1d-5858-830e-0a4cdbbe44d2"}},{"path":"/cli/v7/commands/npm-outdated","context":{"mdxId":"9beb317a-26e0-5015-be47-f4ee9420dbfd"}},{"path":"/cli/v7/commands/npm-owner","context":{"mdxId":"00d38971-3902-5c37-8bc5-7de956c879a3"}},{"path":"/cli/v7/commands/npm-pack","context":{"mdxId":"464f419c-d9f4-57e7-b345-8f04bbbacbd9"}},{"path":"/cli/v7/commands/npm-ping","context":{"mdxId":"0e4d156e-c5ad-59ba-8c39-277157e4d8ee"}},{"path":"/cli/v7/commands/npm-prefix","context":{"mdxId":"a47600b4-6983-5f75-af01-f17a8383d648"}},{"path":"/cli/v7/commands/npm-profile","context":{"mdxId":"8eb922d0-525e-5d5d-9267-8881ee5e4274"}},{"path":"/cli/v7/commands/npm-prune","context":{"mdxId":"2b7c3fe7-6405-5a9e-892d-4ff8cea7eb9c"}},{"path":"/cli/v7/commands/npm-publish","context":{"mdxId":"a743a29a-5b4f-559b-912f-7f05f7f26137"}},{"path":"/cli/v7/commands/npm-rebuild","context":{"mdxId":"3824ff58-799e-594e-bca9-776510c14b93"}},{"path":"/cli/v7/commands/npm-repo","context":{"mdxId":"887969cc-7751-57a7-a5b5-9c462c18636a"}},{"path":"/cli/v7/commands/npm-restart","context":{"mdxId":"6c79b87e-77d5-5aad-baed-567fddc64d8e"}},{"path":"/cli/v7/commands/npm-root","context":{"mdxId":"b39fa7c0-63f8-5144-847a-6c4e6aa8d8ae"}},{"path":"/cli/v7/commands/npm-run-script","context":{"mdxId":"5c327b30-18ac-51da-bf25-edc965ba69d3"}},{"path":"/cli/v7/commands/npm-search","context":{"mdxId":"836e67e5-a647-5aa9-87e8-27f56cfdf2e8"}},{"path":"/cli/v7/commands/npm-set-script","context":{"mdxId":"31004e96-d9ed-5493-ad17-2aca30623efe"}},{"path":"/cli/v7/commands/npm-shrinkwrap","context":{"mdxId":"5920d16a-49e2-5581-8060-e9503d34982b"}},{"path":"/cli/v7/commands/npm-star","context":{"mdxId":"6f29e981-b6f6-5362-b0d4-3352d9ea8e05"}},{"path":"/cli/v7/commands/npm-stars","context":{"mdxId":"1d6acaae-7a38-5903-a434-336385d928f4"}},{"path":"/cli/v7/commands/npm-start","context":{"mdxId":"c3f4e901-ffcb-54cc-a011-42dc3067d44b"}},{"path":"/cli/v7/commands/npm-stop","context":{"mdxId":"1420fb3a-5e96-5216-a957-9c7aa4c1b1f9"}},{"path":"/cli/v7/commands/npm-team","context":{"mdxId":"71e84cf3-4495-5f0d-bf37-f3eaaa6feb95"}},{"path":"/cli/v7/commands/npm-token","context":{"mdxId":"6c462675-8461-5cf4-8193-807919c74acb"}},{"path":"/cli/v7/commands/npm-uninstall","context":{"mdxId":"320ab1bd-2f0c-541e-ab61-7cf375bea282"}},{"path":"/cli/v7/commands/npm-pkg","context":{"mdxId":"114ebf38-6fbb-5e37-b4ed-194a9aa2c66a"}},{"path":"/cli/v7/commands/npm-test","context":{"mdxId":"7462132d-117d-5537-bba0-863d414bae64"}},{"path":"/cli/v7/commands/npm-unpublish","context":{"mdxId":"5baa5b13-d638-524f-96bc-51147bf7f43d"}},{"path":"/cli/v7/commands/npm-unstar","context":{"mdxId":"3beb4345-53ff-574c-831f-ebe19f6b6c73"}},{"path":"/cli/v7/commands/npm-update","context":{"mdxId":"81ab79d5-0d7d-58a5-8dbf-a967653433a5"}},{"path":"/cli/v7/commands/npm-version","context":{"mdxId":"68679a7c-6822-5f52-a542-2dd03dd9f9b7"}},{"path":"/cli/v7/commands/npm-view","context":{"mdxId":"51fdf0d7-98e6-5e39-a5ed-72589974fcf4"}},{"path":"/cli/v7/commands/npm-whoami","context":{"mdxId":"9a411c16-6bdf-5624-86c4-530ad73d8737"}},{"path":"/cli/v7/commands/npm","context":{"mdxId":"c67d2d8a-d4d7-5914-a105-b11284989c63"}},{"path":"/cli/v7/commands/npx","context":{"mdxId":"4951d9e9-e6f0-515f-919b-3b241a4a77df"}},{"path":"/cli/v7/configuring-npm/folders","context":{"mdxId":"c3cdd065-8e5d-57c3-8c93-ffc8c7f2e3df"}},{"path":"/cli/v7/configuring-npm/install","context":{"mdxId":"ac1f7eab-a8a2-596f-bbd5-80f54622556c"}},{"path":"/cli/v7/configuring-npm/npm-shrinkwrap-json","context":{"mdxId":"02b4ec89-5fe3-55b0-b6d3-40c19a22b3cb"}},{"path":"/cli/v7/configuring-npm/npmrc","context":{"mdxId":"2c704256-0af7-555a-9b64-7add3304297d"}},{"path":"/cli/v7/configuring-npm/package-json","context":{"mdxId":"a5e1ef81-4ddc-54f2-89b8-763371b37501"}},{"path":"/cli/v7/configuring-npm/package-lock-json","context":{"mdxId":"a6319cac-d605-58c7-8b74-92fca056d166"}},{"path":"/cli/v7/using-npm/config","context":{"mdxId":"37e8c8d2-e100-5dd8-be22-072bd9b82ec0"}},{"path":"/cli/v7/using-npm/developers","context":{"mdxId":"a5d1b33b-39ab-5eed-85eb-5b47a6bed611"}},{"path":"/cli/v7/using-npm/orgs","context":{"mdxId":"69ffd118-9ebd-5bbf-89a2-e2a06aab83f8"}},{"path":"/cli/v7/using-npm/registry","context":{"mdxId":"6e5f4e6c-c2cd-5a18-8afb-8822b2510cac"}},{"path":"/cli/v7/using-npm/removal","context":{"mdxId":"ebb1f7c2-3f53-5025-afd4-4ad0d15d5e09"}},{"path":"/cli/v7/using-npm/scope","context":{"mdxId":"c44adc73-8011-526b-96ac-ab542498101a"}},{"path":"/cli/v7/using-npm/scripts","context":{"mdxId":"89e71711-8ca2-5444-9e80-3009de874c75"}},{"path":"/cli/v7/using-npm/workspaces","context":{"mdxId":"e4d99073-6d94-5970-a315-ffd475a8a6f4"}},{"path":"/cli/v8/commands/npm-access","context":{"mdxId":"9e1cf2b7-8077-5a2b-baad-d541874371f8"}},{"path":"/cli/v8/commands/npm-adduser","context":{"mdxId":"807ad805-e0fa-5a67-b915-fc66bb5765dc"}},{"path":"/cli/v8/commands/npm-audit","context":{"mdxId":"f45751f0-5017-59fa-ab57-24c8032f38ae"}},{"path":"/cli/v8/commands/npm-bin","context":{"mdxId":"41cb78aa-5103-553f-aae4-0cff29b49844"}},{"path":"/cli/v8/commands/npm-bugs","context":{"mdxId":"9e82858c-dee7-5819-bca7-fb7387be2785"}},{"path":"/cli/v8/commands/npm-cache","context":{"mdxId":"e4f3e4a7-c91e-554c-bea2-9dd97c2516e5"}},{"path":"/cli/v8/commands/npm-ci","context":{"mdxId":"74595d8e-ae40-5317-b911-7bcbebfe2811"}},{"path":"/cli/v8/commands/npm-completion","context":{"mdxId":"c7530471-97cd-5b09-852d-acd78fba60d7"}},{"path":"/cli/v8/commands/npm-config","context":{"mdxId":"387f6ca8-7caa-5065-8e51-6a2130bb1520"}},{"path":"/cli/v8/commands/npm-dedupe","context":{"mdxId":"ab6cb983-a718-5163-866f-ecfd28881471"}},{"path":"/cli/v8/commands/npm-deprecate","context":{"mdxId":"ba6071b7-b334-543e-b9bc-6774a82b4431"}},{"path":"/cli/v8/commands/npm-diff","context":{"mdxId":"855b8429-5f89-57ff-9569-ad00a2729f0a"}},{"path":"/cli/v8/commands/npm-dist-tag","context":{"mdxId":"bde3c7fe-0c94-54af-a454-34a9c7df3b03"}},{"path":"/cli/v8/commands/npm-docs","context":{"mdxId":"85dd98f3-3efa-510d-b1a7-1725a8a601a4"}},{"path":"/cli/v8/commands/npm-doctor","context":{"mdxId":"dfc35685-5cd0-5759-8030-de2ed10de543"}},{"path":"/cli/v8/commands/npm-edit","context":{"mdxId":"badee149-e3d9-5f04-8dda-7aeba2f67c0b"}},{"path":"/cli/v8/commands/npm-exec","context":{"mdxId":"f8e7bee1-8b47-5590-b365-ad8201352ec3"}},{"path":"/cli/v8/commands/npm-explain","context":{"mdxId":"94820ccb-b357-5be4-a341-2574eaa456c1"}},{"path":"/cli/v8/commands/npm-explore","context":{"mdxId":"7a350c56-f0fa-5d75-ae5a-b225f528e145"}},{"path":"/cli/v8/commands/npm-find-dupes","context":{"mdxId":"9940d031-4795-5ffc-8677-fd1617309847"}},{"path":"/cli/v8/commands/npm-fund","context":{"mdxId":"6507d9a2-f327-5071-865d-8cb2e1f22a4f"}},{"path":"/cli/v8/commands/npm-help-search","context":{"mdxId":"af6f076b-da37-5fd1-bdca-cbf13db29b81"}},{"path":"/cli/v8/commands/npm-help","context":{"mdxId":"3d002cb3-7aaf-5067-a0b6-694a8ba3c58e"}},{"path":"/cli/v8/commands/npm-hook","context":{"mdxId":"f041fd7c-083e-52c6-b961-452926a759e4"}},{"path":"/cli/v8/commands/npm-init","context":{"mdxId":"d2d306f1-df79-5ea6-bc8f-32a79bf21a8a"}},{"path":"/cli/v8/commands/npm-install-ci-test","context":{"mdxId":"1c867688-2e6e-5b9f-bf8c-10f931dff00f"}},{"path":"/cli/v8/commands/npm-install-test","context":{"mdxId":"6b403260-b522-5a4d-9be0-d22be88e0469"}},{"path":"/cli/v8/commands/npm-install","context":{"mdxId":"0f785701-b98b-58e3-af06-47729d726c08"}},{"path":"/cli/v8/commands/npm-link","context":{"mdxId":"8fe938fd-4e87-5a06-b8b0-ecac4db11bce"}},{"path":"/cli/v8/commands/npm-logout","context":{"mdxId":"6ea5fc03-3f2b-5ddc-8fa7-67d322535018"}},{"path":"/cli/v8/commands/npm-ls","context":{"mdxId":"b9eb7c48-4e78-5cdd-bd16-2efbd8815ccc"}},{"path":"/cli/v8/commands/npm-org","context":{"mdxId":"263aebb9-71d6-5984-b3f7-0588c7390398"}},{"path":"/cli/v8/commands/npm-outdated","context":{"mdxId":"4411ef20-5ceb-5aae-9e57-e794235471a7"}},{"path":"/cli/v8/commands/npm-owner","context":{"mdxId":"4a8d2b8b-06bc-5d47-9452-050a5b343e4e"}},{"path":"/cli/v8/commands/npm-pack","context":{"mdxId":"0788c762-9a5a-5d2d-a615-a08c43ec12fd"}},{"path":"/cli/v8/commands/npm-ping","context":{"mdxId":"fdb3a132-aa59-51c6-9b6d-7a7e7afd5f74"}},{"path":"/cli/v8/commands/npm-pkg","context":{"mdxId":"0c697b3f-9b75-5d1b-b92a-2703ec65becf"}},{"path":"/cli/v8/commands/npm-prefix","context":{"mdxId":"0f1ea88a-6940-5102-a602-52fe2ff26eb4"}},{"path":"/cli/v8/commands/npm-profile","context":{"mdxId":"086ed878-72ef-5eee-862f-838ee2d27619"}},{"path":"/cli/v8/commands/npm-prune","context":{"mdxId":"ed459709-c2b3-58bf-83cb-753e1e5923d6"}},{"path":"/cli/v8/commands/npm-publish","context":{"mdxId":"c4353618-df7a-563c-81ce-0bd5ba21544d"}},{"path":"/cli/v8/commands/npm-query","context":{"mdxId":"64088d32-2c82-599c-aa11-7870a8c723fb"}},{"path":"/cli/v8/commands/npm-rebuild","context":{"mdxId":"15b744c5-0d5e-584a-a86e-29bbb77425fb"}},{"path":"/cli/v8/commands/npm-repo","context":{"mdxId":"f897c56c-fea5-5825-857f-3fa7e0fc46eb"}},{"path":"/cli/v8/commands/npm-restart","context":{"mdxId":"e6fa4bd9-8b19-57b9-96f5-97fb79134920"}},{"path":"/cli/v8/commands/npm-root","context":{"mdxId":"c568fd7b-5955-5dfb-a640-7d54623206c7"}},{"path":"/cli/v8/commands/npm-run-script","context":{"mdxId":"e2ea6842-7f0d-5ab5-84e9-7fa60b1c4515"}},{"path":"/cli/v8/commands/npm-search","context":{"mdxId":"93c75ec0-0a54-5db5-86dd-e04ab735350a"}},{"path":"/cli/v8/commands/npm-set-script","context":{"mdxId":"d7fb7c7d-5475-5562-8c44-94b4106af00b"}},{"path":"/cli/v8/commands/npm-shrinkwrap","context":{"mdxId":"4105a0a8-eaad-5479-bc30-507893bc42a4"}},{"path":"/cli/v8/commands/npm-star","context":{"mdxId":"870f1f7b-1b54-5e85-b4a7-b2a12e9e8476"}},{"path":"/cli/v8/commands/npm-stars","context":{"mdxId":"9957d85b-5e60-5b62-92e6-e60ae524ac6f"}},{"path":"/cli/v8/commands/npm-start","context":{"mdxId":"fdc42464-fef4-50b1-b5bd-0c74175a32b1"}},{"path":"/cli/v8/commands/npm-stop","context":{"mdxId":"afa26034-1cad-5ba1-8868-89cd2e6b7c7f"}},{"path":"/cli/v8/commands/npm-team","context":{"mdxId":"15718390-db95-53f6-83e4-e4f4a84686b4"}},{"path":"/cli/v8/commands/npm-test","context":{"mdxId":"9d9e0081-8706-5858-8e58-c62a0b73f073"}},{"path":"/cli/v8/commands/npm-token","context":{"mdxId":"7e69f53a-9e8f-5304-b360-e392b3954c28"}},{"path":"/cli/v8/commands/npm-uninstall","context":{"mdxId":"caa95e3e-26ba-54bc-b566-837773fc5cf8"}},{"path":"/cli/v8/commands/npm-unpublish","context":{"mdxId":"473b70f8-74e8-5755-9fdb-9a987cf51772"}},{"path":"/cli/v8/commands/npm-unstar","context":{"mdxId":"89a5805a-79ef-5154-9bf1-6f59bf94b3bc"}},{"path":"/cli/v8/commands/npm-update","context":{"mdxId":"38fcc792-48b7-5d19-a864-a70b67afc842"}},{"path":"/cli/v8/commands/npm-version","context":{"mdxId":"de55c5f6-1365-57cb-b436-60aff074c455"}},{"path":"/cli/v8/commands/npm-view","context":{"mdxId":"267b3424-d2be-55f3-9553-b1d1a38edfac"}},{"path":"/cli/v8/commands/npm-whoami","context":{"mdxId":"cafb160d-a5a9-534c-b4db-0e1925967703"}},{"path":"/cli/v8/commands/npm","context":{"mdxId":"cc6085dd-bac8-56be-9553-a58d68e05fcb"}},{"path":"/cli/v8/commands/npx","context":{"mdxId":"ce87dd30-adc8-555f-87a7-0ebfb39663a3"}},{"path":"/cli/v8/configuring-npm/folders","context":{"mdxId":"0a7c66dc-11b1-5df5-b5f6-b3eef1b51bdc"}},{"path":"/cli/v8/configuring-npm/install","context":{"mdxId":"ba12195a-d639-551a-aab9-5530d52b971a"}},{"path":"/cli/v8/configuring-npm/npm-shrinkwrap-json","context":{"mdxId":"29095609-5382-5cbd-a5c6-a7e976c73f35"}},{"path":"/cli/v8/configuring-npm/npmrc","context":{"mdxId":"78b06ed3-9ebd-51a2-a59a-8d42c64c69fa"}},{"path":"/cli/v8/configuring-npm/package-json","context":{"mdxId":"028add9e-cc31-5167-ab1e-3181ca331a85"}},{"path":"/cli/v8/configuring-npm/package-lock-json","context":{"mdxId":"530eb4bf-8335-5d6b-8cd2-02011e4c1b04"}},{"path":"/cli/v8/using-npm/config","context":{"mdxId":"5ce52e22-945d-5201-a997-293db7c88bb9"}},{"path":"/cli/v8/using-npm/dependency-selectors","context":{"mdxId":"088968c3-b245-5617-904d-444fcb15ee19"}},{"path":"/cli/v8/using-npm/developers","context":{"mdxId":"e70187e3-9daf-5c36-807c-3d592314f427"}},{"path":"/cli/v8/using-npm/logging","context":{"mdxId":"c7e445fd-e34c-52d7-8bd0-9b88f376852a"}},{"path":"/cli/v8/using-npm/orgs","context":{"mdxId":"ec078305-4a20-5ecc-a386-adf491a9e5b8"}},{"path":"/cli/v8/using-npm/package-spec","context":{"mdxId":"b934461a-391f-5a50-89b7-e4784a65e69a"}},{"path":"/cli/v8/using-npm/registry","context":{"mdxId":"9e22921e-14d6-56db-9059-fed1aafc58bc"}},{"path":"/cli/v8/using-npm/removal","context":{"mdxId":"29df584a-4bac-57db-8f97-232985d190ac"}},{"path":"/cli/v8/using-npm/scope","context":{"mdxId":"083f25c0-000c-5a0b-b396-1e3e9297c5e2"}},{"path":"/cli/v8/using-npm/scripts","context":{"mdxId":"d42b64d5-de06-5b84-a7d2-e856a6592efe"}},{"path":"/cli/v8/using-npm/workspaces","context":{"mdxId":"8b045aed-b7f2-58d8-90cb-eb206ffaae59"}},{"path":"/using-npm-packages-in-your-projects","context":{"mdxId":"9d2d08dd-753e-5630-8adb-cbce90506ae8"}},{"path":"/about-private-packages","context":{"mdxId":"25144378-3db6-5cce-bd22-6683b13abe00"}},{"path":"/about-packages-and-modules","context":{"mdxId":"7ae02fc8-d625-545d-b259-c93500eb9ee0"}},{"path":"/about-npm","context":{"mdxId":"ca8a760e-3a4c-5184-a59d-d2242e27efcb"}},{"path":"/enterprise","context":{"mdxId":"028ebb4b-3500-54d5-bf3f-b8a1f287451c"}},{"path":"/getting-started","context":{"mdxId":"04274fc7-1338-5e10-b60b-7be57c867f00"}},{"path":"/integrations","context":{"mdxId":"d7674a58-c742-5bc8-bafe-b9e142e0d57d"}},{"path":"/organizations","context":{"mdxId":"e0c85eb9-b9f8-5c9a-819b-1a7880d33b12"}},{"path":"/packages-and-modules","context":{"mdxId":"eccb2d02-faa7-565b-8b28-d64a7a57d101"}},{"path":"/policies","context":{"mdxId":"8f42541a-3144-5a1f-9b52-1d0be7494041"}},{"path":"/threat-model","context":{"mdxId":"27d0e45a-c6f3-5803-a221-80214291ea48"}},{"path":"/threats-and-mitigations","context":{"mdxId":"7158c724-9c2a-565d-92ff-6578d7109572"}},{"path":"/cli/v6","context":{"mdxId":"b6b595e6-dd79-5408-8a15-e0f1eb23f2f2"}},{"path":"/cli/v7","context":{"mdxId":"cf3d1260-5cde-50ba-b9a5-7020064b4026"}},{"path":"/cli/v8","context":{"mdxId":"5945124b-6fd0-5093-83ab-10d112bbc1d7"}},{"path":"/getting-started/configuring-your-local-environment","context":{"mdxId":"79ab481a-0efa-5b4f-b2c4-f82b9ae653d9"}},{"path":"/getting-started/managing-your-npm-user-account","context":{"mdxId":"79918654-ea33-5d1b-93ed-9deccb835597"}},{"path":"/getting-started/paying-for-your-npm-user-account","context":{"mdxId":"6c308500-2421-504c-95c4-32388d387e13"}},{"path":"/getting-started/setting-up-your-npm-user-account","context":{"mdxId":"84f0a524-25f4-5345-bc50-a418eb566be7"}},{"path":"/getting-started/troubleshooting","context":{"mdxId":"e25ebdc2-c7ef-518e-83b5-624f48c83cf9"}},{"path":"/integrations/integrating-npm-with-external-services","context":{"mdxId":"f8cd157e-8a3f-50a3-a046-2dfec43015e7"}},{"path":"/organizations/creating-and-managing-organizations","context":{"mdxId":"bfd9f364-1fe3-5d20-b2a4-8853785df1de"}},{"path":"/organizations/managing-organization-members","context":{"mdxId":"dc2c43b3-b477-5396-8251-139f8641b1cd"}},{"path":"/organizations/managing-organization-packages","context":{"mdxId":"9af8ca32-da0e-5671-b7d7-0c407e7e5483"}},{"path":"/organizations/managing-teams","context":{"mdxId":"2031dcee-80dc-59db-9ec2-c3066a6eadaf"}},{"path":"/organizations/paying-for-your-organization","context":{"mdxId":"836ab02c-0d62-597a-821c-9517a681cbd5"}},{"path":"/packages-and-modules/contributing-packages-to-the-registry","context":{"mdxId":"80254e39-35b3-5d35-857a-d58e7e7b37b7"}},{"path":"/packages-and-modules/getting-packages-from-the-registry","context":{"mdxId":"84e0994f-cac8-519c-bb23-29b12eef7d5a"}},{"path":"/packages-and-modules/introduction-to-packages-and-modules","context":{"mdxId":"588f6e3e-c67f-541c-8243-3817fbec39b9"}},{"path":"/packages-and-modules/securing-your-code","context":{"mdxId":"d27213fb-a92e-5cb5-a94c-68f75a86e15c"}},{"path":"/packages-and-modules/updating-and-managing-your-published-packages","context":{"mdxId":"bae3e6a3-91bf-5d92-b195-f8158b88b73e"}},{"path":"/cli/v6/commands","context":{"mdxId":"87031dd6-68de-5593-aa55-54ed06e097c4"}},{"path":"/cli/v6/configuring-npm","context":{"mdxId":"ac1449fc-d310-57b6-aff7-0e249eeea809"}},{"path":"/cli/v6/using-npm","context":{"mdxId":"85305637-95c5-5056-9737-0fe8421cb564"}},{"path":"/cli/v7/commands","context":{"mdxId":"1e4a42f7-70c5-5822-9379-bf6975f29371"}},{"path":"/cli/v7/configuring-npm","context":{"mdxId":"c39a8ccf-31b9-54ad-8ec6-380771444e62"}},{"path":"/cli/v7/using-npm","context":{"mdxId":"164ebdc3-0327-5e83-a3eb-eb7c7ece7890"}},{"path":"/cli/v8/commands","context":{"mdxId":"143c4a34-fcea-5e3c-a658-700920630a83"}},{"path":"/cli/v8/configuring-npm","context":{"mdxId":"dc3a7271-626c-5899-8918-66844c6d084d"}},{"path":"/cli/v8/using-npm","context":{"mdxId":"ddfb8523-0b66-5825-9426-9df1ac3cae04"}}]}}}