amazon-archives / awsmobile-cli

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

syntax error in /usr/local/lib/node_modules/awsmobile-cli/lib/init-steps/s2-choose-strategy.js:104 #71

Closed radetsky closed 6 years ago

radetsky commented 6 years ago

Just installed awsmobile-cli to try Amazon Cognito for React Native app.

rad@localhost: npm install awsmobile-cli -g 
rad@localhost: ~/project> awsmobile init

/usr/local/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: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.<anonymous> (/usr/local/lib/node_modules/awsmobile-cli/lib/command-init.js:16:24)
radetsky commented 6 years ago

Update nodejs to latest LTS gave me a solution.

ayrtonkrizan commented 6 years ago

Thank you, i faced with the same problem and updating node solved.