const{exec}=require('child_process');exec('npm -v',(err,stdout)=>{if(err)throwerr;if(parseFloat(stdout)<5){// NOTE: This can happen if you have a dependency which lists an old version of npm in its own dependencies.thrownewError(`[ERROR] You need npm version @>=5 but you have ${stdout}`);}});