amazon-archives / awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
Apache License 2.0
142 stars 35 forks source link

awsmobile init crashes with "Unexpected token function" in "\node_modules\awsmobile-cli\lib\init-steps\s2-choose-strategy.js:104" #109

Closed ankitmhn closed 6 years ago

ankitmhn commented 6 years ago

Hello, On attempting to recreate the tutorial here. I have run into this error:

C:\Users\Ankit\Documents\Hurestic\App\RN\hurestic>awsmobile init

C:\Users\Ankit\AppData\Roaming\npm\node_modules\awsmobile-cli\lib\init-steps\s2-choose-strategy.js:104 async function inquirerForValid(initInfo){ ^^^^^^^^

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 Object. (C:\Users\Ankit\AppData\Roaming\npm\node_modules\awsmobile-cli\lib\command-init.js:16:24)

elorzafe commented 6 years ago

Hi @ankitmhn awsmobile-cli will require node 8.9 and above