How does npm have all the dependencies of the project's package.json under the install subdirectory at one time?

< H2 > I believe that many people will have the same needs as me < / H2 >

the directory is as follows

Project

node_modules
package.json
subproject

node_modules
package.json

I cd to the first-level directory of the project
then npm install , I can only install all the dependencies of the first-level directory
how to implement the first-level directory install automatically let the subproject also Install all its package.json dependencies


generally few people have this requirement, and the subproject is generally declared as a submodule to the dependency of the main project. (relying on supporting local paths)
or you can write a shell script and execute it.


this kind of previous project nesting requirements is very strange. As mentioned above, it is a good choice to declare sub-projects to the main project in the form of components . If the dependency is not particularly high, you can even consider stripping it out to form a new project and then develop it independently.


Hello, I also have a project written in this way. Have you solved it?


check out this article
https://zhuanlan.zhihu.com/p/...

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e75c91-588.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e75c91-588.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?