IT:AD:Node.JS:Concepts:Local v. Global Packages

Summary

When ever you require packages, it looks in the local directory for a sub dir called node_modules.

If not found, searches recursively upwards for same folder, until found (or not).

Each Package that in turn requires other packages, will download the package in its directory – keeping everything completely separate. Nice!

It gets rid of global clashes.

So why use global? Becase some packages contain *.exes – which implies PATH, etc – and that's easier to manage in a global location.

  • /home/skysigal/public_html/data/pages/it/ad/node.js/concepts/local_v._global_packages.txt
  • Last modified: 2023/11/04 01:51
  • by 127.0.0.1