Category "node.js"

ReactJS - Serving the Same Build from Different Paths

I try to run the same react app on different URLs but for now without success. Description of the problem: I have a react app that works perfectly fine when run

How to resolve persistent node error "EADDRINUSE"?

I'm trying to run an http server through node but I keep getting the EADDRINUSE error with specifically port 5000 (trying various others works fine). I have tri

How to fix cloudinary error "Must supply api_key"

I'm building an image upload app using multer and cloudinary. I've configured my environment variables properly using dotenv. However, when I try to upload file

Dynamic import - import() - fails when the code is packaged into an executable

I am working in a commonjs environment trying to dynamically import an es module Consider the below code : const mysqlController = (async function () { try{

How to get decrypted values in the aggregation result by the using of getter and setter in node.js

var mongoose = require("mongoose"); const Schema = mongoose.Schema; let CryptoJS = require("crypto-js"); function encrypt(text) { try { let ciphertext =

How can I convert opus packets to mp3/wav

I created a discord bot with discord.js v13, I get trouble with converting the opus packet to other file types, even the discord.js official examples haven't up

how to change npm install command in ElasticBeanstalk (Node)?

I knew that the elastic beanstalk environments will execute the command npm --production install. But, from https://github.com/npm/cli/issues/4027, npm v8 (Node

Mongoose and MongoDB - Get all countries and users associated with country

So I have a list of posts data that looks like this: [ {user: 'Bob', country: 'USA'} {user: 'Kim', country: 'Mexico'} {user: 'Darren', country: 'Mexico'}

Vercel 500 internal error! Cannot get logged in

[GET] /auth/signin?callbackUrl=http://localhost:3000 17:22:23:77 2021-10-24T12:22:24.062Z a07d6ace-3b47-4472-a45b-f7ef9989a9b5 ERROR [next-auth][err

Redis Connection Error with Heroku Redis Instance: Redis connection to failed - read ECONNRESET heroku instance

I have a node js app. And I use Redis from Heroku Redis(with async-redis library). Actually, I have two different Heroku accounts and two different Node.js apps

Cron job in strapi V3 does not get triggered when a method from strapi services is called

config/functions/cron.js async function logger() { console.log("Hello, Im Async"); } module.exports = { '*/10 * * * * *': async () => { con

How to remove duplicate object in javascript?

I have object like this : cons data = [] const result = [ { "result_id": "AAA877", "emp_id": 1, "hashtag": [ {

How to assign ROLES in _user DB for Cloudant

How do I add Roles to users in the Cloudant user database?(_users) I have not been able to sort this out using Google or Cloudant Docs. I see some mention of a

How to resolve or reject a promise from the result of another promise?

Really sorry if this has been answered, I've searched everywhere and can't find the exact problem I'm facing. Take this as the example: const fetchData = (email

Context is empty in GraphQL middleware

I'm sending from frontend authorization token in headers and then I want to check validity of this token in some endpoints using middleware and context, but con

GitLab pipeline with dotnet and node image

I'm creating a GitLab pipeline which should build, test and deploy a dotnet core application with Angular application. So far so good! This project was created

Postgres, Node, Jest - Splitting testes into two suites results in deadlock

I have two suites of tests, one for Accounts and one for Transactions, accounts.spec.js and transactions.spec.js. I'm also using supertest. When I run them in j

Using Node.js as an alternative of Spring MVC project

Hello to everyone who is viewing this question. I am currently running a web-application server, which only does CRUD operation (using MySQL) for android and iO

SyntaxError: Unexpected reserved word => prettier/third-party.js

I'm pretty new to Node, npm and webpack. I'm trying to set up a Craft 3 environment with Tailwind css. Everything worked fine out of the box, but when i run npm

Node.js x React x Auth0 - getting error 500 with docker-compose deployment

I'm creating a WebApp that has a React front end whose build is served by a node.js back end. There is some security implementation using Auth0 token validation