我要捕获npm安装处理状态,包括下载文件列表 这是我的代码:
const { spawn } = require('child_process');
const install = spawn('npm',['install','--save', $anyPackageName],{env:process.env,cwd:$projPath});
install.stdout.on('data',(data)=>{
console.log(data); // I want to get downloading process here with downloading status
// only result shows without downloading process
})
谢谢你