【问题标题】:How to write a txt file with the log from the `npm list` command?如何使用“npm list”命令中的日志写入 txt 文件?
【发布时间】:2020-06-02 13:14:18
【问题描述】:
npm list 记录此:
如何将其保存为txt 文件?
【问题讨论】:
标签:
node.js
logging
npm
text-files
fs
【解决方案1】:
适用于较新的 Windows 操作系统和 Linux/Mac:
npm list > logs.txt