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 is failing same issue as #77 #81

Closed kravenoff42 closed 6 years ago

kravenoff42 commented 6 years ago

Just ran into the exact same issue

ec2-user:~/environment/portfolio $ awsmobile init [project ID]                                                                                                                           

/home/ec2-user/.nvm/versions/node/v6.13.0/lib/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:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/ec2-user/.nvm/versions/node/v6.13.0/lib/node_modules/awsmobile-cli/lib/command-init.js:16:24)

Here are the versions I've got:

npm v3.10.10 Node v6.13.0 create-react-app v1.5.2 awsmobile-cli 1.0.21

let me know if there any other info I can get you to help

UnleashedMind commented 6 years ago

We obviously mixed two issues here. One issue is a bug that has already been fix by the latest release v1.0.21 The other issue is because the node version is too old, and it does not support the async/await syntax. We suggest to use node version 8 and above.

UnleashedMind commented 6 years ago

closing the issue, feel free to open other issues for questions or bugs.