Category "node.js"

Using innerText without async in puppeteer

i was creating a certain code of puppeteer ,and i wanted to know if there's a way to get innertext or innerHtml or textcontent while using puppeteer without an

Why does My chrome Browser show the issue "Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform"?

My chrome browser suddenly shows an issue like that A page or script is accessing at least one of the navigators.UserAgent, navigator.appVersion, and navigator.

when i use uuid the code unexpected crash, and then works fine?

const express = require('express'); const { uuid } = require('uuidv4'); const app = express(); app.use(express.json()) const projects = []; app.post('/proj

How to create a file inside a folder?

I have fileUploadPath="d:/downloads"; and entry.name='155ce0e4-d763-4153-909a-407dc4e328d0/63690689-e183-46ae-abbe-bb4ba5507f1a_MULTI_0_3/output/res2/res2.fcs

NodeJS/React install xpi file instead of downloading it

Situation : 1.My nodeJS server serves a file like so : fileRouter.get('/firefox', async (req,res)=>{ const mime = 'application/x-xpinstall'

MQTT Connection Fails on Google Container OS

For my setup, I'm working with a third party MQTT VerneMQ broker hosted in AWS. I have been given username/password credentials to connect over secure MQTT (por

Hide Textbox with parameter name completely when the checkbox is disabled in UI

When I enable the checkbox, I've written a js function to enable the textbox to be adjustable; otherwise, it must be greyed out. Changes Made: When I enable the

Integrating Frontend Javascript with Backend Node.Js and mySQL

I have tried searching around, but could not really find a solution to my question. Either that or I am not really understanding something properly. I have a pa

Upload/Store multiple files with multer, i.e image and pdf with single request in nodejs

The following code works to upload a single image to upload an image and store its path in the database, now I can't find a way to upload an image and a pdf fil

I'm looking to get completed events counts but this query not working

My query let findEvents = await eventModel.aggregate([ { $match: { participants: { $eq: event.userId }, eventStatus: { $

Create JSON dynamically with dynamic keys and values in Express Js

I am fetching API into my Express server which has several JSON key value pairs in one array. For Example: [{ "quality": "best", "url": "https://someurlhere.e

Why has coming Application Error When I deploy code on Heroku? What is the reason of this Error?

Most of the case when I deploy in my nodejs server on heroku. I just faced this issues called Application Error. Now Question is why this error appear when we d

Ending node pipe on Transform or PassThrough

I have a stream pipe that reads, unzips, transforms, then I'd like to choose whether it moves onto a callback or writes and moves onto a callback. I hit on Pass

Which relation in MongoDB is better?

For my whole projects I have relationed my multiple collection as this. User model Name:string, email:string, password:string, vehicles:[{ "vehicleId", "vehi

ReferenceError: "_" is not defined

recipe = new Recipe(_.pick(req.body, ['name', 'tag', 'recipe'])); await recipe.save(); }); error: recipe = new Recipe(_.pick(req.body, ['name', 'tag

Socket.io and Redis Adapter same rooms and different servers

We are creating a scalable real-time collaborative text editor. The client (frontend) code is written in React.js, and the server (backend) code is Websockets (

UnhandledPromiseRejectionWarning: BSONTypeError?

I face a problem in the node.js project. error is likes, (node:9836) UnhandledPromiseRejectionWarning: BSONTypeError: Argument passed in must be a string of 12

'SyntaxError: Cannot use import statement outside a module'

I have updated by configuration to node 16.15.0 on both local machine and server. The code is running fine on local machine but on server it gives an Error - "S

Discord js 13 button edit permission channel

When a person sends my command, a channel is created that only they have access to. Also, when creating a channel, a message is sent with the "accept" button, w

Pipedream, getting trigger event data with sync function

i'm wondering hot to get pipedream to do an nodejs action, but i need to use the trigger event (HTTP POST) to get some info, the thing is that i cant wonder how