Category "node.js"

res.send return two or more items from a map method

I'm doing a get request and it fetches properly. From there I have to return that data based on the if statement, but the data needs to be returned as an object

What is this error "Cast to ObjectId failed for value "shop.css" (type string) at path "_id" for model "Product""?

I am trying to extract detail of products entered by that administrator. Here is the part of code dealing with that: router.get('/admin-product/:userid', (req,

sequelize migration throws ERROR: function uuid_generate_v4() does not exist

I enabled uuid extension with CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; Then ran same query generated by sequelize for migration and it worked, create table i

Jest done callback is not assignable to parameter of type ProvidesCallback or undefined

I am trying to create a test with jest and I want to use done() callback but Typescript is not accepting it, I tried to use type any, jest.DoneCallback or leavi

timeout doesn't work with nvm: nvm no such file or directory

I want to set timeout for each instance of node.js running. but when I run the following commands I got the error timeout: failed to run command ‘nvm&rsqu

How do you spread a lot of requests over time in nodejs?

I'm working on a backend that has to request data from Moralis (web3), but how can I spread the requests in time so that I don't exceed the max requests each mi

Creating Docker container for a micro-service based on node.js & grpc

I am trying to build a chat-service by using node.js and grpc, where two services running on different port can communicate to each other. I have created a sing

Error when set sameSite from strict or lax to none - HTTP only cookie - ExpressJS

I am running on a MERN stack project. Back-end runs on port 5000, and front-end runs on port 3000. After I've built to production, I pushed the server file to H

Strapi v4 Grant middleware error while setting providers

In Strapi v4, I tried to setup discord oath provider following the latest-docs. I've setup the keys and everything but when I try to hit /api/connect/discord I'

http request does not get called when uploading the data to Firebase - firebase cloud function

Hello everyone I am trying to fetch the data from Binance than do a schedule function that uploads the data from the previous fetch to the Cloud FireStore , the

NodeJS 'Readline' is not a constructor

I'm having issues with my NodeJS app. It's supposed to be a NodeJS server to serial port, but I'm having issues with Readline and it used to throw errors about

How to install PWA in magento2.4.2?

I have to **Install PWA studio for Magento 2.4.2** I did not find a proper way to install PWA studio in Magento and How to **add magento 2.4.2 to pwa studio**?

INNER JOIN on array of id's which returns array of objects by using sequelize raw query in node.js

I have data in the below format { "userId": 1 "stateId": 199, "productId": [ 1, 2 ] } I want to get this type of response

Error deploying a nextJS app on github actions

I'm trying to deploy my nextJS app on GitHub pages. I'm getting an error at the deploy stage. My node.js.yml file contains the following: name: Node.js CI on:

Trying to use nominal typing for id in typeorm typescript

I was following this article TypeORM Best Practices using Typescript and NestJS at Libeo. I got to the point of using nominal typing in our entity ID @PrimaryG

Firebase error - SyntaxError: Named export 'SDK_VERSION' not found

I am building a web app using Next.js, and I am using Firestore as my database and thus Firebase, I am connecting to the database with the following code: impo

Connection failure error unable to handle in passport-windowsauth, how to handle it

I'm trying to connect ldaps server using passport-windowsauth. If I provide valid credential the connection is working fine. If the credential is not valid then

React-query returns Cannot read properties of undefined even though I can see id is set

I am trying to learn react-query and been following quite a few guides. However everytime I try with parameters something goes wrong. This code that I have unde

How to deploy TypeScript express server to Google App Engine?

This is my app.yaml `runtime: nodejs10 manual_scaling: instances: 1 resources: cpu: 4 memory_gb: 16 disk_size_gb: 10 handlers: - url: / static_fil

Kubernetes new pod created, old deleted

I have a nodejs (nestjs) application running in a pod which downloads large csv files and then uploads these to a database (mysql, typeorm) I was tailing the lo