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.

SyntaxError: Unexpected token

See original GitHub issue

Hi, I have the following issue after start on an arch based manajro system.

SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Request._callback (/home/USER/Projekte/cryptocurrency-cli/index.js:41:19) at Request.self.callback (/home/USER/Projekte/cryptocurrency-cli/node_modules/request/request.js:185:22) at Request.emit (node:events:376:20) at Request.<anonymous> (/home/USER/Projekte/cryptocurrency-cli/node_modules/request/request.js:1154:10) at Request.emit (node:events:376:20) at IncomingMessage.<anonymous> (/home/USER/Projekte/cryptocurrency-cli/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:482:28) at IncomingMessage.emit (node:events:388:22) at endReadableNT (node:internal/streams/readable:1294:12) npm ERR! code ELIFECYCLE npm ERR! errno 1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:7

github_iconTop GitHub Comments

1deadpixlcommented, Sep 14, 2021

Looks like changed their API and the app needs to be updated. The endpoint that first gets requested now returns a 410 error (after returning a Cloudflare bot wall which also needs to handled):

"code": "410 Gone",
"reason": "We no longer serving this endpoint here"

I found this tool via the GH search and it looks like it will work great for what I need. Perhaps someone has the time to investigate the issue and update the API interface? I’ll submit a PR if I get a chance to work on it.

Boyquotescommented, Oct 3, 2021

Hello all,

You can test this pull request who fix this

Or clone my repo directly if you prefer( more simple )

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 >
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: "SyntaxError: Unexpected token" in JavaScript
One common cause of the SyntaxError: Unexpected token error is a missing semicolon. In JavaScript, semicolons are used to indicate the end of...
Read more >
JavaScript SyntaxError - Unexpected token - GeeksforGeeks
This JavaScript exceptions unexpected token occur if a specific language construct was expected, but anything else is typed mistakenly.
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