From d0f5bc1aa74466174746f7e23e672f24b3810b18 Mon Sep 17 00:00:00 2001 From: Alex Zherdev Date: Fri, 11 Oct 2019 16:01:34 -0700 Subject: [PATCH] doc: fix an error in resolution algorithm steps As it is, if `X begins with './' or '/' or '../'` (step 3), it reads as if it were possible for the algorithm to do a node_modules lookup (step 4). But that doesn't seem to reflect the actual logic. PR-URL: https://github.com/nodejs/node/pull/29940 Reviewed-By: Ben Noordhuis Reviewed-By: Jan Krems Reviewed-By: Ruben Bridgewater Reviewed-By: Anto Aravinth Reviewed-By: James M Snell --- doc/api/modules.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/modules.md b/doc/api/modules.md index 2e74d2c95e03d1..8ae5c2f819a360 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -159,6 +159,7 @@ require(X) from module at path Y 3. If X begins with './' or '/' or '../' a. LOAD_AS_FILE(Y + X) b. LOAD_AS_DIRECTORY(Y + X) + c. THROW "not found" 4. LOAD_NODE_MODULES(X, dirname(Y)) 5. THROW "not found"