5. MODULE REQUIRE TYPEMODULE REQUIRE TYPE
Directly module require, e.g. require('express')
It will rst check built-in module, then node_modules and
../node_modules and ../../node_modules until root folder.
Path speci c require, e.g. require('./my-module')
Using when not npm nodule or built-in module
6. MODULE REQUIRE ORDERMODULE REQUIRE ORDER
1. Cache (Module will be stored in cache when rst time
require)
2. Built-in module
3. Current folder
4. Parent folder until root
7. MODULE REQUIRE SUFFIXMODULE REQUIRE SUFFIX
require() will automatically add .js, .json, .node
suf x, it is suggested to add .json , .node suf x so it could
be found faster.