How does NodeJS manage packages.json in sub-folders?
You have your normal application but have sub-modules that you want to have your own dependencies, how does Node manage it? Does it create another node_modules
and put all files back into that subfolder?
(Assume that it is an architecture error but ...), on the hypothetical idea that they had two dependencies of the same version both in the top package and in the packages of the subpackages they would have the same version replicated in both node_modules
of the root folder and node_modules
of the sub-folders?
Example:
└─── MinhaAplicacaoDeExemplo
└───v1
│--- package.json
└─── node_modules
│ └─── lodash1.0
│
│
└─── sub-pasta-que-tem-os-proprios-modulos
│--- package.json
└─── node_modules
└─── lodash1.0