N
Nuxt2mo ago
tb13

npx nuxi module add hub does not work

I am trying to install nuxt hub however I get following error: Cannot search in the Nuxt Modules database: FetchError: [GET] "https://api.nuxt.com/modules?version=all": <no response> fetch failed I am behind a proxy/vpn do I have to configure npx or nuxi to use the proxy? Does it not pick up https_proxy/http_proxy var from bash?
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @tb13. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, I don't have specific details about configuring npx or nuxi to use a proxy. However, I can provide some insights and suggestions related to your issue: 1. The nuxi module add command is indeed used to install Nuxt modules, as mentioned in the Nuxt documentation (https://nuxt.com/docs/api/commands/module). This command is designed to search for and add modules to your Nuxt application. 2. The error you're encountering suggests that the command is unable to reach the Nuxt Modules database, which is likely due to your proxy/VPN setup. 3. Regarding the use of https_proxy/http_proxy environment variables, Nuxt and its CLI tools typically respect these system-wide settings. However, the behavior might vary depending on your specific setup and the version of Nuxt you're using. To troubleshoot this issue, you could try the following: 1. Ensure that your https_proxy and http_proxy environment variables are correctly set in your bash environment. 2. Try running the command with explicit proxy settings, for example:
HTTPS_PROXY=your_proxy_url HTTP_PROXY=your_proxy_url npx nuxi module add hub

HTTPS_PROXY=your_proxy_url HTTP_PROXY=your_proxy_url npx nuxi module add hub

3. If the above doesn't work, you might need to configure npm to use your proxy. You can do this by running:
npm config set proxy <http://your_proxy_url>
npm config set https-proxy <http://your_proxy_url>

npm config set proxy <http://your_proxy_url>
npm config set https-proxy <http://your_proxy_url>

4. As a workaround, if you're unable to use the nuxi module add command, you could manually install the module using npm or yarn, and then add it to your nuxt.config.ts file. If these suggestions don't resolve the issue, you might want to check the Nuxt GitHub repository for any open issues related to proxy support or consider opening a new issue to get more specific help from the Nuxt team. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@1103319221309546527> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
tb13
tb13OP2mo ago
npx nuxi@latest upgrade --force gives me errors, pnpm install however does download packages ... what is the difference there?
Want results from more Discord servers?
Add your server