Category "node.js"

Firebase Functions "subscribeToTopic" works only for the first time

For some reason, I can't subscribe users for more than one topic Here is my code: exports.subscribe = functions.https.onCall((request, response) => { conso

ESBuild in NextJS: "You may need an appropriate loader to handle this file type" - /node_modules/esbuild/lib/main.d.ts

I am using mdx-bundler (which uses esbuild + node-gyp) in next.js. I have been working on this project for some time and everything is working. Now my partner j

Slow query using aggregation framework mongodb

I came up with this code to query a list of questions from db question .aggregate([ { $lookup: { from: "answers", localFie

Error parsing triggers: Cannot find module 'csv-parse/sync'

I am using Firebase functions to build an API that parses CSV files. When I try to use csv-parse/sync instead of csv-parse, my deploy to Firebase Functions fail

Playwright test with NX

I have an NX workspace with a single application called my-app. I would like to run Playwright tests for my-app application by using NX console. Currently NX do

Pass values to callback functions of action buttons in notification in node/electron application? Also callback functions not working after timeout

In a node/electron application, used node-notifier to show notification, working great. Then, added buttons 'ok' and 'cancel', and their respective callback fun

How to fix " Path is required ,ValidationError " ,Mongoose ,node

I have searched everywhere for this problem. but I cant find the correct way to fix it. help me to what is the problem. const router = require("express").Ro

I am having this " throw new RangeError('BITFIELD_INVALID', bit);" error; and i just can not find the solution

I keep getting this error: throw new RangeError('BITFIELD_INVALID', bit); ^ RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number: undefin

npm run Build:dev error when doing Advance UI Customization

I wanted to customize the UI elements in the publisher portal and followed this guide But I get the following error when running this in cmd; npm run build:dev

Deterministically generate public/private key from a seed for asymmetric encryption

I am trying to implement a client side method to encrypt data in transit, and the key will be generated from client side with node.js Right now, i am stuck in a

Is there an API call in AWS Elastic Beanstalk to have a list of running hosts? (with IPs)

The title really says it all. I need each instance running to be aware of what the other instances are, including their IP addresses. Is there an EB API call to

Error: connect ECONNREFUSED 127.0.0.1:587 – nodemailer & gmail

Dear stack overflow community, I am dealing with a project and I tried many things, but I can't handle it. I created a website with NextJS. This Website has a c

Specifying a port in MongoDB URI does not allow me to connect to my local DB

I am testing a connection to a local DB using mongoose and mongodb. Whenever I specify a port when passing in the URI to mongoose.connect() I get a connection r

When working with the native mongoDB driver, Node.js and hyper terminal, I receive an error saying "TypeError: Cannot read property 'n' of undefined"

I am using vs-code, hyper-terminal (Git Bash), JavaScript, Node.js, Express, MongoDB and its native driver but while I finished up writing my code, I wrote node

why hashedPassword = await bcrypt.hash(this.password, salt) is not working?

I'm basically trying to just hash a password using bcrypt using async/await but nothing is working... next() is not working and it is not saving the data into t

Include JSON files into React build

I know this question maybe exist in stack overflow but I didn't get any good answers, and I hope in 2020 there is better solution. In my react app I have a con

How to deploy our app which is running on parcel bundler

In my recent project, I have made an animated website using gsap and parcel-bundler. When I want to run it, I will type parcel index.html or npm run dev and it

Unable to login to Youtube acc through google sign-in with puppeteer

When executing my puppeteer code, I'm unable to get past the email page after clicking next because of some sort of bot protection from Google stating "Try usin

What is jsconfig.json?

If I search the same question on the Internet, then I’ll get only links to Visual Studio Code website and some blogs which implements it. I want to know t

Cannot read properties of undefined (reading 'path') - Multer Error

I am uploading an image to a folder in uploads via multer package. I am getting an error while testing the route in POSTMAN. location_model.js const util = requ