Category "node.js"

Jest: TypeError: replaceAll is not a function

String.prototype.replaceAll() is a useful method and while building and executing everything works fine. However, all Jest-tests fail with the following error:

node.js req.body returning undefined

EDIT: @LawrenceCherone solved this, its (req, res, next) not (err, res, req) I am creating a MERN app (Mongo, express, react, node). I have some routes that wor

How to update value in client site using mongodb?

I am using React in front-end and Node and MongoDB in Back-end. I have created a custom hook from where I am loading the data. The following is the custom hook

How to make Next.js "see" the react-dom package?

This is my first ever Next.js project, and I encountered an odd obstacle. Even though I made sure at least 3 times that I have react-dom and react installed and

Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' Require stack:

I have webpack-cli installed on my laravel project. I don't know why first of all we need it to run my vue app but this is causing an error: When I run npm run

How to Run Postgresql procedures with Knex in Node js

I am trying to call a stored procedure saved in the public schema using: const schema = await knex.raw("call create_schema(?, 'col1', 'col2', 'col3', 'col4', 'c

How do you store a MongoClient connection in a variable for later use?

This is probably a very simple question. I am running into an issue when storing a MongoClient connection in a variable for later use. Using import { MongoClien

When should we use NodeJS and when should we use MongoDB?

As a new developer, I am always confused about using NodeJS and MongoDB. So I hope I will get an actual answer. Thanks...

I create some document to mongoose but not showing

I tried to create 5 documents in mondoDB , and I’m sure that I successfully created 5 documents. But it only shows one document on Robo3T. Here is my code

Typescript Node MODULE_NOT_FOUND

When I run yarn start (ts-node src/index.ts), I get MODULE_NOT_FOUND Error: Cannot find module 'src/isAuth'. It use to work before I added that new file isAuth.

Firebase-admin Firestore node.js share logic with modular v9 js sdk

What is the recommended way to share Firestore api logic (between the admin node.js and the js web) when upgrading to the web v9 modular sdk? The way I did it b

Issue With Paytm payment gateway integration(Custom checkout) in nodejs environment

I am using the nodejs environment to integrate PayTm payment gateway with Custom Checkout approach as mentioned in the link and on this process I need to use th

Deploying Svelte App to Heroku / Dokku fails because modules cannot be found

I am having problems deploying my svelte web3 App to my VPS running Dokku. The structure of the folder is as follows: root |-->svelte |--> ... I found s

ParserError while compiling solidity code

I am new to solidity. This is my 1st simple project when I do node compile.js & I am getting following error: My Error : { contracts: {}, errors: [ ":

After jwt verification the state change is not presisting

So on the front end I'm using this function to have the user Log In if they have a This Function only works at the time of log in and after if the users just na

Routing in a lambda function without API Gateway

I have an express app and is deployed via serverless. My stack is just a lambda function + API Gateway. That works and it's accessible on Postman or httpxmlrequ

Typescript configure mapping for compiled import path

I have an aws amplify project which is using yarn workspaces. My project has a lambda function and a layer. When the lambda function runs in aws it needs to imp

Can't receive valid test on specific test controller

I'm testing a sign-in controller and therefore I've written the following test: it("return 200 when user signed in successfully", async () => { await req

How to get last message send by bot to user in Microsoft bot framework? Or is it possible to update user state via connector API?

How to get last message send by bot to user in Microsoft bot framework, if bot send message to user via connector API? Or is it possible to update user state vi

I have a problem entering data into an object using FOR

I have an object I want to go through using the FOR loop Because I want to change the object according to my needs Here is my original object I copied it from c