Skip to content

Commit

Permalink
docs: add some more docs for --install-links
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf authored and lukekarrys committed Apr 19, 2022
1 parent bedd8a1 commit a6ea884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/content/commands/npm-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ In short, the main differences between using `npm install` and `npm ci` are:

NOTE: If you create your `package-lock.json` file by running `npm install`
with flags that can affect the shape of your dependency tree, such as
`--legacy-peer-deps`, you _must_ provide the same flags to `npm ci` or you
are likely to encounter errors. An easy way to do this is to run
`--legacy-peer-deps` or `--install-links`, you _must_ provide the same
flags to `npm ci` or you are likely to encounter errors. An easy way to do
this is to run, for example,
`npm config set legacy-peer-deps=true --location=project` and commit the
`.npmrc` file to your repo.

Expand Down
4 changes: 2 additions & 2 deletions docs/content/commands/npm-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ into a tarball (b).
*npm will not install the package dependencies* in the directory `<folder>`,
but it will create a symlink to `<folder>`.

> 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 [`npm pack`](/commands/npm-pack) while in the `<folder>` directory, and then install the resulting tarball instead of the `<folder>` using `npm install <tarball file>`
> 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.
Example:

```bash
npm install ../../other-package
npm install ../../other-package --install-links
npm install ./sub-package
```

Expand Down

0 comments on commit a6ea884

Please sign in to comment.