Repository navigation
Conversation
The `npm install` docs described global mode as installing "the current package context ... as a global package" without saying whether the package's own dependencies are installed locally. Users migrating from npm 6 reported `UNMET DEPENDENCY` after `npm install -g`, because since npm 7 no `node_modules` is created in the current directory. Add a note spelling out that global mode installs the package context itself and that a separate `npm install` is still needed for the local dependencies. Closes: npm#2968
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a note to
npm install's global-mode description:npm install -gin a package directory installs the current package context globally and does not create a localnode_modulesin that directory, so if the package should also work locally, run a plainnpm installthere.Status / please decide: #2968 is labeled Needs Discussion and reports this as a bug in v7. This PR only documents the current behavior described in the issue; it does not change install behavior, and if the team decides the behavior should change, this note should not be merged. Refs #2968.
No tests run (docs only).
AI assistance disclosure: this change was prepared with the help of an AI coding agent (Grok Bot). The account owner has not reviewed every line in detail; please treat it accordingly.