Node Modules

  • Node modules are added into a npm project after running command “npm install <package>”
  • “node_modules” folder is created inside the parent folder.
  • under node_modules we will have a directory for each package
  • Under this package folder inside node_modules you will have these directories and files
    • src directory
    • min directory
    • locale directory
    • dist directory
    • package.json file
    • etc
  • Note, node_module folder is always heavy and we do not provide it or commit it, it should automatically be downloaded at the system in which source code is compiled using command “npm install”
  • npm install command will download the node_modules based on package.json and package-lock.json or if you provide a package name at the end of the command(point 1)

Leave a Comment