Welcome to the Linux Foundation Forum!

Node Module System | ESM



I just finished Chapter 07 NODE'S MODULE SYSTEM.
What I want to ask is that do you have plan to release the ESM version of the chapter?

Also why does require.resolve('fs') just returns 'fs', and not the full path?


  • davidmarkclements

    hey @toramanomer - yes, this chapter is being updated to Node's Module Systems (pluralised) and will discuss ESM. It should be released this month (if not early next month).

    There is no full path to Node core modules such as fs, these are libraries that come included with the Node binary, these are known as builtin modules. Builtin modules resolve to their namespace, this is why require.resolve('fs') resolves to fs.


Upcoming Training