在build文件夹里有个check-versions.js。
if (shell.which('npm')) { versionRequirements.push({ name: 'npm', currentVersion: exec('npm --version'), versionRequirement: packageConfig.engines.npm }) }
将这一点注释就可以了。
有时是因为npm 与 node版本不匹配导致的,升级下npm 试试,npm install -g npm。