Category "node.js"

NodeJS Typeorm doesn't see host in docker

I have 2 dockers composes. 1 implements an infrastructure with a reverse proxy, databases, database admins, etc. version: '3.7' volumes: mysql80_volume:

Is there an equivalent tool like ruby-prof for node.js?

I want to profile a Jest test, but I only want to see the behavior for some specific methods. In ruby, I can do that with ruby-prof, but is there an equivalent

MongoDB aggregate and then flatten

FULL DISCLOSURE: I'm a MongoDB noob I'm dealing with a legacy DB structure. A part of my MongoDB looks like this currently: Events (_id, name (string), ...) Ord

Vercel - `ZLIB_1.2.9' not found

I am trying to use canvas in a server less function on Vercel, but am running into an error I don't know how to get around: Error: /lib64/libz.so.1: version ZLI

Pending promises even though awaiting Promise.all()

I'm having difficulty understanding why I still have pending promises after awaiting Promise.all(). In the example below, I'm creating an array of promises by c

send EMail in Node.JS using nodemailer(Error: 554 6.6.0 Error sending message for delivery)

I'm trying to send some E-mails using nodemailer module. here is my program: const nodeMailer = require('nodemailer'); const randomSentence = require('random-se

NeDB ensureIndex isn't working as expected

I'm working on a twitter bot that is supposed to search the twitter api for key words in intervals and log the response in a database. I've so far logged result

Twilio send sms with nodejs not sending message

I am using twilio to send sms using nodejs, but sometimes it not working, not going to catch or not going to then, above it calling, client also created but cre

Nuxt 3 package import specifier "#internal/nitro" is not defined

I tried installing the new version of Nuxt.js with command: npx nuxi init nuxt-app Then tried just run and project in Nuxt 3 works fine. But when I tried run t

Module does not provide an export named default - compiled typescript module

I'm developing a node npm module in typescript, and after I compile it to commonjs and try to import it, I get the error: SyntaxError: The requested module 'woo

How to search tree structure with multiple types with TypeORM

thanks for reading and provide any suggestions or any keyword I can do more research. Quite new to TypeORM and have an issue on searching the tree structure wit

Unsupported certificate purpose - NextAuth - SSL in Localhost - Node server

I followed this tutorial for setting up the https in local development machine: https://dev.to/nakib/using-https-on-next-js-local-development-server-bcd And her

How to deploy nodejs Azure function to azure with docker?

This is my first time playing with azure. I have a simple tool written which has to fetch some data from the postgres db, and send it to a MS teams channel. All

How do I get the POST data from a netlify serverless function?

Here is the code for my server which works fine. I am trying to achieve this with netlify's serverless functions which I have pasted further below. CODE ON STAN

MS Teams Bot -- Is it possible to invoke a botMessagePreview from a task/submit activity as opposed to from a composeExtension/submitAction activity?

I am building a messaging extension in Teams that uses task modules and sends adaptive cards. I want to invoke the same task module from both a messaging extens

how to store 16 bits buffer to PNG file using sharp.js?

I'm using sharp.js to create PNG images in node.js from a file containing a 16-bit RAW data map. fs.readFile(myFolder + "frame1250.dat", (err, buf) => { le

I am trying to make a discord.js discord bot and I am getting the error: TypeError: interaction.isCommand is not a function

I am making a slash commands and keep getting the error TypeError: interaction.isCommand is not a function. I am using discord.js version 12.5.3. It says that i

exceljs error when reading csv file uploaded from windows

When uploading csv file created by windows; an error is generated when trying to parse the file using exceljs. Here is the error message: message: "Can't find e

Web Crypto Api fails to verify signature after converting from string

I am storing my data, including the signature in string format, and after converting the signature to and from strings following the MDN Documentation the verif

Stripe Construct Event: No signatures found matching the expected signature for payload. Javascript, Express

I get an error whenever I try to construct the stripe webhook event: No signatures found matching the expected signature for payload. Are you passing the raw r