我试图为我的电子计算机应用程序创建一个windows安装程序,但是当我运行该文件时,出现了以下错误:
spawn mono ENOENT
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! thermowell-design@1.2.0 installer-win: `npm run pack-win && node installers/windows/createinstaller.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the thermowell-design@1.2.0 installer-win script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.这是createinstaller.js文件:
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const path = require('path')
getInstallerConfig()
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
})
function getInstallerConfig () {
console.log('creating windows installer')
const rootPath = path.join('./')
const outPath = path.join(rootPath, 'release-builds')
return Promise.resolve({
appDirectory: path.join(outPath, 'Thermowell-Design-win32-x64/'),
authors: 'Pippo',
noMsi: true,
outputDirectory: path.join(outPath, 'windows-installer'),
exe: 'thermowell-design.exe',
setupExe: 'thermowell-design-app.exe',
setupIcon: path.join(rootPath, 'assets', 'images', 'icons', 'logo.ico')
})
}有可靠的版本:
最后,nodejs版本是10.15.1
发布于 2019-05-14 13:01:38
现在回答已经太晚了,但如果将来有人需要的话,就留给他们吧。我也遇到了同样的问题,下面是我的解决办法:
这些都是我的修补程序,但这里有另一个可能对您有帮助的链接。
https://stackoverflow.com/questions/54658346
复制相似问题