i am trying to run npm run build but i always get an error .even though all the pages are working fine and no errors . I have added code for api calls using getServerSidePorps .
error:
Error: connect ECONNREFUSED 127.0.0.1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
  type: 'Error',
  config: {
    url: 'http://localhost:3000/api/admin/user/users/list',
    method: 'get',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'User-Agent': 'axios/0.21.4'
    },
    transformRequest: [ null ],
    transformResponse: [ null ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    }
  },
  code: 'ECONNREFUSED'
}
API CALLS
export const getServerSideProps = async () => {
  const additionalData = {
    InitialSkip: 0,
    initialLimit: 3,
  };
  const response = await axios.post(
    "http://localhost:3000/api/admin/user/users/list",
    additionalData,
    {
      headers: {
        "Content-Type": "application/json",
      },
    }
  );
  return {
    props: {
      data: response.data,
    },
  };
};
 
     
    