Context: I stay in college dorms, so I need to use college proxy for internet access.
So, recently I tried to use ShadCN for my latest project. After adding components to the files as directed by the official documentation, I had to run the command
npx shadcn-ui@latest init
But, when I run it, I get the following error:
node:internal/errors:477
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:564:9)
at new URL (node:internal/url:640:5)
at new HttpsProxyAgent (C:\Users\{My name}\AppData\Local\npm-cache\_npx\125ee17d583c4e03\node_modules\https-proxy-agent\dist\index.js:56:50)
at file:///C:/Users/{My name}/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/shadcn-ui/dist/index.js:2:3169
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
input: '{The proxy}',
code: 'ERR_INVALID_URL'
}
What are the reasons there could be such an error and do you all know any way to fix it?
Thank You!
I looked it up on Google and scoured forums that address the problem but to no avail.