title: Build error occurred | reason: certificate has expired, when deploying on netlify
body: <p>I am deploying my site on netlify but facing this error so long.</p>
  <p>Could it be API error, SSL certificate error or Any build error?
  <strong>I am not getting the exact issue arises here.</strong></p>
  <p>Here is error logs</p>
  <pre><code>1:55:08 PM:   2. Build command from Netlify app                             
  1:55:08 PM: ────────────────────────────────────────────────────────────────
  1:55:08 PM: $ yarn build
  1:55:08 PM: yarn run v1.22.10
  1:55:08 PM: $ next build
  1:55:09 PM: info  - Checking validity of types...
  1:55:09 PM: warn  - No ESLint configuration detected. Run next lint to begin setup
  1:55:09 PM: info  - Creating an optimized production build...
  1:55:28 PM: info  - Compiled successfully
  1:55:28 PM: info  - Collecting page data...
  1:55:31 PM: &gt; Build error occurred
  1:55:31 PM: FetchError: request to https://content.wrirk.com/blogs?_sort=createdAt:DESC failed, reason: certificate has expired
  1:55:31 PM:     at ClientRequest.&lt;anonymous&gt; (/opt/build/repo/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
  1:55:31 PM:     at ClientRequest.emit (node:events:527:28)
  1:55:31 PM:     at TLSSocket.socketErrorListener (node:_http_client:454:9)
  1:55:31 PM:     at TLSSocket.emit (node:events:527:28)
  1:55:31 PM:     at emitErrorNT (node:internal/streams/destroy:157:8)
  1:55:31 PM:     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
  1:55:31 PM:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  1:55:31 PM:   type: 'system',
  1:55:31 PM:   errno: 'CERT_HAS_EXPIRED',
  1:55:31 PM:   code: 'CERT_HAS_EXPIRED'
  1:55:31 PM: }
  1:55:31 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
  1:55:31 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  1:55:31 PM: ────────────────────────────────────────────────────────────────
  1:55:31 PM:   &quot;build.command&quot; failed                                        
  1:55:31 PM: ────────────────────────────────────────────────────────────────
  1:55:31 PM:   Error message
  1:55:31 PM:   Command failed with exit code 1: yarn build (https://ntl.fyi/exit-code-1)
  1:55:31 PM:   Error location
  1:55:31 PM:   In Build command from Netlify app:
  1:55:31 PM:   yarn build
  1:55:31 PM:   Resolved config
  1:55:31 PM:   build:
  1:55:31 PM:     command: yarn build
  1:55:31 PM:     commandOrigin: ui
  1:55:31 PM:     environment:
  1:55:31 PM:       - NEXT_PRIVATE_TARGET
  1:55:31 PM:     publish: /opt/build/repo/.next
  1:55:31 PM:     publishOrigin: ui
  1:55:31 PM:   plugins:
  1:55:31 PM:     - inputs: {}
  1:55:31 PM:       origin: ui
  1:55:31 PM:       package: '@netlify/plugin-nextjs'
  1:55:32 PM: Caching artifacts
  1:55:32 PM: Started saving node modules
  </code></pre>