在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。