Skip to content

Commit

Permalink
fixup! doc: clarify some points around Corepack
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Aug 25, 2021
1 parent ed3f421 commit 0fed151
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 12 additions & 1 deletion doc/api/corepack.md
Expand Up @@ -78,7 +78,18 @@ The following binaries are provided through Corepack:
| [Yarn][] | `yarn`, `yarnpkg` |
| [pnpm][] | `pnpm`, `pnpx` |

## Troubleshooting
## Common questions

### How does Corepack currently interact with npm?

While Corepack could easily support npm like any other package manager, its
shims aren't currently enabled by default. This has a few consequences:

* It's always possible to run a `npm` command within a project configured to
be used with another package manager, since Corepack cannot intercept it.

* While `npm` is a valid option in the [`"packageManager"`][] property, the
lack of shim will cause the global npm to be used.

### Running `npm install -g yarn` doesn't work

Expand Down
5 changes: 3 additions & 2 deletions doc/api/packages.md
Expand Up @@ -167,8 +167,9 @@ tool called [Corepack][] that aims to make all package managers transparently
available in your environment - provided you have Node.js installed.

By default Corepack won't enforce any specific package manager and will use
generic "Last Known Good" versions, but you can improve this experience by
setting the [`"packageManager"`][] field in your project's `package.json`.
the generic "Last Known Good" versions associated with each Node.js release,
but you can improve this experience by setting the [`"packageManager"`][] field
in your project's `package.json`.

## Package entry points

Expand Down

0 comments on commit 0fed151

Please sign in to comment.