I am not able to find the package.json for global node modules. Where is this global package.json file found? If it does not exist, how does node.js keep track of global node modules?
There is no global package.json
npm doesn't keep track of globals, really. It just installs them in a common node_modules folder.
The binary or command file for the module is symlinked into an executable folder. for example, on my mac, the symlinks point to /user/local/bin
To install a global module, use the -g option when installing.
for example:
npm install -g express-generator
This will install the express-generator module into the global npm node_modules folder, and create the needed symlink to execute the express command line tool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With