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
74.24k stars 4.59k forks source link

[bug]: unable to get local issuer certificate #4867

Open Anuradhaaa022 opened 1 month ago

Anuradhaaa022 commented 1 month ago

Describe the bug

PS C:\Users\mr63\OneDrive my-app> npx shadcn@latest init ✔ Preflight checks. ✔ Verifying framework. Found Next.js. ✔ Validating Tailwind CSS. ✔ Validating import alias.

Something went wrong. Please check the error below for more details. If the problem persists, please open an issue on GitHub.

request to https://ui.shadcn.com/r/styles/index.json failed, reason: unable to get local issuer certificate

Affected component/components

all

How to reproduce

npx shadcn@latest init

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

windows

Before submitting

muhammad-anser commented 1 month ago

I am also facing the same issue

muhammad-anser commented 1 month ago

After running below it started working

For CLI set NODE_TLS_REJECT_UNAUTHORIZED=0

For PS $env:NODE_TLS_REJECT_UNAUTHORIZED=0