설치된 모든 node.js 모듈의 목록을 인쇄합니다. 제가 작업하고 있는 node.js 스크립트에서 npm을 사용하여 설치된 모든 node.js modules를 명령줄에 인쇄하고 싶습니다.이거 어떻게 해요? console.log(__filename); //now I want to print all installed modules to the command line. How can I do this? 전체 트리 없이 전역적으로 설치된 패키지에만 관심이 있는 경우: npm -g ls --depth=0 또는 로컬(omit -g): npm ls --depth=0npmls 사용 (json 출력도 있음) 스크립트에서: test.js: function npmls(cb) { require('child_process')..