question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 4.13.2 on Mac: unexpected token error

See original GitHub issue

Describe the bug After installing amplify-cli via npm install -g @aws-amplify/cli. Running any amplify command throws an error.

/usr/local/lib/node_modules/@aws-amplify/cli/lib/plugin-manager.js:47
    catch {
          ^

SyntaxError: Unexpected token {
    at Generator.next (<anonymous>)
    at Object.Module._extensions..js (module.js:664:10)

Amplify CLI Version 4.13.2

To Reproduce

  • Install @aws-amplify/cli@4.13.2
  • Run amplify configure … or pretty much anything w/ amplify. Event amplify -v fails

Desktop:

  • OS: Mac : High Sierra : 10.13.6
  • Node Version: v8.16.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
attilahcommented, Feb 13, 2020

@DanielLopez-nbcuni I see you’re running Node 8, as Node 8 became unsupported the minimum version for Amplify CLI is Node 10. The problem probably you see is caused by ES6 compatibility in Node 8. Please upgrade to at least Node 10.

2reactions
ricardoguimcommented, Feb 20, 2020

@attilah It would be great to document this change as well at https://aws-amplify.github.io/docs/ the first thing I checked was the Node version but the setup was informing Node 8 as minimum version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

macos - Cannot update version of node - unexpected token
Try using the OSX installer on nodejs.org/. It will update your local node installation and also a compatible npm version (v8.19.2 as of ......
Read more >
SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
SyntaxError: Unexpected token '=' in js on older Macs
js file was giving an error “SyntaxError: Unexpected token '='. Expected an opening '(' before a method's parameter list” Googling the error phrase...
Read more >
How to fix Unexpected Token in JSON error (for ... - YouTube
Not a programmer? Read this! ** - If you get this error in an app you didn't make, and/or you're not a web...
Read more >
Shell Script Error "syntax error near unexpected token" or "bad ...
Version state: final. Environment. FACT:Red Hat Enterprise Linux FACT: bash shell. Questions/Symptoms. SYMPTOM:Syntax error near unexpected token
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found