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.

when I use 'jsonp',navigator console error 'Uncaught SyntaxError: Unexpected token :'

See original GitHub issue

Here is my code this.$http.jsonp('http://news-at.zhihu.com/api/4/news/latest',{ 'jsonp': 'callback' }).then(function (res) { console.log(res) }) Here is the error tip image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
Cheniponcommented, Feb 22, 2017

Why is this issue closed while there are still people encountering the problem? I’m having the same error as well…

0reactions
gkatsanoscommented, Apr 2, 2018

@StKostya don’t use this plugin 😃 it’s abandoned by its owner. it’s much easier to use either window.fetch or Axios. https://alligator.io/vuejs/rest-api-axios/ https://github.com/github/fetch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot 'Uncaught SyntaxError: Unexpected token u in ...
An unexpected token simply means that it was expecting data, but instead got a command keyword (but this error can be triggered by...
Read more >
Uncaught SyntaxError: Invalid or unexpected token in javascript
I am trying to implement web share api of android chrome in jekyll posts page. Below is my code. my code is in...
Read more >
Uncaught SyntaxError: Invalid or unexpected token (at main ...
I have the same problem hosting it behind Cloudflare. Trying clearing the cache and it should work again.
Read more >
<!doctype is not valid json | The AI Search Engine You Control
I always get this error in the navigator : Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "… is not valid JSON. And...
Read more >
How to Fix SyntaxError: Unexpected token < in JSON at ...
To fix this error you need to figure out why you're getting HTML (or something else) instead of the JSON you expected. To...
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