473,492
questions
0
votes
0
answers
5
views
MSW Mocking exceljs Passthrough Readable Stream
I am trying to write a unit test by using the Mock Service Worker (msw) to mock an exceljs Passthrough Readable Stream, but I am getting this error:
FAIL __tests__/excel.test.js > ...
0
votes
0
answers
14
views
Node.js first Api call succeeds, second Hostname/IP does not match certificate's altnames
I've seen many posts about this, and how this means that you need to fix your certs.
I'm a little confused as to how these certs work in my context. I have 2 Api calls on my React app to an node.js ...
0
votes
1
answer
15
views
Switching to node 18.18.0 using NVM, but Next complain on using different version of node (20.3.1) when starting new project
as the title mentioned, I am currently using node 18.18.0 for compatibility with next.js dependencies, i uninstalled every node version possible, and only kept one, yet on starting a new next project ...
0
votes
0
answers
13
views
Nodejs worker pool fine tuning
If I understood correctly:
by default nodejs provides a worker pool, whose size can be tuned with UV_THREADPOOL_SIZE (default: 4)
a cpu or io intensive task can use thread from this worker pool (this ...
1
vote
0
answers
16
views
Axios returns 403 on API call but okhttp3 (java) works fine
I know that this question might be already answered, but I checked related questions, tried the solutions but could not get it to work.
Here is the issue:
Goal
Get JSON response from the following API:...
0
votes
0
answers
24
views
how not to write routes for express node js application
I'm working on a Node.js/Express application, and as the project grows, I'm starting to run into issues with managing and registering routes in a centralized app.js file. Here's how I've structured my ...
0
votes
0
answers
11
views
grep via child_process.spawn works on Git Bash for Windows, or real bash on Linux - but not both
The following code works on Windows but not on Linux (Amazon Linux 2023):
const regex = "((fa[lrsdb]\\s+|(fa-(?:solid|regular|light|thin|duotone|brands|sharp|sharp-duotone)\\s+)+)(fa-fw\\s+)*)(fa-...
0
votes
0
answers
11
views
Not able to get proper Data in the excel file created using ExcelJS package in NodeJS
so i trying to create a xlx file from the input and upload it to S3 bucket so
when i pass large data say 1000 rows I could see that only column headers are created in the file not the data but still ...
0
votes
1
answer
9
views
No Gulp Found Error - in sharepoint package deployment
I'm trying to Embed Microsoft Team in Sharepoint and following this article step by step Website
I'm getting the error gulp package-solution --ship
No GulpFile found
No GulpFile found
I'm in the last ...
0
votes
0
answers
11
views
Puppeteer bot works locally but fails to click button Kubernetes
I have a Teams meeting bot using Puppeteer that works perfectly fine locally but fails when deployed to Kubernetes. The bot get stuck and can not click on the button even though it found that button.
...
0
votes
0
answers
10
views
WebSocket notifications not working with deployed Render URL but working locally
I am experiencing issues with WebSocket in my code. When using the deployed URL from Render (https://polis-backend-test.onrender.com), I do not receive notifications on the frontend. However, when ...
0
votes
0
answers
15
views
How to prepare an AWS lambda layer for libraries with native bindings (e.g., faiss-node)
I'm trying to use the faiss-node library in my AWS Lambda function as a lambda layer, but when I try to invoke the function, I get the following error:
{
"errorType": "Error",
&...
0
votes
0
answers
10
views
uWebsocket HttpResponse not resuming / pausing properly
below is my file upload function with the respective files with the router initialization, I am trying to stream write a file in this code, I am still relatively new to the concepts of streaming in ...
2
votes
3
answers
73
views
Uncaught Exception, even with Try Catch
After searching on SO, I could not find an answer to this problem. All of the questions I saw, the error was still being caught. I'm having the inverse problem. No matter how I refactor the following ...
0
votes
0
answers
12
views
fs.watch doesn't return an FSWatcher instance in Electron
I have an Electron React App
Where I'm trying to call .close() on the object that I assigned an fs.watch to. But I think Vite, Electron or something is wrapping something around the object returned ...
0
votes
1
answer
11
views
How to use local node_modules and .mjs script from somewhere else
I have a project that works fine when I have:
/project
my-script.mjs
node_modules
....
And execute it as follows
$> node ./my-script.mjs
However, the actual case is ...
0
votes
0
answers
16
views
Node.js socket io server disconnects python socket.io client after 30 seconds
Node.js socket io server disconnects python socket.io client after 30 seconds..
server sends this:
0{"sid":"6afJCYzsh1Yz3bh3AAAA","upgrades":[],"pingInterval":...
-1
votes
1
answer
33
views
How to handle authentication in a backend using Firebase Admin SDK and Express with TypeScript?
I am implementing sign-in logic for my app's backend, built using Express with TypeScript, and leveraging the Firebase Admin SDK. However, after exploring the methods provided by the auth instance and ...
0
votes
1
answer
39
views
How can I wait for a JavaScript function to evaluation when scraping a website using Puppeteer/Node.js?
I have a website where I want to manipulate certain user inputs, generate a report by clicking a button, and download the resulting report by clicking on button.
I recorded the user behaviour (...
0
votes
0
answers
14
views
Modifying response body from target proxy through http-proxy-middleware
I am trying to modify HTML body response of proxied target url, but my res.send method is not executing because onProxyRes function not waiting the proxyRes.on('end', () => { event.
const express = ...
-1
votes
0
answers
24
views
Problems with deployment
there is a problem with me, i made a backend project using node js express and mongodb
when i try to deploy it using render i followed the steps and i choosed the free plan when i clicked Create web ...
1
vote
0
answers
19
views
Consumer gives "This server does not host this topic-partition" error
Im using Kafka with Raft mode with 3 brokers and 3 controllers. While my fastapi services are working without any problem, my nodejs services are giving me headaches. At the start of the service, ...
-1
votes
0
answers
13
views
Sending emails using React Email in a nodejs express application
The React Email server requires that I have a folder in the root of the project called "emails" in which all the email templates will be created. The actual files of the app are all in /src/...
-1
votes
2
answers
26
views
How to disable "debugger;" statement in WebStorm or VS Code
Does anyone know how to disable "debugger;" statement in either VS Code or WebStorm?
I'm trying to debug an app, and it is dynamically generating anonymous functions containing "...
0
votes
0
answers
6
views
Why is my Ts.ED application not returning the correct response in production but works fine in development?
I'm using Ts.ED for building a backend REST API, and everything works fine in my development environment, but when I deploy to production, the server doesn't return the expected responses. I am ...
-1
votes
0
answers
13
views
How to Optimize RAG Workflow, Reduce OpenAI Token Usage, and Use Free Models Like Llama/Gemini Efficiently?
I'm a frontend developer with experience in LangChain, React, Node.js, Next.js, Supabase, and Puppeteer. Recently, I’ve been working on a Retrieval Augmented Generation (RAG) app that involves the ...
-9
votes
0
answers
36
views
A good title helps your question get the attention it deserves. What goes into a good title? [closed]
Explanation
The error "Failed to load resource: the server responded with a status of 404 ()" means that your browser was unable to find the requested resource on the server.
Here's a ...
0
votes
0
answers
21
views
Websocket vs SNS in EKS Containers
This is more of an architectural question so apologies if this is not a right fit.
Scenario:
The application is split in two separate containerized application in an on-prem data center, lets say UI ...
0
votes
0
answers
13
views
the good way to implement role and permission in express rest api using prisma
I need kind of expert opinion to implement Roles and Permission in Express js. I'm planning to develop Restful Api using Express js but didn't get sufficient information or uh the flow logic to ...
0
votes
0
answers
32
views
VSCode debugger for nodeJS stopped working recently
Debugger on VSCode for NodeJS stopped working today. It was working fine until late last week.
I couldn't directly upload the gif on StackOverflow (apparently the image is above the size limit) you ...
0
votes
0
answers
26
views
Nuxt App in Monorepo Fails to Compile and Shows a Vanilla Template When Outside Repository
I have a monorepo containing two Nuxt 4 apps and a NestJS application. The NestJS app works fine as expected without any issues.
However, when I try to run either of the two Nuxt applications, I ...
0
votes
0
answers
20
views
Problem building query sequelize-typescript
I am currently facing an issue when creating a query with sequelize-typescript. The problem arises when trying to fetch records from a many-to-many relationship. Here is the SQL query I am trying to ...
0
votes
0
answers
11
views
Installing module is not fixing Error: Cannot find module 'qs'
I have this error
, I ran npm install qs and it still didn't fix it. As well as deleted and reinstalled package.json dependencies. No luck with that either. The error started randomly when i ...
-3
votes
1
answer
42
views
How can I measure the response times of an http request in Node?
I am working on a solution that makes http requests to different web services, and I need to measure the response times (detailed), I am currently using the "node:https" module, but I would ...
1
vote
0
answers
20
views
redis connection Error: getaddrinfo ENOTFOUND redis on nodeJs server
I'm using nodeJs as a server and while trying to init redist connection i got this error:
Error: getaddrinfo ENOTFOUND redis 2024-11-17 13:32:35 at GetAddrInfoReqWrap.onlookup [as oncomplete] (...
0
votes
0
answers
27
views
Application load test with k6
I want to make load test on my node js application using k6. Used nest js framework.
Here is my script
import { sleep } from 'k6';
import http from 'k6/http';
export const options = {
vus: 3000,...
0
votes
1
answer
34
views
Create top-level domain cookie inside subdomain not working (Express behind IIS rewrite)
I want to set a top-level domain cookie (i.e. domain:".example.com") from sub.example.com.
I know I have to set the "domain" attribute like so:
const app = express();
app.get("...
1
vote
0
answers
14
views
Why multer.diskStorage() is not called?
Newcomer to nodejs.
I write the code below and use thunder client to test, finding an error: 500.
Image storage engine
const storage = multer.diskStorage({
destination: './upload/images',
filename:...
0
votes
0
answers
36
views
Insane amount of RAM usage with BullMQ + fetch
I have a small app that runs several requests(node-fetch) with in a queue with bullMQ.
And i have 3 worker threads (if i dont use this main event loop gets blocked and my whole app freezes.) (This is ...
2
votes
1
answer
30
views
How to POST formdata including a file field with http2 module in Node?
I create a FormData as follows (simplified):
import FormData from 'form-data';
const createForm = async () => {
const form = new FormData();
form.append('field1', 'stringValue1');
form....
1
vote
0
answers
12
views
Browser doesn't set cookies received from backend
I'm making a project which consist of:
frontend in React - hosted on netlify.app
backend in NodeJS ( ExpressJS + express-session ) - hosted on render.com
Client and Server and hosted on two ...
0
votes
0
answers
17
views
How to dynamically highlight cricket stadiums on a map and display nearby attractions using JavaScript? [closed]
I am building a web site that features the top cricket grounds in India along with nearby tourist attractions and hotels. I want to create an interactive map where:
Users can see the locations of the ...
0
votes
1
answer
23
views
How to Resolve Route Conflicts in Express.js with Similar Route Paths?
I'm building a URL shortener API using Express.js, and I'm encountering a route conflict issue. Here are the relevant parts of my setup:
router.get("/", getAllUrls);
router.get("/:id&...
1
vote
1
answer
21
views
puppeteer detach CDP sessions safely for page.close()
I have this code snipper I use with puppeteer to create CDP session.
let browser = await puppeteer.launch(options);
const page = await browser.newPage();
const session = await page.target()....
-4
votes
1
answer
52
views
Can't run a simple example with await [duplicate]
I tried to run the following code from the command prompt:
const read = require('read').read;
const password = await read({
prompt: "Password: ",
silent: true,
replace: "*" /...
-3
votes
0
answers
21
views
How to connect mysql to node-js [closed]
When I want to connect node-js to the mysql database, I enter the information correctly, but when I enter the port, user and name of the mysql database, mysql workbench closes and does not enter the ...
0
votes
1
answer
36
views
Timeout response when trying to use AWS S3 SDK with lambda (Node.js)
My Lambda runs fine with all services except S3. Any action I try to perform, the execution hangs and I get a timeout. For testing purposes, I'm using a default vpc configuration.
I have the S3 full ...
-2
votes
0
answers
29
views
Why is my website adding a span with id PING_IFRAME_FORM_DETECTION to the bottom of the page?
I have a React/Node website created using Vite. On pages that have a form, when any of the inputs are put into focus for the first time, the following element is added to the bottom of the page. I can'...
0
votes
2
answers
44
views
Angular16 Maximum call size exceeded
I am trying to build a project on angular16 but whenever I do so I get the following error:
./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: ...
1
vote
1
answer
20
views
Fastify Autoload with Typescript using Vitest
this is my scenario: I have a Fastify v5 server written in Typescript that I want to test using Vitest.
This is my npm script
vitest run --coverage --outputFile=results.xml
Following what suggested ...