I just realized that in the node_modules
folder, there are several .package-lock.json
files. What is the use of them? And how are they different from the package-lock.json
file in the top level folder?
CodePudding user response:
For the package-lock in your node_modules : Those are the informations such as versions, name, author, dependancies,..etc from the respective libraries you installed in your project.
For the package-lock in your root folder : Same informations but directly related to your project.
CodePudding user response:
So basically every module node_modules
is just a node project created by someone just like yours and you're installing it as a dependency so it gets added to your package-lock
, so if this someone installed another module to help make theirs (dependency) it will get added to his package-lock