Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Cannot add components using the CLI because of failed certificate verification #3535

Open
2 tasks done
jakub-sekula opened this issue Apr 19, 2024 · 4 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@jakub-sekula
Copy link

jakub-sekula commented Apr 19, 2024

Describe the bug

I am trying to add the Tooltip component by running npx shadcn-ui@latest add tooltip, but the command fails with the following error message:

FetchError: request to https://ui.shadcn.com/registry/index.json failed, reason: unable to verify the first certificate
    at ClientRequest.<anonymous> (file:///C:/Users/js/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  erroredSysCall: undefined
}
Failed to fetch components from registry.

It worked fine yesterday and nothing changed on my side, is it possible that some certificate has expired?

Affected component/components

Tooltip

How to reproduce

Run npx shadcn-ui@latest add tooltip

Codesandbox/StackBlitz link

No response

Logs

FetchError: request to https://ui.shadcn.com/registry/index.json failed, reason: unable to verify the first certificate
    at ClientRequest.<anonymous> (file:///C:/Users/js/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  erroredSysCall: undefined
}
Failed to fetch components from registry.


### System Info

```bash
Windows 10.0.19042 Build 19042
npm 8.19.3
node 18.13.0

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@jakub-sekula jakub-sekula added the bug Something isn't working label Apr 19, 2024
@ruru-m07
Copy link

@jakub-sekula are you able to add those components like button input card etc... or same problem with all components add?

@Widdin
Copy link

Widdin commented Apr 21, 2024

@jakub-sekula Are you by any chance using ESET Antivirus?

https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/

@jakub-sekula
Copy link
Author

@jakub-sekula Are you by any chance using ESET Antivirus?

https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/

I am actually, it's being used on my company network. I think this may be it, I'll check in with the IT people this week and let you know if and how it's solved. But it does sound like this issue is external to shadcn though.

@renzonj
Copy link

renzonj commented Apr 21, 2024

If you have access to ESET settings, you can disable the HTTPS Traffic scanning.
Setup > Internet Protection > Web access protection (gear icon) > HTTP(S) traffic scanning > then turn off the HTTPS Traffic scanning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants