Open kcampion opened 7 years ago
Also would be interested to hear more about this. I just started using this yesterday for an Electron app I'm building and it has been working fine while testing but I haven't tried packaging it quite yet. I'll report results when I do.
I wait for your results.
This works fine before it's packaged. Not sure how to view the console from within the packaged app but happy to provide any other info that would be helpful.
node: v0.12.7 (not sure why I'm so outdated) electron-packager: 5.1.0 electron-prebuilt: 0.36.0
I'll try other version later.
Same results with Node 6.9.1.
Also trying to figure this out. I was able to log my production app using electron-log
Everytime I try to run Applescript from a file I get the error:
Error: osascript: /Users/jordan/Desktop/plusaroo/dist/mac/Plusaroo.app/Contents/Resources/app.asar/app/refreshSpotify.applescript: No such file or directory
The file is definitely there though. I unpacked my app.asar file and can see it. 👁 👁
I'm not sure why it's not working on inline scripts. I haven't tested this out in Electron my self. By the issue with NOENT i belive is due to the asar packing. Asar packs all files to a flat structure to avoid too long paths. As such the path it self changes. You can avoid the issue by excluding the script files from being packed by asar: https://github.com/electron/asar#excluding-multiple-resources-from-being-packed
@mikaelbr I actually see this same error when I build without using asar. I can try with exclude but it seems like it's not an asar issue.
Hi,
The module "osascript" works perfectly under dev mode into an Electron project (with the command line
#electron .
), but after build it with electron-packager (with the command lineelectron-packager . MyProject --platform=darwin --arch=x64 --version=1.3.5 --overwrite
), the module fails. Any idea why?This is the source code I use (works under dev, fails after packager):
Console displays this:
The same source code works after packager if the script variable is equal to:
var script = 'get volume settings';
My node version: v4.5.0 My electron version: v1.3.5