Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda