I am trying to find which package.json is causing a dependency warning. It's coming from a sub-module. I have a find command find . -name 'foo'
find . -name 'foo'
that outputs
/a/very/very/very/long/path/to/a/submodule/.../node_modules/foo
/another/very/very/very/long/path/to/a/submodule/.../node_modules/foo
I want to see what version of foo is included in the parent module's package.json. Something like this
more "$find_output"/../../package.json | grep foo
弄清楚了:
find . -name 'foo' -print0 | xargs -0 bash -c 'for path; do more "$path"/../../package.json | grep "foo"; echo $path; done ' bash
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.