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.

"Syntax Error: Unexpected token..." happens on some Machines

See original GitHub issue


First of all, I really like your project as I’m coming from the .NET world and am quite used to the LINQ syntax. So this really simplifies a lot of things for me 😃

I have a question/issue, I’m not really sure if it is related to linqts itself or my way of using it. As I’m not really an expert in the node area this might be, but I hope someone can at least point me in the right direction.

So I’m developing a Build Task that extends TFS/VSTS which is written in typescript and makes use of your extension. Everything was working well since suddenly it stopped working on some machines. The issues started after updating the version from 1.10.0 to 1.10.1. Trying to make it work again I reverted the change back to version 1.10.0 but it still fails for some people. So I tried to update everything to the newest version but it still seems to fail on some machines. What I suspected first is that it might had something to do with the node version installed, however at least on one machine it machtes exactly with what I’m using and it works there…

I’m really out of ideas know and hope someone here has at least an idea on where to start. The actual error produced is the following (see as well the issue in my github repo):

2018-02-28T21:23:38.4471815Z T:\TFS2015_BuildAgent\tasks\TriggerBuild\2.6.2\node_modules\linqts\dist\linqts.js:1
2018-02-28T21:23:38.4627791Z (function (exports, require, module, __filename, __dirname) { const e=e=>"object"==typeof e,t=(t,r)=>Object.keys(t).every(n=>e(t[n])?(void 0)._equal(r[n],t[n]):r[n]===t[n]),r=e=>(...t)=>!e(...t);class n{constructor(e=[]){this._elements=e}Add(e){this._elements.push(e)}AddRange(e){this._elements.push(...e)}Aggregate(e,t){return this._elements.reduce(e,t)}All(e){return this._elements.every(e)}Any(e){return e?this._elements.some(e):this._elements.length>0}Average(e){return this.Sum(e)/this.Count(e)}Cast(){return new n(this._elements)}Concat(e){return new n(this._elements.concat(e.ToArray()))}Contains(e){return this._elements.some(t=>t===e)}Count(e){return e?this.Where(e).Count():this._elements.length}DefaultIfEmpty(e){return this.Count()?this:new n([e])}Distinct(){return this.Where((r,n,s)=>(e(r)?s.findIndex(e=>t(e,r)):s.indexOf(r))===n)}DistinctBy(e){const t=this.GroupBy(e,e=>e);return Object.keys(t).reduce((e,r)=>(e.Add(t[r][0
2018-02-28T21:23:38.4627791Z SyntaxError: Unexpected token ...
2018-02-28T21:23:38.4627791Z at exports.runInThisContext (vm.js:53:16)
2018-02-28T21:23:38.4627791Z at Module._compile (module.js:387:25)
2018-02-28T21:23:38.4627791Z at Object.Module._extensions..js (module.js:422:10)
2018-02-28T21:23:38.4627791Z at Module.load (module.js:357:32)
2018-02-28T21:23:38.4627791Z at Function.Module._load (module.js:314:12)
2018-02-28T21:23:38.4627791Z at Module.require (module.js:367:17)
2018-02-28T21:23:38.4627791Z at require (internal/module.js:16:19)
2018-02-28T21:23:38.4627791Z at Object. (T:\TFS2015_BuildAgent\tasks\TriggerBuild\2.6.2\node_modules\tfsrestservice\index.js:41:16)
2018-02-28T21:23:38.4627791Z at Module._compile (module.js:413:34)
2018-02-28T21:23:38.4627791Z at Object.Module._extensions..js (module.js:422:10)

I’m thankful about any clue that might help resolve the issue. Thanks for your time already in advance.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

huserbencommented, Mar 4, 2018


so I saw that apparently version 1.10.2 was already part of the newest package of mine, so I tried it now with the fixed dependency to 1.10.0.

I’ll let you know if it worked once I get feedback.

Many thanks for your support.

kutyelcommented, Mar 3, 2018

If it does not work you can always lock your dependency to "linqts": "1.10.0" (without the caret) and everything should work as before.

BTW: you can always support the library by giving it a ⭐️ on GitHub 😃

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 >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
An unexpected token occurs if JavaScript code has a missing or extra ... Unexpected token is similar to syntax error but more specific....
Read more >
Jest encountered an unexpected token: SyntaxError
I am running my tests with Jest and Enzyme when I came across this error when I was running my code on a...
Read more >
Getting syntax error on " unexpected token (". How to debug
For "Build Rock, Paper and scissors" game, I have typed out the following code, but it is showing syntax error, but I could...
Read more >
SyntaxError: Unexpected token in JavaScript - Stack Diary
The "SyntaxError: Unexpected token" error in JavaScript is a common syntax error that occurs when the JavaScript interpreter encounters a 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 Post

No results found

github_iconTop Related Hashnode Post

No results found