title: Node.js - path for 'require()' function on different OS
body: <p>When working with paths in Node.js I have usually used the path module and 'path.join()' to ensure that the paths can be resolved regardless of the OS that runs the server. However, I am not doing that when I require modules. On the node website, they aren't doing it either (<a href="https://nodejs.org/en/knowledge/getting-started/what-is-require/" rel="nofollow noreferrer">https://nodejs.org/en/knowledge/getting-started/what-is-require/</a>). It is done though when serving files for example. If the reason for using the path module when serving files is that a given path may be resolved correctly regardless of the OS, then I do not understand why it is not required when using the 'require' function. Can someone explain? :)</p>