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.

Unexpected Token ...

See original GitHub issue

Hi,

Following the instructions from the README.md I get the error

Unexpected Token …

Any ideas?

serverless --version 1.22.0

serverless install --url https://github.com/AnomalyInnovations/serverless-es7 --name my-project
cd my-project
npm install
serverless invoke local --function hello -l
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command webpack
Serverless: Load command webpack:invoke
Serverless: Load command webpack:watch
Serverless: Load command webpack:serve
Serverless: WARNING: Plugin ServerlessWebpack uses deprecated hook before:deploy:createDeploymentArtifacts,
                     use package:createDeploymentArtifacts hook instead
Serverless: WARNING: Plugin ServerlessWebpack uses deprecated hook after:deploy:createDeploymentArtifacts,
                     use package:createDeploymentArtifacts hook instead
Serverless: Invoke invoke:local
 
  Syntax Error -------------------------------------------
 
  Unexpected token ...
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Stack Trace --------------------------------------------
 
SyntaxError: Unexpected token ...
/home/luke/Documents/FOO/my-project/webpack.config.js:6
  ...acc,
  ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at ServerlessWebpack.validate (/home/luke/Documents/FOO/my-project/node_modules/serverless-webpack/lib/validate.js:102:28)
    at ServerlessWebpack.tryCatcher (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromiseCtx (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/promise.js:606:10)
    at Async._drainQueue (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/luke/Documents/FOO/my-project/node_modules/bluebird/js/release/async.js:17:14)
From previous event:
    at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:358:22)
    at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:389:17)
    at variables.populateService.then (/usr/lib/node_modules/serverless/lib/Serverless.js:99:33)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:86:74)
    at serverless.init.then (/usr/lib/node_modules/serverless/bin/serverless:39:50)
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           7.10.0
     Serverless Version:     1.22.0
 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jayaircommented, Sep 25, 2017

@radelcom Just updated the repo to use the babel source map plugin. Thanks for the feedback guys.

Closing this issue.

1reaction
jayaircommented, Sep 22, 2017

@radelcom Oh that looks good. I’m going to try that out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

syntax error: unexpected token - javascript - Stack Overflow
The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >
SyntaxError: Unexpected token in JavaScript | bobbyhadz
The "Uncaught SyntaxError: Unexpected token" error also occurs if you have a missing or extra bracket, parenthesis or comma.
Read more >
How to fix JavaScript unexpected token error
As you write your JavaScript application, the unexpected token error always occurs because JavaScript expected a specific syntax that's not ...
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