I have a npm package that i want to update. I can update my package.json, but I don't want to break something. Is there a way to list all of the installed packages that depend on it?
我有一个要更新的npm包。我可以更新我的包裹。json,但我不想破坏。是否有一种方法列出所有依赖于它的已安装包?
1 个解决方案
#1
54
You're looking for https://docs.npmjs.com/cli/ls
你正在寻找https://docs.npmjs.com/cli/ls
For example, to see which packages depend on contextify
you can run:
例如,要查看哪些包取决于上下文,您可以运行:
npm ls contextify
app-name@0.0.1 /home/zorbash/some-project
└─┬ d3@3.3.6
└─┬ jsdom@0.5.7
└── contextify@0.1.15
#1
54
You're looking for https://docs.npmjs.com/cli/ls
你正在寻找https://docs.npmjs.com/cli/ls
For example, to see which packages depend on contextify
you can run:
例如,要查看哪些包取决于上下文,您可以运行:
npm ls contextify
app-name@0.0.1 /home/zorbash/some-project
└─┬ d3@3.3.6
└─┬ jsdom@0.5.7
└── contextify@0.1.15