ui
                                
                                 ui copied to clipboard
                                
                                    ui copied to clipboard
                            
                            
                            
                        Failed to fetch styles from registry
I'm getting this error while trying to install shadcn command: npx shadcn-ui@latest init
error:
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: read ECONNRESET
at ClientRequest.
It seems more like a network issue ig, did u try installing again later?
I'm not sure it's from network.becuase there was not any network problem to open this issue on github and after 30 minutes I could install from the same network. I guess there is some issue with shadcn.
got this issue how to solve
I have the same problem
PS D:\Projects\TehService> npx shadcn-ui@latest init
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason:
at ClientRequest.
the same problem. I tried it with many different network on different system, but encountering the same problem!!!
I also have the same issuer
The same problem for me .
PS C:\projects\next\shadcdntest> npx shadcn-ui@latest init
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: connect ETIMEDOUT 76.76.21.123:443
at ClientRequest.
I
I also have the same issuer
Fixed it, problem was in http proxy certs
I solved it. NPX does not use the npm configuration, so my proxy settings were ignored. I had to set local user variables in my PowerShell environment, which was the main problem.
To resolve this, I used the following commands in PowerShell:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://server:port/' New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://server:port/' This enabled NPX to connect to the shadcn repository.
Then, I encountered an issue with an untrusted certificate. I resolved this by adding the shadcn certificate to the root certificates in the certmgr.msc utility for Windows.
I
I also have the same issuer
Fixed it, problem was in http proxy certs
how do it?
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'https://ui.shadcn.com/'
I encountered the same problem, tried your solution and the problem was fixed. Thank you
I solved it. NPX does not use the npm configuration, so my proxy settings were ignored. I had to set local user variables in my PowerShell environment, which was the main problem.
To resolve this, I used the following commands in PowerShell:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://server:port/' New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://server:port/' This enabled NPX to connect to the shadcn repository.
Then, I encountered an issue with an untrusted certificate. I resolved this by adding the shadcn certificate to the root certificates in the certmgr.msc utility for Windows.
Your region is probably blocked by shadcn. I also had this problem and changed the proxy and was able to install it. If you use a proxy, test different regions.
I solved it. NPX does not use the npm configuration, so my proxy settings were ignored. I had to set local user variables in my PowerShell environment, which was the main problem.
To resolve this, I used the following commands in PowerShell:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://server:port/' New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://server:port/' This enabled NPX to connect to the shadcn repository.
Then, I encountered an issue with an untrusted certificate. I resolved this by adding the shadcn certificate to the root certificates in the certmgr.msc utility for Windows.
really helped
I solved it. NPX does not use the npm configuration, so my proxy settings were ignored. I had to set local user variables in my PowerShell environment, which was the main problem.
To resolve this, I used the following commands in PowerShell:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://server:port/' New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://server:port/' This enabled NPX to connect to the shadcn repository.
Then, I encountered an issue with an untrusted certificate. I resolved this by adding the shadcn certificate to the root certificates in the certmgr.msc utility for Windows.
Hello there. I'm having this same issue on Mac. Do you have any idea how I could fix this on Mac?
I am also facing the same error. How to fixed this issue?
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: connect ETIMEDOUT 76.76.21.164:443
at ClientRequest.
My operating environment is Windows. I used Google to look up the IP address for https://www.shadcn-vue.com/registry/styles/index.json and found it to be 104.21.17.226 . and  I edited the hosts file on my Windows computer, adding the line:
104.21.17.226 www.shadcn-vue.com
With this addition, the configuration takes effect locally for me; however, some Windows devices might require a restart for the changes in the hosts file to be applied.
Side note: As a Chinese person, dealing with these sorts of network issues can often be quite draining.
Hope you can enjoy it !!!
I encountered a similar issue where I couldn't even access the shadcn website. I set my region settings to the correct location, and the problem was resolved. Previously it was set to the United States
I encountered the same issue in NextJS 14 version, And resolved it by opening a new terminal and again running the command: npx shadcn-ui@latest init in a new terminal and it worked!
I'm encountering the exact same thing running npx shadcn-ui@latest init:
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (file:///C:/Users/c8m9s/AppData/Local/npm-cache/_npx/2c1ae577c581653c/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:492:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  erroredSysCall: 'read'
}
I tried the Powershell proxy update suggested above:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://localhost:3000/'
New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://localhost:3000/'
This didn't resolve the issue.
i am having the same issue currently how do i go about it?
npx shadcn-ui@latest add card
FetchError: request to https://ui.shadcn.com/registry/index.json failed, reason: read ECONNRESET
at ClientRequest.
@Falasefemi2 Try by killing the terminal and open the new terminal and enter the command again! Don't know how but, this worked for me twice
FetchError: request to https://ui.shadcn.com/registry/index.json failed, reason: write EPROTO 00E6541201000000:error:0A00010B:SSL routines:tls_validate_record_header:wrong version number:ssl/record/methods/tlsany_meth.c:81:
at ClientRequest.<anonymous> (file:///Users/vikash/Desktop/bloggr/frontend/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: 'EPROTO', code: 'EPROTO', erroredSysCall: 'write' } Failed to fetch components from registry. getting this error on my mac.
Add the following two lines to the Windows hosts file and restart your computer
104.21.17.226 www.shadcn-vue.com
76.76.21.9 www.ui.shadcn.com
this is because the network you are using has blocked shadcn. I was using my company network. Got this issue, realized then.
I solved it. NPX does not use the npm configuration, so my proxy settings were ignored. I had to set local user variables in my PowerShell environment, which was the main problem.
To resolve this, I used the following commands in PowerShell:
New-Item -Path 'Env:' -Name 'HTTP_PROXY' -Value 'http://server:port/' New-Item -Path 'Env:' -Name 'HTTPS_PROXY' -Value 'http://server:port/' This enabled NPX to connect to the shadcn repository.
Then, I encountered an issue with an untrusted certificate. I resolved this by adding the shadcn certificate to the root certificates in the certmgr.msc utility for Windows.
Thank you for your answer. Please can you provide any information about how you added shadcn certificate to the certmgr.msc utility
Use a VPN while installing shadcn ui .
I deleted my 'node modules' folder, pnpm install it again and finally run the command: npx shadcn-vue@latest init it worked for me !
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.