我使用Vue,tailwindcss和electronic构建了一个小型应用程序,并被要求将其打包为mac,为Windows打包导致我得到了一个可以正常工作的应用程序,但是当我尝试为mac打包时,我一直遇到错误。在Windows 8.1上)
我在Windows上运行了此命令(有效):
"package-win": "electron-packager . Bitratemate --overwrite --asar=true --platform=win32 --arch=ia32 --icon=images/preflighticon4 --prune=true --out=release-builds --version-string.CompanyName=StreamMyEvent --version-string.FileDescription=SME --version-string.ProductName=\"Bitrate Mate\""
而我在Mac上尝试过:
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds"
const {app,Menu,BrowserWindow}= electron;
let mainWindow;
app.on('ready', function (){
// Create new window
mainWindow= new BrowserWindow({} );
mainWindow.once('ready-to-show', () => {
mainWindow.show()
})
mainWindow.loadURL(url)
期待与此类似:将新应用程序编写为release-builds \ Bitratemate-win32-ia32(这是我为Windows打包时得到的内容)
但出现此错误:
EPERM: operation not permitted, symlink 'C:\Users\Thijmen\AppData\Local\Temp\electron-packager\symlink-test\test' -> 'C:\Users\Thijmen\AppData\Local\Temp\electron-packager\symlink-test\testlink'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bitrate-mate@1.0.0 package-mac: `electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitrate-mate@1.0.0 package-mac script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Thijmen\AppData\Roaming\npm-cache\_logs\2019-07-12T09_20_57_337Z-debug.log