Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Install shadcn-ui with next.js 13.4.9

Tags:

next.js

FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: connect ETIMEDOUT 76.76.21.9:443 at ClientRequest. (file:///D:/Projects/WebProjects/Ecommerce/my-app/node_modules/node-fetch/src/index.js:108:11) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502: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: 'ETIMEDOUT', code: 'ETIMEDOUT', erroredSysCall: 'connect' } Failed to fetch styles from registry.

I've tried npm config delete proxy npm config delete http-proxy npm config delete https-proxy

and didn't work out

like image 409
Amir Avatar asked Sep 18 '25 14:09

Amir


2 Answers

It seems shadcn has blocked your region, and by setting a vpn server you could get this problem fixed.For me it works in this way.

1- set a vpn server

2- make sure it works well

3 run npx shadcn-ui@latest add [any-component]

like image 71
rmnkh Avatar answered Sep 20 '25 09:09

rmnkh


You need to run "npm run dev" first to load the next folder. Then install the shadcn component. It should work.

like image 21
Igunma Goodness Igudy Avatar answered Sep 20 '25 08:09

Igunma Goodness Igudy