Skip to content

doc: align module resolve algorithm with implementation

In docs, it reads like GLOBAL_FOLDERS takes precedence over node_module, but in implementation, GLOBAL_FOLDERS is appended to the last of paths to resolve. It should take lowest priority.

https://github.com/nodejs/node/blob/f1cbaea74b432a49af61293e005f8d7e7f56325c/lib/internal/modules/cjs/loader.js#L678

Fixes: https://github.com/nodejs/node/issues/38128

Merge request reports

Loading