I was having the same error and the solution is to have your index.html, script.js and data.json in the same directory.
Related Posts:
- What is JSONP, and why was it created?
- jQuery AJAX cross domain
- React Js: Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
- JSON.parse() not working
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- How can JavaScript save to a local file?
- What are the differences between JSON and JSONP?
- “SyntaxError: Unexpected token < in JSON at position 0"
- Cross-Origin Read Blocking (CORB)
- SyntaxError: Unexpected token o in JSON at position 1
- syntax error: unexpected token <
- SyntaxError: Unexpected token o in JSON at position 1
- TypeError: Converting circular structure to JSON in nodejs
- Use a JSON array with objects with javascript
- Array of JSON Objects
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- Fetch: POST JSON data
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- Unexpected token u in JSON at position 0 (but only sometimes)
- How to read an external local JSON file in JavaScript?
- SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token o in JSON at position 1
- How to read an external local JSON file in JavaScript?
- What is the convention in JSON for empty vs. null?
- What is the “right” JSON date format?
- Nested JSON objects – do I have to use arrays for everything?
- Uncaught TypeError: Cannot read property ‘length’ of undefined
- What is the “right” JSON date format?
- Infinite Scrolling in Asp.Net MVC with jQuery / AJAX Issues
- ajax jquery simple get request
- jQuery get textarea text
- Response to preflight request doesn’t pass access control check
- How to compare arrays in JavaScript?
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- Send POST data using XMLHttpRequest
- Set timeout for ajax (jQuery)
- How to generate a simple popup using jQuery
- What does on() in JavaScript do?
- SyntaxError: Unexpected token o in JSON at position 1
- jQuery AJAX submit form
- jQuery Ajax File Upload
- How can I upload files asynchronously with jQuery?
- Adding images to a Bootstrap Carousel with AJAX
- Uncaught TypeError: Cannot read property ‘props’ of null
- AJAX response error: net::ERR_EMPTY_RESPONSE
- Loading local JSON file
- How to convert JSON object to JavaScript array?
- Basic example of using .ajax() with JSONP?
- Disable same origin policy in Chrome
- node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]
- Access Control Request Headers, is added to header in AJAX request with jQuery
- Uncaught TypeError: data.push is not a function
- How to convert selected HTML to Json?
- Can JavaScript connect with MySQL?
- XMLHttpRequest status 0 (responseText is empty)
- Basic Ajax send/receive with node.js
- How to get JSON from URL in JavaScript?
- How do you put an image file in a json object?
- push object into array
- Execute PHP function with onclick
- Uncaught TypeError: Cannot read property ‘appendChild’ of null
- react router v^4.0.0 Uncaught TypeError: Cannot read property ‘location’ of undefined
- Refused to execute script, strict MIME type checking is enabled?
- jQuery Ajax POST example with PHP
- Refresh/reload the content in Div using jquery/ajax
- TypeError: res.json is not a function
- Attaching ‘onclick’ event to D3 chart background
- How does AJAX work?
- SyntaxError: Unexpected token C in JSON at position 0 – Ionic 2 Http GET request
- SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
- Add new attribute (element) to JSON object using JavaScript
- D3 Appending Text to a SVG Rectangle
- Scroll to bottom of div?
- How to add a tooltip to an svg graphic?
- How to display raw JSON data on a HTML page
- Convert array to JSON
- JSON.parse unexpected token s
- How to manage a redirect request after a jQuery Ajax call
- JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list?
- d3 is not defined – ReferenceError
- How to filter JSON Data in JavaScript or jQuery?
- How to allow CORS in react.js?
- How to add a button dynamically using jquery
- Using setTimeout on promise chain
- FormData append not working
- Complex JSON nesting of objects and arrays
- What is the difference D3 datum vs. data?
- Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined
- Uncaught SyntaxError: Unexpected token with JSON.parse
- How do I convert a JavaScript forEach loop/function to CoffeeScript
- Download a file by jQuery.Ajax
- What is ‘xmlhttp.setRequestHeader();’ and in which situations is it used?
- Write / add data in JSON file using Node.js
- How do I handle newlines in JSON?
- Finding the max value of an attribute in an array of objects
- How to set text color for my d3 chart title?
- Defining a HTML template to append using JQuery
- Ajax success function
- D3.js: what is ‘g’ in .append(“g”) D3.js code?
- parsing JSONP $http.jsonp() response in angular.js