Electron and ES 2015


#1

Hi when I run electron app by npm script or build with electron-packager it doesn`t work with es6
But when I run app from console in my project by electron . everything is work fine

  • Electron version: v1.3.1
  • Operating system: os X el capitan
  • node version : 6.3.1
    *npm version: 3.10.3

and also I have insatled nvm

     v5.1.0
     v6.2.1

-> v6.3.1
system
default -> 6.3.1 (-> v6.3.1)
node -> stable (-> v6.3.1) (default)
stable -> 6.3 (-> v6.3.1) (default)

here is error:

app.js:53 Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
factory.js:13 Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
directives.js:4 Uncaught SyntaxError: Unexpected token {
angular.js:4631 Uncaught Error: [$injector:modulerr] Failed to instantiate module mikrotikApp due to:
Error: [$injector:nomod] Module ‘mikrotikApp’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.


#2

Are you specifying the version of Electron to use when you call electron-packager form the command line?

It might also be worth sticking reporting process.versions.electron (and maybe the Node version) so you can see exactly what version is being used in the packaged app.