Category "node.js"

I am trying to connect and read data from mysql in node js and react project with clinet and server setup but

**I am trying to connect and read data from MySQL database in node js and react project with client and server setup but unable to get success, here is the code

Nodejs readstream, what value should I use for highWaterMark

I have a copy function that uses createReadStream and createWriteStream to give me progress events during a file copy: createReadStream(source, { highWa

Embedding issue / All messages send at once

I'm having this issue where all my embeds are together. How do I separate them? My issue is that every time I run the embeds send together, I know the issue bu

Command prompt pops up and closes

My command prompt opens up randomly for like 10 seconds and then closes. The title says npm. I don't know what is causing it or how to solve it. Do you guys hav

TypeError: cleanUrl is not a function while creating a React Project

Hey everybody I am getting this error after hosting a website on firebase or I am not sure about it. It's the replace-info.js screenshot. I am not able to fi

How to use resemble ai api

I have tried to create a project in which I can use my voice in text to speech in Javascript but I recieved an error saying this. https://i.stack.imgur.com/fnIp

NodeJS heapUsage unchanged when using fs.readFile vs streams

I've been learning about memory management in Nodejs and I'm trying to understand why the following two behaviors occurs: PS: I'm using the following utility fu

Change region of firebase cloud functions of callable in v2

Hey so I am trying to upgrade to v2 of firebase cloud functions, but when trying to change the code I noticed that my functions do not have .region anymore like

Calling JDBC from Node.js: java.lang.UnsupportedClassVersionError

Not quite a duplicate of this Q&A when I try to use a JDBC driver from Node.js. For reference, Node.js runs initialize.js which is the following script: var

Node JS file write time [duplicate]

I have code that writes data to a file, how can it be done to show how much time it took to write a file? const fs = require("fs"); fs.writeFi

What is the equivalent of this php code in Nodejs?

I have this php code to encrypt and decrypt with RSA, I use only the encrypt data, because I need to decrypt the data with Node.js <?php include 'vendor/auto

Not able to Run my Application in Azure container Apps

I have node docker application which is running on Azure app service but the same application is not working on Azure container apps. I'm not able to find the i

How to insert array to object using postman and nodejs. Send the data to mongodb

I Write My code like this but it has error, How to rewrite this code db.collection('collection_name').insertOne({ name:req.body.name, details:[{ age:req.body.ag

Error message : MongoServerError: bad auth :Authentication failed

What is the reason behind this error? this code I am using to connect to DB. const uri =`mongodb+srv://${process.env.DB_USER}:${process.env.DB_PASSWORD}@cluster

The provided value is not of type '(ArrayBuffer or ArrayBufferView)' when it is

I convert to ArrayBuffer using the function base64ToArrayBuffer but I'm getting an error that says it's not ArrayBuffer and the key is the type of CryptoKey. I

In Mongo, If a document I'm saving "Prateek" then I don't want on the next create operation even the "prateek" or "praTEEK", etc is saved

//** If I'm adding a new document with the name: "India", then I don't want that the DB allow another name with the name: "INDIA", "india", "indIA", etc. I'm ne

How to render JSON output from an API on the same webpage in which the user gives the input , preferably in a Div container in Express JS?

So here, I am using NodeJS with Express Js. I have stored the JSON value from an API in a variable and I am trying to show the JSON output on my HTML page, I a

Resolving 'Illegal-mix-of-collations' MYSQL error in node

I am connecting to a mysql database from node using mysql2 and have been experiencing intermittent illegal-mix-of-collations errors - see this question. The col

how to add digital signature to hash data in node js use .cer file?

I'm new to digital signatures and how to use them, so I can't complete my task. Sign the hash with the CADES-BES signature. Insert a new element with a Base64

How to get mongo documents created in the last 24 hours using mongoose?

I have this mongoose schema const PictureSchema = mongoose.Schema({ user: { type: mongoose.Schema.Types.ObjectId, ref: 'User', requi