I have a root directory with a lot of child directories.
I want to run npm install
in each directory if a file with name package.json is present in that directory. I have to still consider some scenarios as below
After running npm install, it will create a new directory node_modules. If I re-run the command it should not check package.json present inside a directory with name node_modules.
I have tried
find . -name "package.json" -exec npm i \;