From 1a141baf5d6943441b68ae455e65096ebf108828 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. --- doc/api/modules.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/modules.md b/doc/api/modules.md index cb14c8face77ae..eb22f09c32cfdd 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"