错误背景
封装脚手架时报错
错误原因
windows系统原因
解决方案
const createProjectAction = async (project) => {
console.log("why help you create your project")
// 1.clone项目
await download(vueRepo,project,{clone:true})
//2.执行npm install
// await commandSpawn('npm', ['install'],{cwd: `./${project}`})
await commandSpawn(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['install'], { cwd: `./${project}` })
}