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.

Uncaught SyntaxError: Unexpected token u in JSON at position 0

See original GitHub issue

I was looking into using storybook or carte-blanche to create a UI explorer for react-native-web. I followed the README instructions and added this to my webpack config:

new CarteBlanche({
  componentRoot: path.join(__dirname, '../src/components'),
  filter: /index.js$/
}),

But navigating to any example component produces this error:

Uncaught SyntaxError: Unexpected token u in JSON at position 0

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nikgrafcommented, Jul 17, 2016

Just tried, I even get an earlier error … need to take a closer look at another time.

screen shot 2016-07-17 at 08 51 59
1reaction
necolascommented, Jul 13, 2016

Oh, having the examples be editable is fine. It would be something used during development as much as for external consumption.

To repro:

  1. git clone react-native-web
  2. npm install carte-blanche
  3. Add that code block to examples/webpack.config.js
  4. npm run examples
Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Unexpected token u in JSON at position 0 - Isotropic
The "Unexpected token u in JSON at position 0" is a typically Javascript error that will show up in your console log if...
Read more >
Unexpected token u in JSON at position 0 - Stack Overflow
Your app is attempting to parse the undefined JSON web token. Such malfunction may occur due to the wrong usage of ...
Read more >
Troubleshoot 'Uncaught SyntaxError: Unexpected token u in ...
The 'Uncaught SyntaxError: Unexpected token u in JSON at position 0' error is caused when the client has been asked to execute JSON.parse() ......
Read more >
Unexpected token u in JSON at position 0 in JavaScript
The "Unexpected token u in JSON at position 0" error in JavaScript is typically caused by trying to parse a string as JSON...
Read more >
2 Solutions for Unexpected token "u" in JSON at position 0
The [Unexpected token u in JSON at position 0] error message happens when you see an undefined value to $.parseJSON or JSON.parse functions....
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