Getting timeout on trying to create new react project - node.js

I am trying to create a new react project, I tried using both npm and yarn but I am getting a server timeout error in both cases. I also tried reinstalling node but that didn't help. I also tried resetting registry but even that didn't help. This is my error:
Trace:
Error: https://registry.npmjs.org/create-react-app: ETIMEDOUT
at Timeout._onTimeout (/usr/share/yarn/lib/cli.js:141550:19)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
How should I solve this?

Related

Getting Timeout errors when load increases in ioredis

We're using a NodeJS-based app using express for routing http requests. Before routing the requests we have a middleware to perform some validation using Redis, wherein we use ioredis.
When the load is moderate it works fine. But when there is an increase in load, ioredis started throwing timeout errors.
Error: Command timed out at Timeout._onTimeout (/proj/node_modules/ioredis/built/command.js:261:33) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
[stack]: 'Error: Command timed out\n' + ' at Timeout._onTimeout (/proj/node_modules/ioredis/built/command.js:261:33)\n' at listOnTimeout (internal/timers.js:554:17)\n' + ' at processTimers (internal/timers.js:497:7)',
[message]: 'Command timed out'
Initially, we had the command timeout set as 2 seconds. It started throwing the error frequently. Post that we now changed it to 5 seconds. It was better than before, but still, we face the timeout issue when the load increases.
We didn't find any redis slowlog too. We're using a Kubernetes setup within which we use redis sentinels ( 1 master 2 slaves ) to connect to from the app.
Any help on this query would be helpful

How can I complete the Sanity init while error during "resolving latest module versions" keeps appearing

When trying to init Sanity I keep getting this error during the "resolving latest module versions" step.
Error: connect ETIMEDOUT xxx.xx.xx.xx:xxx
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
I saw here something about specifying the pool variable in options. Without access to the referred file, what can I do to complete the init?
Apparently, this specific error was caused by the use of a VPN or Proxy. Turning it off fixed it for me.

Error: write EPIPE trying to setup shopify app

I tried to install a shopify app in my development store. I used both the manual way (https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/embed-your-app-in-shopify) as the CLI way (https://shopify.github.io/shopify-app-cli/getting-started/).
I keep getting this Error: write EPIPE at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
I don't know what I'm doing wrong and why I can't find any solution on that error. Am I really the only one facing this problem?

Cannot detect timeout error from server api or client code ? Test with nodejs vs postman

I faced a problem that I cannot detect where it was, from server api or from my client code ?
API is product of my partner, so I cannot debug it, too.
If you've ever encountered an error like this, I'm grateful for your sharing.
Many thanks.
Here is my Postman request, evey requests was ok, got return as expected
Here is my simple code to make http post, got timeout error
got timeout error
{ Error: ETIMEDOUT
at Timeout.<anonymous> (F:\DEV\PROJECTS_IONIC\api\node_modules\request\request.js:848:19)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10) code: 'ETIMEDOUT', connect: true }

node can't connect to Mongo -- Error: getaddrinfo ENOTFOUND undefined undefined:27017

When I try to start my express server with node index.js I get the following error message:
*path/to/project*/node_modules/mongodb/lib/server.js:242
process.nextTick(function() { throw err; })
^
Error: getaddrinfo ENOTFOUND undefined undefined:27017
at errnoException (dns.js:26:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
There are many questions on Stack Overflow with similar error messages but they are mostly due to either not running mongod or typos.
I am running mongod, I can connect to mongo via the terminal. I changed some code and hit some errors, but then started fresh from working code. The current code worked to connect to MongoDB before (and production version works with the same code).
I can also run an express server and connect to MongoDB on the same machine with different node projects with similar setups.

Resources