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.

Getting "SyntaxError: Unexpected token ..."

See original GitHub issue

Getting the following error from snoowrap.

/server/node_modules/snoowrap/node_modules/promise-chains/index.js:55
    construct: (target, args) => (wrap(target().then(result => (wrap(new result(...args))))))
                                                                                ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)

    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/server/node_modules/snoowrap/lib/snoowrap.js:7:22)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/server/controllers/AuthController.js:10:16)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at module.exports (/server/routes.js:14:14)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
not-an-aardvarkcommented, Jul 31, 2017

Hi,

It looks like your syntax is invalid because you’re using a default parameter for fallbacks.

This doesn’t seem to be an issue with snoowrap, and this is not the best place to get help with JavaScript in general. I would recommend asking a question on StackOverflow if you’re having trouble with syntax errors in your code.

0reactions
tateviktomecommented, May 30, 2018

Running on the same problem as @chengjaun … Is there any solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
syntax error: unexpected token - javascript
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 ...
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 SyntaxError - Unexpected token
This JavaScript exceptions unexpected token occur if a specific language construct was expected, but anything else is typed mistakenly.
Read more >
Unexpected token this" with scan method
I am getting a “SyntaxError: Unexpected token this” with the code posted below. Though I have reviewed the code many times I can't...
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