Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!