Build a Motorcycle Shop - Lab Motorcycle Shop

Tell us what’s happening:

I am not able to access the json data for the exercise via `fetch()`. The example project also shows “0 results” which makes it hard to see what the expected result should be. Making the same fetch() call from another tab (e.g. F12 on google.com or stackoverflow.com) works, so maybe this specific origin somehow plays a role?

fetch("https://cdn.freecodecamp.org/curriculum/labs/data/motorcycles.json").catch(console.log)
// > Promise {<pending>}
// > lab-motorcycle-shop:1 Access to fetch at 
// 'https://cdn.freecodecamp.org/curriculum/labs/data/motorcycles.json' 
//     from origin 'https://www.freecodecamp.org' 
//     has been blocked by CORS policy: 
//     No 'Access-Control-Allow-Origin' header is present 
//     on the requested resource.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: index.ts */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36

Challenge Information:

Build a Motorcycle Shop - Lab Motorcycle Shop

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-motorcycle-shop/694175528a794a090ea0ba74.md at main · freeCodeCamp/freeCodeCamp · GitHub

I think if you try too often the API stops giving you output for a bit, maybe try later?

Thanks! I was not overloading the API since it didn’t work the first time I tried. But I’ll give it some time in case it is traffic related.