| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5777c79 commit 4f168a4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -368,11 +368,11 @@ example, then `require('./some-library')` would attempt to load: | |||
| 368 | 368 | ||
| 369 | 369 | <!--type=misc--> | |
| 370 | 370 | ||
| 371 | - If the module identifier passed to `require()` is not a native module, | ||
| 372 | - and does not begin with `'/'`, `'../'`, or `'./'`, then Node.js starts at the | ||
| 373 | - parent directory of the current module, and adds `/node_modules`, and | ||
| 374 | - attempts to load the module from that location. Node will not append | ||
| 375 | - `node_modules` to a path already ending in `node_modules`. | ||
| 371 | + If the module identifier passed to `require()` is not a | ||
| 372 | + [core](#modules_core_modules) module, and does not begin with `'/'`, `'../'`, or | ||
| 373 | + `'./'`, then Node.js starts at the parent directory of the current module, and | ||
| 374 | + adds `/node_modules`, and attempts to load the module from that location. Node | ||
| 375 | + will not append `node_modules` to a path already ending in `node_modules`. | ||
| 376 | 376 | ||
| 377 | 377 | If it is not found there, then it moves to the parent directory, and so | |
| 378 | 378 | on, until the root of the file system is reached. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments