InfiniteAmmoInc / Yarn

934 stars 93 forks source link

Cannot build executable on latest electron commit #76

Closed NamelessPerson closed 5 years ago

NamelessPerson commented 5 years ago

Made sure to update npm and node. Runs fine with npm start but npm run-script build outputs

C:\Users\jjpma\Desktop\Yarn\node_modules\read-config-file\out\main.js:72 async function readConfig(configFile) { ^^^^^^^^ SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at _readConfigFile (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:10:1) at Object.args [as handler] (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:45:5) at Object.runCommand (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\lib\command.js:235:44) at Object.parseArgs [as _parseArgs] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:1042:24) at Object.get [as argv] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:957:21) at Object. (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:19:1) at Module._compile (module.js:570:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yarn@0.3.2 build: build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yarn@0.3.2 build 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\jjpma\AppData\Roaming\npm-cache_logs\2018-07-16T22_01_20_678Z-debug.log

blurymind commented 5 years ago

If you run npm install and try again do you still get the error? I will try to fix it when i get back to the uk in two weeks-if no one else has tackled it

On Tue, 17 Jul 2018 01:03 Josh Phillips, notifications@github.com wrote:

Made sure to update npm and node. Runs fine with npm start but npm run-script build outputs

C:\Users\jjpma\Desktop\Yarn\node_modules\read-config-file\out\main.js:72 async function readConfig(configFile) { ^^^^^^^^ SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at _readConfigFile (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:10:1) at Object.args [as handler] (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:45:5) at Object.runCommand (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\lib\command.js:235:44) at Object.parseArgs [as _parseArgs] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:1042:24) at Object.get [as argv] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:957:21) at Object. (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:19:1) at Module._compile (module.js:570:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yarn@0.3.2 build: build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yarn@0.3.2 build 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\jjpma\AppData\Roaming\npm-cache_logs\2018-07-16T22_01_20_678Z-debug.log

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/InfiniteAmmoInc/Yarn/issues/76, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMbVbVJRHnTMZcBd639nBmkELaY374mks5uHQ2_gaJpZM4VR31j .

NamelessPerson commented 5 years ago

Yeah all the packages installed with no error and I tried deleting and installing again with no improvement

blurymind commented 5 years ago

@NamelessPerson what version of windows, version of nodejs are you on? You can check with node --version I am using nodejs v8.11.3 on windows 10 (64x) I can't reproduce your problem at all capture

NamelessPerson commented 5 years ago

I'm on Windows 10 Pro 10.0.17134 Node 6.10.2 NPM 6.2.0

And the latest electron commit

blurymind commented 5 years ago

@NamelessPerson please update nodejs to the recommended version https://nodejs.org/en/

and try again

6 is pretty old now

NamelessPerson commented 5 years ago

Yes that worked.

Sorry I must have not put in the right command trying to update using npm. I downloaded fresh and now it works.

Thanks, Josh