This post relates to the Safe-app-nodeJS library and the code which it exports. Let me preface this by saying that I think the module is fantastic, what it provides (once you can get over the painful step of actually getting it set up in your local environment) is an invaluable resource for SafeNet app development.
With that being said:
If you’re going to publish a module which essentially requires Electron (or some other full application lifecycle tool) you should adhere to the minimum provided language support of those tools - or to put it plainly: if Electron doesn’t support ES2017 by default, the code you publish shouldn’t be ES2017.
By using the following ES2017 await example here - obviously, there are a tonne more examples - you make compiling the Maidsafe JS code using Babel a requirement for all consumers of your API - which is frankly unreasonable.
It’s fine to write code in ES2017 - I understand why the apps have been built in this way - but when they’re published you should be compiling them using babel’s prepublish command.
The async command (along with other ES2017 features) should work in electron and nodejs by default unless you’re using a really old version? You shouldn’t need to use babel at all for any of this, even for electron.
I would say we shouldn’t be adding babel compiled code to our repositories if the latest stable versions of node and electron work out of the box.
I’ll give it a go myself too and see if I can recreate your issue.