Skip to content

Commit

Permalink
doc: simplify circular dependencies text in modules.md
Browse files Browse the repository at this point in the history
PR-URL: #35126
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Nov 16, 2020
1 parent 548137f commit 884755f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ may be necessary to install a specific version of package `bar`. The `bar`
package may itself have dependencies, and in some cases, these may even collide
or form cyclic dependencies.

Since Node.js looks up the `realpath` of any modules it loads (that is,
resolves symlinks), and then looks for their dependencies in the `node_modules`
folders as described [here](#modules_loading_from_node_modules_folders), this
situation is very simple to resolve with the following architecture:
Because Node.js looks up the `realpath` of any modules it loads (that is, it
resolves symlinks) and then [looks for their dependencies in `node_modules` folders](#modules_loading_from_node_modules_folders),
this situation can be resolved with the following architecture:

* `/usr/lib/node/foo/1.2.3/`: Contents of the `foo` package, version 1.2.3.
* `/usr/lib/node/bar/4.3.2/`: Contents of the `bar` package that `foo` depends
Expand Down

0 comments on commit 884755f

Please sign in to comment.