npm list logs this:
npm list
How can I save that as a txt file?
txt
Works on newer Windows OS and Linux/Mac:
npm list > logs.txt