shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
63.06k stars 3.55k forks source link

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

Open himanshu-ntml opened 1 month ago

himanshu-ntml commented 1 month ago

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

JCassio1 commented 1 month ago

I have the same issue. I am using my corporate device to install and I believe that I am having issues due to Zscaler. Any help would be appreciated. I am trying to find an alternative to installing manually.