Unexpected Token ...
See original GitHub issueHi,
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:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@radelcom Just updated the repo to use the babel source map plugin. Thanks for the feedback guys.
Closing this issue.
@radelcom Oh that looks good. I’m going to try that out.