I’m encountering an issue while attempting to add a table component to my project using npx shadcn-ui@latest add table. The command fails with the following error message:
FetchError: request to https://ui.shadcn.com/registry/index.json failed, reason: getaddrinfo ENOTFOUND ui.shadcn.com
at ClientRequest.<anonymous> (file:///C:/Users/Sheraz%20Akram/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:518:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:518: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: 'ENOTFOUND',
code: 'ENOTFOUND',
erroredSysCall: 'getaddrinfo'
}
Failed to fetch components from registry.
I’m trying to incorporate the Shadcn-UI library into my project for its table component functionality. However, it seems that there’s an issue with fetching components from the registry, as indicated by the error message.
What I’ve Tried:
-
Checked my internet connection to ensure there are no connectivity issues.
-
Verified that the URL https://ui.shadcn.com/registry/index.json is accessible via a web browser, which it is.
-
Attempted the command multiple times, but the error persists.
Question:
-
What does the “ENOTFOUND” error signify in this context?
-
How can I troubleshoot and resolve this issue to successfully fetch components from the Shadcn-UI registry?
-
Are there any alternative methods or workarounds I could employ to integrate the table component into my project?
Any insights or assistance would be greatly appreciated. Thank you!
Sheraz Akram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.