Uncaught SyntaxError: Unexpected token u in JSON at position 0
See original GitHub issueI 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:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just tried, I even get an earlier error … need to take a closer look at another time.
Oh, having the examples be editable is fine. It would be something used during development as much as for external consumption.
To repro:
npm install carte-blanche
examples/webpack.config.js
npm run examples