324 questions from the last 30 days
3
votes
1
answer
2k
views
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
Gadget Controller Ts Code :
import { Request, Response, NextFunction } from 'express';
import { Status } from '@prisma/client'
import prisma from '../utils/prisma.client';
import { AppError } from '../...
0
votes
3
answers
471
views
`req.body` is not set when using Apollo Server with Express – Middleware issue?
I'm learning GraphQL and trying to set up Apollo Server with Express (v4), but I keep getting the following error when making a request to /graphql:
req.body is not set; this probably means you forgot ...
1
vote
1
answer
230
views
Next.js Lightning CSS Error: Cannot Find Module 'lightningcss.win32-x64-msvc.node'
I am working on a Next.js project with Tailwind CSS, and when I try to run my development server, I get the following error:
Error evaluating Node.js code
Error: Cannot find module '../lightningcss....
3
votes
2
answers
136
views
Taking full screenshot with NodeJS not working as expected
I have tried to take full screenshot of page which has lazy loading enabled. But the problem i am facing is, my script taking screenshot without waiting for lazy loading or animation to finish. This ...
3
votes
1
answer
132
views
JS Infinite loop with await creates memory leak [closed]
This piece of code creates a memory leak. I'm not sure why. This code is shortedned from a longer method that polls a redis list for messages (which returns either a message or null immidiately if ...
0
votes
1
answer
93
views
Proxy uri not found after creating new proxy in api-config?
I am trying to setup a proxy, following the documentation here: https://backstage.io/docs/plugins/proxying
Here is my app-config.yaml, I would like to create a proxy which points to another locally ...
1
vote
3
answers
133
views
Next.js 15 build fails on Vercel: "Please install @types/node" — even though project is not using TypeScript
As the title says, I'm trying to build a Next.js 15 project on Vercel, and this error is occurring: Error: Command "npm install && npx prisma generate && npm run build" ...
0
votes
3
answers
75
views
401 unauthorized response when calling a Cloud Function using google-auth-library
I'm calling a private http Cloud Function using the google-auth-library in Node.js. This works locally both when authenticated as myself and when impersonating the Cloud Run service account. However, ...
0
votes
1
answer
70
views
CORS problem while sending request to netlify dev server
I'm working on a chrome devtools panels extension. In it I have:
const toDbBtn = document.getElementById("toDbBtn");
toDbBtn.addEventListener("click", async () => {
const ...
0
votes
1
answer
90
views
PostgreSQL simple query slow on server
I use Prisma for two really simple queries in my Node backend
const excavationSiteCount: number = (await client.excavation_sites.count({where: {owner: user}}));
const artifactCount: number = (await ...
1
vote
1
answer
73
views
Node.JS: how do I set an environment variable in 1 file to be read all others?
I have a bunch of files that run various tests and return results to a log file.
I have helper functions that create and log file and add to it.
I want to dynamically name that log file, based off the ...
0
votes
1
answer
85
views
WhatsApp Cloud API Flow Integration – Not Receiving Full Flow Submission Data
I'm trying to integrate WhatsApp Cloud API Flows (without endpoint) into my Node.js backend. My goal is to send a Flow via a template button and receive the form submission response in my /webhook ...
1
vote
1
answer
85
views
node-pre-gyp ERR! install response status 404 Not Found (Google Cloud Platform Profiler)
i'm trying to install the GCP Profiler package from NPM into my Nodejs project. However i keep getting the same error when trying to do this; node-pre-gyp ERR! install response status 404 Not Found on ...
1
vote
1
answer
63
views
How do you uncache a module in Node.js when using createRequire?
Given an ESM Node.js v23.10.0 project (package.json contains "type":"module"), I want to require a file, then delete its cache, and require it again so that its source runs again.
...
0
votes
1
answer
76
views
TypeScript Fastify WebSocket server not responding to client messages
I'm building a WebSocket server using TypeScript, Node.js, and Fastify. When I connect to it with a client, I can establish a connection, but the server doesn't respond to any messages I send.
Setup
...
0
votes
1
answer
333
views
Why does Drizzle ORM with TypeScript not recognize my schema and show missing properties in VS Code?
I recently migrated my Drizzle ORM setup from JavaScript to TypeScript, and now I'm facing an issue where the database schema is not recognized correctly.
Problem:
When I try to query my database ...
-1
votes
1
answer
62
views
When should double validation be implemented with both the database and the backend? [closed]
I'm trying to figure out how to balance security, performance, and best practices in the validation process of the data of a REST API and its interaction with the database.
Say you have a book table ...
3
votes
1
answer
78
views
@inquirer/prompts is terminating program
I am using 2 prompts in my typescript back to back. One is input and the other is confirm prompts.
In the first prompt I loop over to get user input till the user presses the control+c. I have handled ...
1
vote
1
answer
54
views
Node.js can't connect to Postgres inside Docker-Compose
I want to run my Node.js, Postgres and Ngnix in the same docker container but I am reaching the below error
2025-04-02 20:07:11 Connection error Error: connect ECONNREFUSED 127.0.0.1:5432
2025-04-02 ...
0
votes
1
answer
66
views
Run HTML file from a folder / Develop code in Visual Studio without projects or solutions
I am trying to run an HTML file by opening a folder, in Visual Studio 2022, without any solution/project
Following below How to tutorial:
https://learn.microsoft.com/en-us/visualstudio/ide/develop-...
1
vote
1
answer
72
views
Matching key derivation with Scrypt in node.js and c#
I have a node.js application with database access. The connection string is fetched from a json file and the password part within the connection string contains salt, nonce and the cipher, which is ...
0
votes
2
answers
85
views
Firebase Cloud Functions gen2 upgrade increased server costs
A few weeks ago I was forced to upgrade my Cloud Functions to gen2 and my node.js from version 16 to 22. After I made this update my firebase costs ballooned overnight by 4x. I have had to shut down ...
1
vote
1
answer
69
views
Flutter socket_io_client not updating query token on reconnect – server keeps receiving old 'public' token
I'm building a mobile app in Flutter that connects to a Node.js WebSocket server using socket_io_client. The WebSocket is used for both:
public unauthenticated users (to receive global broadcasts)
...
1
vote
1
answer
59
views
Express Req.Query initialization remains empty
I have this alias middleware which supposed to manually initialized the queries.
exports.aliasTopTours = (req, res, next) => {
req.query.limit = '5';
req.query.sort = '-ratingsAverage,price';
...
-2
votes
1
answer
139
views
After angular upgrade, new npm not installing without force command
I have upgraded my old angular project from version 10 to 19 steps by steps (https://angular.dev/update-guide). Now after upgrade everything is working fine. The only issue I am facing is that to ...
0
votes
1
answer
53
views
Request body of multiple file uploads in multipart formdata with unique metadata
I'm working on a NestJS app and in it, one route has file uploading in it. I am uploading the file and its metadata using form-data. Right now, I am able to upload just one file at a time and the form-...
1
vote
1
answer
67
views
Node.js can’t find module on new machine (works on my old computer) npm install had no errors
npm install couchbase --save completes. I get the following error about the missing module when I run npm start. The file it complains about can be found in the d: location it complains about, but ...
0
votes
2
answers
98
views
Could not resolve vite@"^4.0.0 || ^5.0.0" from @vitejs/[email protected] - How can install Vite ^6.2.4 from the root project?
I need help with this error. I could not do npm install, this error keeps popping up.
PS C:\path\to\project> npm install
code ERESOLVE
ERESOLVE unable to resolve dependency tree
While resolving: ...
2
votes
1
answer
57
views
Cannot set headers after they are sent to the client in route middleware
Prehistory was this question.
I revised the validationMiddleware method like this:
export async function validationMiddleware<T extends object>(
dtoClass: new () => T,
validateTarget: ...
0
votes
2
answers
79
views
Support to node crypto module is required - gcloud sql connector
Any idea on what can cause the following issue? We're trying to migrate to the official Cloud SQL Node.js Connector but for some reason I'm getting the following issue when running a test connection ...
1
vote
0
answers
82
views
Angular dev server fails with ERR_STREAM_WRITE_AFTER_END
When I start angular server, it works okay and I'm able to browse angular application. Dev server proxies requests to underlying apps through proxy.conf.js. I cannot share proxy.conf.js, it basically ...
2
votes
1
answer
69
views
Twilio Content Builder API Error 21656: Invalid ContentVariables when values contain apostrophes
I'm encountering Twilio error 21656 ("The ContentVariables Parameter is invalid") after migrating to the Content Builder API for template messages. The error occurs specifically when one of ...
-1
votes
0
answers
92
views
Cannot POST error in production but works on localhost
I am encountering a Cannot POST error in my production environment, but the same API endpoint works fine in my local development environment. The issue seems to be specific to the production setup, ...
-3
votes
0
answers
64
views
Express route /api/test returns 404 Not Found even though it’s defined
I have a simple Express server listening on port 5002. In my server.js I’ve defined a test endpoint:
// server.js
import express from 'express';
import cors from 'cors';
const app = express();
app....
-3
votes
2
answers
66
views
Why am I not getting any response in the postman? [closed]
import {createServer} from 'http'
const PORT = process.env.PORT
const users = [
{id:1, name:"Jim"},
{id:2, name:"Dwight"},
{id:3, name:"Michael"}
]
const ...
0
votes
1
answer
74
views
How do associate created documents with a user using Passport JWT in a MERN app?
I'm building a MERN stack application where users can create travel logs. I'm using Passport JWT for authentication. When a user creates a travel log, I want it to be automatically associated with ...
-1
votes
0
answers
60
views
Concatenate many huge pdf files without loading all of them into memory on linux [closed]
I run my node app in docker on servers some of which only have about 2 Gig of free RAM. Sometimes I generate 100-200 pdf files, each of which is about 500 pages and 60 Mb of disk space. I need to ...
-4
votes
0
answers
65
views
Full Screen react exam taking app, Controlled full screen exit
1.Can't able to control full screen mode, if we press escape automatically coming out from the full screen mode.
2.If not possible how other exam taking apps are working, any other ways?
3.Non of the ...
0
votes
0
answers
55
views
websocket not running in prod but works locally
So there is a backend (in rust) endpoint which requires an api key for connection in header…
Since in browser you can’t past header for ws, we are trying to connect localhost ws (browser/client) ...
1
vote
1
answer
58
views
Can NestJS implement an endpoint with an $ (dollar sign) prefix?
Trying to implement an endpoint in NestJS 10 that conforms to https://www.hl7.org/fhir/R4/operationslist.html and provides an operation via a $ sort of pattern.
Tried using:
@Controller({
path: '$...
0
votes
0
answers
53
views
Firebase functions V2: ; SyntaxError: Cannot use import statement outside a module at wrapSafe
I am trying to send notification to device when I receive message in chat in my app. At the moment I just want to read snapshot contents, but when trying to deploy, I am hit with an error: Firebase ...
2
votes
1
answer
52
views
Mongodb & mongoose :: Cannot call create() with a session and multiple documents unless ordered: true is set
I’m using [email protected] with [email protected]. I’m trying to use the create() method in Mongoose along with a session for transaction support. However, when I try to insert multiple documents, I get ...
-2
votes
1
answer
42
views
Configuring nginx for React and Node [closed]
I am trying to configure nginx for my application setup. I have a React app, and it talks to a Node backend, running at localhost:3000.
In nginx.conf:
server {
listen 80;
server_name ...
0
votes
1
answer
44
views
Generating ICS: How to create a 2-day event with the same start time but different end times?
I'm trying to create a two-day event where both days start at the same time but end at different times. Here are the event details:
Day 1: (Saturday) February 22, 2025, from 2:30 PM to 6:30 PM
Day 2: (...
-4
votes
2
answers
73
views
How do I get my JavaScript cash machine simulator to work in my Node.js terminal? [closed]
I am currently making a JavaScript Node.js cash machine simulator using the 'readline-sync' library to handle terminal input/output. The application allows the user to check their balance, deposit or ...
-2
votes
0
answers
69
views
How to render <App/> on nodejs server side? [closed]
Given this server.ts code:
import 'ignore-styles';
import register from '@babel/register';
import express from "express";
import fs from "fs";
import path from "path";
...
0
votes
1
answer
133
views
NextJS application deployed through container on azure app service not working
We are trying to deploy a nextJS container that works fine locally with docker but having issues when deploying to azure web app for containers.
The default microsoft web page is showing on the app ...
-1
votes
0
answers
59
views
Why can't I run index.ts with ts-node? [closed]
I try to run index.ts using command npm execute src/index.ts but it returns error
The command I execute: npm exec ts-node src/index.ts
Error:
TypeError: Unknown file extension ".ts" for C:\...
0
votes
2
answers
61
views
Why uncaughtException handler not working globally?
I'm developing a Express + PostgreSQL app and I want to implement a global error handler system. Now I want to caught all uncaught exceptions from my entire project. Server is running with nodemon.
A ...
-1
votes
0
answers
54
views
Handling async errors on Node.js and express
I'm creating a Node.js app with Express and trying to implement an error handling routine. It works with test errors I throw from my controller, but when a real error occurs, my error handling ...