安装并行子依赖项的Ied安装程序与phantomjs / pahtnomjs-prebuilt存在问题。
问题是自定义npm安装程序安装了包含phantomjs的软件包(如果它在pc /虚拟机中不存在则从github下载)并在lib文件夹中的location.js中设置它的路径,该文件夹由于安装程序而不存在。
您可以在lib / phantomjs.js文件中查看它 第18行
try {
var location = require('./location')
exports.path = path.resolve(__dirname, location.location)
exports.platform = location.platform
exports.arch = location.arch
} catch(e) {
// Must be running inside install script.
exports.path = null
}