Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
Axios Network Error createError.js:16 in React.js

I'm new in React.Js, and have some problem when getting data from Node.js API. It gives the following error :

Error: Network Error
    createError createError.js:16
    handleError xhr.js:83
    dispatchXhrRequest xhr.js:80
    xhrAdapter xhr.js:12
    dispatchRequest dispatchRequest.js:52
    promise callback*request Axios.js:61
    method Axios.js:76
    wrap bind.js:9
    getMemberList service.jsx:8
    Ember 2
    React 6
    unstable_runWithPriority scheduler.development.js:653
    React 10
    js index.js:8
    Webpack 7
service.jsx:14

I tried the API with Postman and its working fine. Accessing the API from mobile app is working too. Backend is using Express and already put cors inside it. I put this inside index.js in backend

var cors = require('cors')
app.use(cors());

This is my code from react :

export async function getMemberList() {
    await Axios.get("http://localhost:6000/api/v1/spesialisasi/", {headers}).then(
        (res) => {
            console.log(res);
        }
    ).catch(
        (error) => {
            console.log(error);
        }
    )
}

This is the log from network tab in inspect element

enter image description here

Any advice for this? Thank you.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda