Issues with npx shadcn Commands in Restricted Network Environments #6418
Closed
thebunnyweb
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm experiencing difficulties when using npx shadcn commands (add, init) in a restricted network environment. While
npm install @shadcn/ui
completes successfully, any npx shadcn command that requires network queries fails due to firewall restrictions that block access to ui.shadcn.com.Issue Details:
Commands like npx shadcn add button and npx shadcn init initiate network requests that are blocked by our corporate firewall.
This issue occurs despite being able to install the main package without any network issues.
Possible Solutions:
Could there be a way to configure shadcn commands to use a predefined set of components or a local cache that doesn’t require fetching from the network every time?
Is there a proxy configuration that I might be missing specifically for npx that differs from the standard npm proxy settings?
Steps to Reproduce:
Run
npm install @shadcn/ui
— this completes without issue.Run
npx shadcn add button
ornpx shadcn init
— these commands fail to complete due to network errors.Environment:
Node.js version: v18.17.0
npm version: 9.6.7
Network environment: Corporate firewall
Beta Was this translation helpful? Give feedback.
All reactions