Packager installs fine. Electron runs app fine. electron-packager-interactive works fine. However electron-packager fails trying to do anything. Even "electron-packager -h" fails. Its always the same error info.
/Users/name/.npm-packages/lib/node_modules/electron-packager/common.js:67
return ${opts.name}-${opts.platform}-${opts.arch}
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Which version of electron-packager are you using?
7.0.1, but I tried several other branches.What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are
you passing to thepackager()function?
electron-packager -h
electron-packager . --all
...etc.What version of Electron are you building with?
0.37.7
What is the host platform are you running electron-packager on?
Mac OSX El Capitan
What target platform(s)/architecture(s) are you building for?
Can never get that far.Is there a stack trace in the error message you're seeing?
/Users/name/.npm-packages/lib/node_modules/electron-packager/common.js:67
return${opts.name}-${opts.platform}-${opts.arch}
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.(/Users/name/.npm-packages/lib/node_modules/electron-packager/cli.js:2:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)Please provide either a failing testcase or detailed steps to reproduce your problem.
Tested on multiple apps. Its a launch issue of electron-packager, not a build issue of an app.
I think I know what the problem is. What version of Node are you using?
I'm using v0.10.29
That would be why. We do not support Node 0.10 or 0.12, only 4.0 and above (as of 7.0.0). We've documented this in both the readme and package.json, in addition to the NEWS file.
I would advise setting the engine-strict NPM config option to avoid problems like this.
Most helpful comment
That would be why. We do not support Node 0.10 or 0.12, only 4.0 and above (as of 7.0.0). We've documented this in both the readme and
package.json, in addition to the NEWS file.I would advise setting the
engine-strictNPM config option to avoid problems like this.