Category "node.js"

How can i realize http-streaming of kafka messages to endpoint on Nodejs?

I've been trying to realize stream kafka messages by get endpoint on client side using http-streaming. Thats my kafka consumer, where i recieve messages from pr

CORS error with OPTIONS request using AWS CDK

I am using AWS CDK to run a RESTful API and I am getting the following preflight error when calling a POST endpoint: Access to fetch at 'http://localhost:4000/

How do I design my NodeJS app to have one config (per env) that can work for both K8S and locally in debugger?

I've been using K8S for a year or so and continue to revisit a problem. My app is running in K8S and I now need to debug it. I have a NodeJS App that I'm askin

Jest + Supertest - API tests are using random ephemeral ports

I'm using Restify for my API and I'm trying to write tests for my endpoints. At first, I had only a test for ping and it was okay, but now, after I added a new

Ineffective mark-compacts near heap limit Allocation failed error when building next.js app

I have a next.js app running inside a docker container in a EC2 instance. When I run docker-compose up this will trigger the next.js app to be built. Now it is

Difference between NodeJs preload option (-r) and explicit require in in REPL

I'm using esm which is a very useful package to support ES import keywords. According to the doc, in REPL, it can use preload command-line option to initialize

Jest spyOn with uuid breaking in 8.x

I have a jest spyOn with the uuid which was working in the version 3.4.0 after upgrading it to 8.3.2 the test breaks with the error Cannot spyOn on a primitive

Nodejs Axios Error: Hostname/IP doesn't match certificate's altnames: "Host: (URL). is not in the cert's altnames: DNS:*.sa-east-1.es.amazonaws.com"

I'm trying to request an API from a third party server from a shared hosting server, so i don't have root access, and receive this error, but when i try it from

Error when installing necessary packages on Node js

I was installing Node.js on Windows. It installed successfully, and I also selected the option to install necessary files (such as chocolatey) in the node.js in

Error response from daemon: failed to create shim when installing Nodejs

I am trying to create a docker image with node.js version 16. However I failed to find solution to this problem despite searching stackoverflow and other platfo

My delete function will not work using react frontend but backend are okay its working

I'm new to React. I am working on a react application that communicates with a MYSQL database. When i open the application I get a list of all the students who

How to solve Node mon crashing problem when connecting mongo DB using NodeJS

Node mon app crashing problem when connecting Mongo DB using Nodejs

TypeScript/Eslint throwing a 'Promise returned' error on a Express Router async route

I have the following endpoint setup to reset a database after test runs: import { getConnection } from 'typeorm'; import express from 'express'; const router =

Uncaught Error: Type HttpClient does not have 'ɵmod' property

I'm creating a news app referring this link https://www.youtube.com/watch?v=D8J9QUwTWmU&t=3s&ab_channel=CodeXpression getting error while checking it fi

How to remove schema validation in mongoose (mongodb)?

I have MongoDB server version: 5.0.6 installed and used "mongoose": "^6.0.14" to create a model validation. Example of model: const User = new Schema({ name:

react js send object to node js

I send the object to the backend(Node js) when API call. but I check objects using console log. I checked using POSTMAN. When I checked POSTMAN, I worked very w

Alignment of column for PDFMake to sit at bottom of page

I am having some issues with figuring out how to set a column with content to the bottom of my PDF. This is not on every page, just the last page of the PDF, so

Express or Axios Error: socket hang up code: ECONNRESET

This is the first time i post a question here, sorry if some data is missing. I'm trying to do some web scraping to get some info of a table. The page only resp

React native crypto stream module is undefined

I'm giving a try with [react-native-crypto][1] in order to learn how to convert nodejs to be used in React Native project in the future. Unfortunately, I couldn

Keeping node.js express running after logoff

I've setup a node.js app started with pm2 and all is working fine I've also tried adding watch and save options (see more about the windows service below) pm2 s