如何获得npm可用但未安装在本地的模块树?
NPM ll负责本地安装的包。但对于未安装的模块或全局安装的模块,它不起作用。
我试过npm列表鲍尔,但那不是它。
如何获得npm可用但未安装在本地的模块树?
NPM ll负责本地安装的包。但对于未安装的模块或全局安装的模块,它不起作用。
我试过npm列表鲍尔,但那不是它。
当前回答
获取一个列表:
% npx npm-remote-ls --flatten dugite -d false -o false
[
'dugite@1.91.3',
'checksum@0.1.1',
'progress@2.0.3',
'mkdirp@0.5.5',
'rimraf@2.7.1',
'tar@4.4.13',
'optimist@0.3.7',
'got@9.6.0',
'minimist@1.2.5',
'chownr@1.1.4',
'glob@7.1.6',
'fs-minipass@1.2.7',
'minizlib@1.3.3',
'minipass@2.9.0',
'safe-buffer@5.2.1',
'yallist@3.1.1',
'wordwrap@0.0.3',
'@szmarczak/http-timer@1.1.2',
'cacheable-request@6.1.0',
'@sindresorhus/is@0.14.0',
'decompress-response@3.3.0',
'duplexer3@0.1.4',
'lowercase-keys@1.0.1',
'mimic-response@1.0.1',
'get-stream@4.1.0',
'to-readable-stream@1.0.0',
'p-cancelable@1.1.0',
'url-parse-lax@3.0.0',
'fs.realpath@1.0.0',
'inflight@1.0.6',
'inherits@2.0.4',
'once@1.4.0',
'path-is-absolute@1.0.1',
'minimatch@3.0.4',
'defer-to-connect@1.1.3',
'clone-response@1.0.2',
'get-stream@5.2.0',
'http-cache-semantics@4.1.0',
'lowercase-keys@2.0.0',
'responselike@1.0.2',
'keyv@3.1.0',
'pump@3.0.0',
'prepend-http@2.0.0',
'normalize-url@4.5.0',
'wrappy@1.0.2',
'brace-expansion@1.1.11',
'json-buffer@3.0.0',
'end-of-stream@1.4.4',
'concat-map@0.0.1',
'balanced-match@1.0.0'
]
其他回答
查看npm模块的所有元数据
npm view mongoose(module name)
查看模块的所有依赖项
npm view mongoose dependencies
查看所有版本或版本模块
npm view mongoose version
npm view mongoose versions
查看所有关键字
npm view mongoose keywords
该站点允许您以2D或3D节点图的形式查看包树。
http://npm.anvaka.com/#/view/2d/waterline
@Avanka干得好!
还有一个很好的web应用程序,可以在加权地图类的视图中查看依赖关系。
例如:
https://bundlephobia.com/result?p=sanitize-html@1.19.1
你可以使用howfat来显示依赖统计信息:
npx howfat jasmine
这个命令以树形结构输出所有依赖的模块:
npm ls -a