
Evert Escalante
PreguntaHola, Alguien sabe como solucionar este error
No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access. The response had HTTP status code 404. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

Deborah Beatriz Rivera Olate
Muchísimas gracias por esta respuesta, llevaba 2 días sin poder avanzar y muy frustrada hasta que te leí.

David Camacho
Hola! La razón por la cual ella fetch se ve afectado es que el navegador impide que el código acceda a la respuestas de l a que proviene (url), esto se debe a que la respuesta carece de Access-Control-Origin.
Te adjunto el ejemplo, pero con un proxy CORS:
(async function load() { const proxyurl = "https://cors-anywhere.herokuapp.com/"; async function getData(url) { const response = await fetch(proxyurl + url); const data = await response.json(); return data; } const actionList = await getData( "https://yts.am/api/v2/list_movies.json?genre=action" ); console.log(actionList); })(); ```

Alberto Haaz Martínez
Checa este artículo quizás te pueda servir