Category "node.js"

NodeJs - Get last modified file in sub directories of directory

I have the following code to list all folders within a directory, and it maps each folder's name and date created. I'm struggling to get the last modified file

Unable to connect to the Postgres database in Docker Compose

I am building a Node JS Web application. I am using Postgres SQL and Sequelize for the database. I have the docker-compose.yaml with the following content.

Handle Notification Bidirectional Body Text in the Correct Way

I have a notification service that sends a notification to the client according to its language. The notification body language can be either Arabic or English.

How to manually extract context or span from incoming http request in NodeJS?

I trying to migrate my Node.js application from jaeger-client to @opentelemetry/* packages In my Node.js application i have a simple http server and i want to c

findOneAndUpdate. Select array of messages, select message object and update likes array inside it

I use mongoose findOneAndUpdate method, but could't achieve the result. I always get the same object back. No errors. Here's my code. User object: { "_id" :

Javascript - draw a rectangular selection on an image

I need some help to implement a feature in my vuejs capacitor app. I'm getting a snapshot from an ip cam every second and this will simulate a video stream sinc

NestJs e2e returns 201 created response though required form data is missing, expected 400 bad request

I'm trying to write a test that checks if request body does not have proper data, it should return an error, and the status code should be 400. Which I think is

Serverless deploy from M1 MacBook Pro causes invalid ELF header error

I have a serverless REST api connecting to MongoDB atlas. When making changes and running sls deploy everything deploys as normal. But when I query the DB from

Azure Function disabled setting "user" field to HTTP request object on the 26th of April 2022

(!) Issue cannot be reproduced locally. Azure Function Version ~4 Node Version 14.18.1 Creating a simple HTTP triggered Azure Function and setting just two simp

Why is my create react app giving no output?

I'm doing a tutorial for a basic CRUD app with React and Tailwind, this is my first time setting it up and I'm trying to display a navbar but when i run 'npm ru

Return the data of a model directly instead of a dictionary Express.js and Mongoose

Probably the title isn't very clear and is a bit confusing, and to be honest, I do not really know how to ask this question since I'm new to JavaScript and Mong

I am making a discord.js bot and I want to know if there was an error

I am using the following code to figure out if there was an error. But I want to not run something if there was an error. I have tried to look it up and I could

How to link an old version of node in mac using homebrew

I am trying to link to an older version of node using homebrew in my mac (because netlify doesn't work with v17 - which is my default). When I search which vers

Error only shows the first time using Axios on getInitialProps

Hi everyone i've an issue fetching data with Axios Let me explain to you what im doing: i've my FrontEnd made in NextJs but my BackEnd was made on C# then when

ESLint: Plugin "react" was conflicted between

I have a React app inside a monolith npm component package. The React app serves as a demo site which consumes this component package as an integration step ove

How to make a button event handler in discord.js V.13

I create a function to send an embed message with a button and now I would like to create an event handler to detect when the button is clicked and execute a fu

Openpgp Encrypt with PGP

I am trying to encrypt a message using PGP but I am getting an error that states: ReferenceError: TextDecoder is not defined at Object.decodeUTF8 (node_m

How can i fix Error: Cannot find module. Using sequelize, express, node and mysql

Can some one help me? Node v16.15.0 "body-parser": "^1.20.0", "express": "^4.18.1", "mysql2": "^2.3.3", "path": "^0.12.7", "sequelize": "^6.19.0", "sequelize-cl

Hardhat: ProviderError: The execution failed due to an exception

I'm deploying contracts with hardhat, but cannot use address type in contracts ProviderError: The execution failed due to an exception. at HttpProvider.requ

Integrate jsdoc into docsify

Im trying to document my node.js/javascript application. The frontend is a vue app & backend a node.js app. I use jsdoc to document classes/modules etc. and