gpt4 book ai didi

npm - 如何查看node_modules依赖树?

转载 作者:行者123 更新时间:2023-12-02 04:42:37 24 4
gpt4 key购买 nike

如何查看基于 npm 的项目的依赖关系图?

我试过Madge但它忽略了node_modules。

最佳答案

使用npm list -a,例如

$ npm list -a
my-app@1.0.0 C:\Dev\my-app
+-- @types/node@9.6.6
+-- @types/react@16.3.13
| `-- csstype@2.4.1
+-- @types/react-dom@16.0.5
| +-- @types/node@9.6.6 deduped
| `-- @types/react@16.3.13 deduped
+-- react@16.3.2
| +-- fbjs@0.8.16
| | +-- core-js@1.2.7
| | +-- isomorphic-fetch@2.2.1
| | | +-- node-fetch@1.7.3
| | | | +-- encoding@0.1.12
| | | | | `-- iconv-lite@0.4.21
| | | | | `-- safer-buffer@2.1.2
| | | | `-- is-stream@1.1.0
| | | `-- whatwg-fetch@2.0.4
| | +-- loose-envify@1.3.1 deduped
| | +-- object-assign@4.1.1 deduped
| | +-- promise@7.3.1
| | | `-- asap@2.0.6
| | +-- setimmediate@1.0.5
| | `-- ua-parser-js@0.7.17
| +-- loose-envify@1.3.1
| | `-- js-tokens@3.0.2
| +-- object-assign@4.1.1
| `-- prop-types@15.6.1
| +-- fbjs@0.8.16 deduped
| +-- loose-envify@1.3.1 deduped
| `-- object-assign@4.1.1 deduped
+-- react-dom@16.3.2
| +-- fbjs@0.8.16 deduped
| +-- loose-envify@1.3.1 deduped
| +-- object-assign@4.1.1 deduped
| `-- prop-types@15.6.1 deduped
`-- typescript@2.8.3

关于npm - 如何查看node_modules依赖树?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50071313/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com