Category "express"

Node JS "Importing binding name 'default' cannot be resolved by star export entries" for HLS.js

Currently I have the following folder layouts in node JS and installed express js sdk-components --- HlsLoader.js node_modules --- hls.js --- s

express.json() is an unknown property

Typescript doesn't recognize the express.json() function although many tutorials state this code should compile as it is. Is there something I have done wrong?

AWS S3 Node.js SDK `NotImplemented` Error with Multer

I'm trying to set up an endpoint to upload files to an AWS S3 bucket. I am using Node.JS, Express, the AWS S3 SDK, and the Multer library. This is the code I'm

How "equals" in express-validator works?

I have to validate two fields are equals. In this case both passwords are the same. The problem it is that the "equals" from express-validator is not working. T

why my condition expression for attribute not exist fails in dynamodb

My DynamoDB table has a primary key as id. The same id will be used to query a record. Now I want to insert a record with id and originalURL as attributes, I wa

Mongoose ValidationError makes Express Server crashed

I have struggled with this problem for many days. Whenever I make an invalid POST request, it throws me an Error. Sounds good but when I cancel that request, th

Mongoose ValidationError makes Express Server crashed

I have struggled with this problem for many days. Whenever I make an invalid POST request, it throws me an Error. Sounds good but when I cancel that request, th

req.cookies returns [Object: null prototype] {} even if the cookie is set

I try to store and read a cookie via cookie-parser. Setting the cookie is working fine. Its listed under the "Application"-Tab of the dev tools: But if i try t

Save data found from mysql to local variable [duplicate]

I'm trying to save the returned data from MySQL to a local variable, This is what I tried const queryUser = "SELECT * FROM Users WHERE email

Sending Array of files to the server in React

i am trying to send array of files like this to the server but i have a problem it always sent to the server by this format [Object file] how can i send the fil

res.download() callback function doesn't work properly

The callback function for res.download() is supposed to run when the download is finished. But sometimes it runs when download is still in progress. Is it a bug

What is a rich object?

I'm learning Express. While doing a tutorial, I stopped to try to figure out why the tutor used express.urlencoded({extended: false}). I learned what url-encodi

Prisma.js: We found changes that cannot be executed

I've used prisma.js as an ORM in my project. After executing the npx prisma migrate dev --name rename_and_add_some_columns, I got this error: We found changes

How to store and retrieve checkbox state on refresh of page? Mongoose/EJS/Nodejs/Express

I have a checkbox, essentially like a to do list. When i check the box, I want to retain the state even after i refresh the page by using mongoose. I do know of

Azure Blob Storage .uploadStream() hangs on larger files

I'm currently working on the capability to upload larger files to Azure Blob Storage using Express.js and the @azure/storage-blob package. What I have works fin

Jest: to check if a function is called by a specific instance of class in JavaScript/Typescript

I am testing some express middlewares with jest. it("should throw 400 error if request.body.id is null", () => { const req = { body: { id: null } } as an

How can i realize http-streaming of kafka messages to endpoint on Nodejs?

I've been trying to realize stream kafka messages by get endpoint on client side using http-streaming. Thats my kafka consumer, where i recieve messages from pr

Stripe API "No valid payment method types for this Payment Intent."

As you can imagine I´m currently setting up the payment API with using Stripe. Problem is, I´ve never done such thing before and am following the do

Express or Axios Error: socket hang up code: ECONNRESET

This is the first time i post a question here, sorry if some data is missing. I'm trying to do some web scraping to get some info of a table. The page only resp

Keeping node.js express running after logoff

I've setup a node.js app started with pm2 and all is working fine I've also tried adding watch and save options (see more about the windows service below) pm2 s