amazon-archives / awsmobile-cli

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

SyntaxError: Unexpected token ... #140

Closed jeremyhicks closed 6 years ago

jeremyhicks commented 6 years ago

On a newly initialized project when I run:

awsmobile cloud-api configure

The output is:

cloud-api feature specification error:
/Users/jhicks/.nvm/versions/node/v8.1.2/lib/node_modules/awsmobile-cli/lib/feature-operations/scripts/cloud-api-ops.js:355
        ...path,
        ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.specify (/Users/jhicks/.nvm/versions/node/v8.1.2/lib/node_modules/awsmobile-cli/lib/backend-operations/ops-cloud-api.js:40:35)

Steps taken:

  1. Verified the connection to aws console, everything appears connected
  2. awsmobile push/pull sends other changes to the account
  3. The cloud-api can be tested in the API Gateway interface

Here is the repo for the basic starter project that I created

awsmobile -V = 1.1.4

UnleashedMind commented 6 years ago

You need to update your node version to 7+ We recommend using node version 8.9.0.

jeremyhicks commented 6 years ago

Current: $ node -v v8.1.2 $ which node /Users/jhicks/.nvm/versions/node/v8.1.2/bin/node

I'll update to 8.9.0

jeremyhicks commented 6 years ago

Updating to the latest node did the trick