Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix list indentation in corepack.md #40029

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/api/corepack.md
Expand Up @@ -73,10 +73,10 @@ The `prepare` command has [various flags][], consult the detailed

The following binaries are provided through Corepack:

| Package manager | Binary names |
| --------------- | -------------- |
| Package manager | Binary names |
| --------------- | ----------------- |
| [Yarn][] | `yarn`, `yarnpkg` |
| [pnpm][] | `pnpm`, `pnpx` |
| [pnpm][] | `pnpm`, `pnpx` |

## Common questions

Expand All @@ -86,23 +86,23 @@ 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.
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.
lack of shim will cause the global npm to be used.

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

npm prevents accidentally overriding the Corepack binaries when doing a global
install. To avoid this problem, consider one of the following options:

* Don't run this command anymore; Corepack will provide the package manager
binaries anyway and will ensure that the requested versions are always
available, so installing the package managers explicitly isn't needed anymore.
binaries anyway and will ensure that the requested versions are always
available, so installing the package managers explicitly isn't needed anymore.

* Add the `--force` to `npm install`; this will tell npm that it's fine to
override binaries, but you'll erase the Corepack ones in the process (should
that happen, run [`corepack enable`][] again to add them back).
override binaries, but you'll erase the Corepack ones in the process (should
that happen, run [`corepack enable`][] again to add them back).

[Corepack]: https://github.com/nodejs/corepack
[Corepack documentation]: https://github.com/nodejs/corepack#readme
Expand Down