Tutorial by Examples

If you installed Node using the default directory, while in the global mode, NPM installs packages into /usr/local/lib/node_modules. If you type the following in the shell, NPM will search for, download, and install the latest version of the package named sax inside the directory /usr/local/lib/node...
When we refer the module in the code, node first looks up the node_module folder inside the referenced folder in required statement If the module name is not relative and is not a core module, Node will try to find it inside the node_modules folder in the current directory. For instance, if you do...

Page 1 of 1