shadcn-ui/ui

[bug]: Issue when using cloudflare zero trust (with extended tls decryption)

himanshu-ntml opened this issue · 1 comments

Describe the bug

I am getting below error when try to setup shadcn

npx shadcn-ui@latest init
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: unable to get local issuer certificate
    at ClientRequest.<anonymous> (file:///C:/Users/PalakRukhaya/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  erroredSysCall: undefined
}
Failed to fetch styles from registry.

Affected component/components

All

How to reproduce

Try to enabled Cloudflare zero trust with "CA to system certificate store installed"

Codesandbox/StackBlitz link

No response

Logs

Let me know how can i give you logs.

System Info

Mac OS 14.4.1

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues