16,450 questions with no answers
1
vote
0
answers
30
views
Flutterwave Webhook Not Triggering in Production (Works on Development)
I am integrating Flutterwave payments in my project(Node.js/Express).
In development, deposits work correctly:
User pays;
Flutterwave triggers the webhook;
Payment gets verified and the user balance ...
0
votes
0
answers
87
views
Handlebars: Access has been denied to resolve the property while requesting to post method
Handlebars: Access has been denied to resolve the property "status"
because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this ...
1
vote
0
answers
29
views
Bun + Express on Vercel: How to Modularize Routes from Separate Files?
I'm deploying a Bun + Express application to Vercel. Locally, my Express app works perfectly with routes defined in separate files and imported into index.ts. However, on Vercel, the deployment ...
-3
votes
0
answers
72
views
Role and permission management for RBAC Express.js +TypeScript project
I need to implement role-based access control on the backend with postgresql, Prisma, and Express.js+TypeScript and the roles I have in mind so far are admin, manager, customer, delivery crew. I want ...
-1
votes
0
answers
57
views
Argument of type 'PoolConnection' is not assignable to parameter of type 'never'
I want to mock transaction as PoolConnection
jest.mock('../../src/config/db.js', () => ({
__esModule: true,
default: {
execute: jest.fn(),
query: jest.fn(),
...
2
votes
0
answers
86
views
Every day, the first and only the first backend call of my Node/Express app in production fails with ERR_CONNECTION_RESET or ERR_CONNECTION_REFUSED?
I have a basic MERN app in production with a login system that always runs into either an ERR_CONNECTION_RESET or an ERR_CONNECTION_REFUSED AxiosError when first attempting to login after what it ...
0
votes
0
answers
54
views
FIDO2 Fingerprint Verification Fails in Production (Works on Localhost) – Express.js + fido2-lib
Context
I’ve implemented FIDO2 verification for login and signup on my Express.js website. Everything works perfectly in localhost, but in production, the fingerprint verification of my security key ...
0
votes
0
answers
62
views
how to pass the uploaded assets URL directly to the front-end without using Presigned URL?
It's my first time using CDNs, and I went with Cloudflare R2 / S3 to upload and serve assets. I managed to upload an image to the path users/123456789/avatar-251011-103221008, this path is what I'm ...
1
vote
0
answers
63
views
How to properly transform backend error responses using response-transformer or custom policy in Express Gateway?
I'm working with Express Gateway to proxy requests to a backend service and want to transform error responses into a common format like this:
const errorResponse = {
timestamp: new Date()....
1
vote
0
answers
61
views
Express' res.clearCookie() does not clear the cookie?
I assign the cookie here:
const sessionEnd = new Date(Date.now() + ( 1000 * 60 * 60 * 24 ));
const cookieOptions = {path: "/", expires: sessionEnd, httpOnly: false};
async function ...
0
votes
0
answers
68
views
multer.memoryStorage() file undefined or Error: unexpected end of form
I'm trying to upload a file to the OpenAI API using Firebase Cloud Functions, Express and Multer. I have a React UI that I'm using to upload a file to my back end to then send to the OpenAI API, but I'...
2
votes
0
answers
68
views
Multer returns req.file undefined when uploading image with Hoppscotch in Express
I'm building a Node.js + Express backend where users can upload profile pictures using Multer. When I send a POST request from Hoppscotch to /update_profile_picture, I get this error:
Cannot read ...
0
votes
0
answers
52
views
Why is the return statement in my express.js route not stopping execution of the middleware that is placed after it?
The return statement in /routes/todos.js is not stopping the execution of my app. Instead, the the "Handle 404 Errors" app.use() function that is placed after app.use("/todos", ...
0
votes
0
answers
33
views
EJS error: include is not a function when using <%- include('partials/sidebar', { user: user, page: 'invoice' }) %>
I'm working on an Express + EJS project and getting this error when rendering my invoice.ejs view:
TypeError: C:\Users\naray\OneDrive\Desktop\Invoice-saas\invoice-generator\views\invoice.ejs:17
>&...
1
vote
0
answers
58
views
Augmentation merging
I'm running into a type augmentation conflict with Express when trying to enforce stricter types for req.user.
In one of my dependencies, Request is augmented like this:
declare module "express-...
0
votes
0
answers
58
views
MedusaJS cookies not set with SameSite=None for cross-subdomain admin panel (Nginx + VPS)
I'm self hosting a MedusaJS backend on a VPS, serving both a store (studyswags.pk) and an admin panel (admin.studyswags.pk) on separate subdomains.
I want authentication/session cookies to be ...
0
votes
0
answers
30
views
Adobe Express Script Not Selecting one Particular object in Function
I'm self-taught when it comes to the Adobe Scripts, so I don't know what's going on.
This is a shortened version of the function I'm working on; the full version will have different objects being ...
0
votes
0
answers
46
views
How to call Express variable after page load/an event and not before?
I recently started my first frontend project at my place of work. Basically, it's a map of our office with clickable and popup windows with info about user (who sits at this particular desk) from ...
0
votes
0
answers
42
views
Sequelize bulkCreate fails with duplicate entry error despite non-duplicate data and updated unique constraints
i am trying to migrate the dataset in mysql database being the role_id and module_id same mysql is refusing to store saying
sqlMessage: "Duplicate entry '3-1' for key 'role_module_bridge....
1
vote
0
answers
121
views
Why does my API call in Next.js return undefined even though the Express backend works fine?
I’m building a small full-stack project using Next.js (frontend) and Express.js (backend) with a MySQL database.
The Express backend has this route:
// server.js
import express from "express&...
0
votes
0
answers
47
views
Getting Undefined in body while hitting post request through postman
import { DBCon } from "./db/index.js";
import express from "express";
const app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
DBCon()
....
0
votes
0
answers
92
views
Express.js - GET for static files is failing for Mozilla
I am a newbie to express, trying to serve an html file through express static mechanism. The following code shows the html file correctly in Microsoft Edge on Windows 10 but with Mozilla I get the ...
0
votes
0
answers
54
views
How to avoid tsoa requiring a property that is internally set in subclass
I'm building a REST API using tsoa. I have a base class BaseProvenance and several subclasses like Entity, Agent, and Activity. Each subclass hard-codes a type property in its constructor that I ...
1
vote
0
answers
146
views
Better Auth cookies not saving in frontend after sign-in on Vercel deployment with Express/MongoDB
I'm building a full-stack application using Bun, Express, Node.js, MongoDB, and Better Auth for authentication. The app works perfectly on localhost, but after deploying to Vercel, cookies are not ...
1
vote
0
answers
50
views
Href in my html file returning "Cannot Get" (PM2)
I have this coding in my index.html:
<!-- Href Hyperlinks -->
<a href="index.html">Trade Bot</a>
<a href="raffles.html">Monthly Raffles</a>...
0
votes
0
answers
69
views
ValidationError: MyModelSchema validation failed: items.0: Cannot read properties of undefined (reading 'model')
I am working on migrating the project to a new version. Stack: express 5, mongoose 8, typescript 5.8, typegoose 12
I looked for more information and would now like to clarify the cause of the problem:...
2
votes
0
answers
54
views
How to test balance updation in ethers using infura provider in express backend
Below is my code snippet
import { ethers } from "ethers";
import EtherWallet from "../../models/user/etherWallet.model.js";
const provider = new ethers.JsonRpcProvider(process.env....
0
votes
0
answers
120
views
I can not get the Meta Account Information by using metaapi
I have already created MT4 Demo account in IC markets SC. Also I have connected the Demo Account by using metaapi.
This is my code:
async function Connection(accountId) {
console.log("🔹 Step 1:...
0
votes
0
answers
50
views
Express global error handler for streams/pipelines
We have a server running on express 5, and it has a global error handler middleware registered which successfully catches all errors thrown by our handlers, both async and otherwise, but it doesn't ...
1
vote
0
answers
1k
views
Could not find a declaration file for module 'jsonwebtoken'. -pathname- implicitly has an 'any' type
I was working on a backend project, using node.js and express.js.
I need to use the json web token, after installing it via npm i jsonwebtoken I get in my node_modules.
The problem is this when I ...
0
votes
0
answers
75
views
JSON object parsing got broken after upgrading NestJS from 10 to 11
I've got a NestJS application with simple POST endpoint:
@Post()
@HttpCode(HttpStatus.CREATED)
public async create(@Body() model: SerializedModel, @Req() req): Promise<SomeDto> {
const ...
0
votes
0
answers
80
views
Firebase Cloud Functions CORS Issue When Using Credentials
I'm encountering a CORS error when I set my frontend API calls to include credentials. Without credentials, the requests work fine. However, once I set credentials: 'include', I no longer receive any ...
0
votes
0
answers
80
views
Token is undefined when making a fetch request to login endpoint with React frontend and Express backend
I'm working on a web application using React for the frontend and Express for the backend. I'm trying to implement user authentication using JSON Web Tokens (JWT). However, I'm facing an issue where ...
0
votes
0
answers
58
views
Why don't they run at multiple thread?
Why they are running at the same pid, thread? When I make request with get / and / timer they should run at different thread:
const express=require("express");
const app=express();
const ...
0
votes
0
answers
79
views
Node.js Redis key expires much faster than EX value specified
I'm having a strange issue with key expiration in node-redis. I'm trying to cache a response from an external API (jsonplaceholder) in my Express application, but the key expires much faster than the ...
2
votes
0
answers
74
views
How to populate a 2D array with mongoose and nodejs
I am trying to populate an array that contains other arrays of objects.
I made this nested loops to create the path but it seems like it's not working the objects in 'sub' (the 2d >array) are still ...
0
votes
0
answers
38
views
Storing and fetching multiple images for a blog app made using MERN stack
I was making this application using MERN stack. But what I want to know is, how are multiple images persisted in my mongoDB atlas, and how do I fetch them sequentially. I came up with an idea to store ...
1
vote
0
answers
145
views
I can't login to agora service RTM even though i generate token in the backend
I can't login to agora service RTM even though i generate token in the backend and also i set up my appId and certificateId correctly
I get this error:
Ins#2 RTM:ERROR [UTC_Time: 01-06 01:12:48.603][...
0
votes
0
answers
80
views
Text Input Field Not Working In React/Electron/Express App
Basically code is for an electron app with a react frontend and an express server connected to a local postgresql db.
I have a page with a list of employees on one side and an add icon. If you click ...
1
vote
0
answers
2k
views
Puppeteer deploy error on Render: Error: Could not find Chrome
I have an application that after deployment stops working to generate a PDF from an API created, it presents this error in the console (Render) when I try to generate the PDF.
As this is a project ...
1
vote
0
answers
773
views
How to post file and data with AngularJS with MEAN stack
I went through hundreds of pages for several days without success and here is my problem.
I use the MEAN stack and at this point I have a simple form that works very well to save a "name" ...
0
votes
0
answers
69
views
if i wrote"npm run build" command in package.json, what should i write in build command in project setting of vercel's framework setting?
i am using express + typescript, and deploying with vercel.
"scripts": {
"start": "nodemon --exec npx tsx src/app.ts",
"build": "tsc && tsc-...
1
vote
0
answers
24
views
How to integrate Apitally middleware in LoopBack 4 so it applies to all API routes?
This setup only seems to work when I update or refresh my OpenAPI (Swagger) spec. When I call real API endpoints, apitallyRouter middleware doesn’t get triggered at all (no logs, no requests sent to ...
0
votes
0
answers
72
views
httpOnly cookies not working in production with Render + Vercel (also TS2688 build error)
I'm deploying a full-stack app: Express + TypeScript backend on Render, and Vite + React frontend on Vercel.
I've implemented authentication using JWT via httpOnly cookies instead of localStorage. ...
7
votes
0
answers
3k
views
NestJS: Pino Logger not working correctly with GraphQL requests
I am using NestJS v9 with the express adapter and the @nestjs/graphql library and am having issues extracting headers from the graphql request and appending them to the log messages using the pino ...
0
votes
0
answers
77
views
How to Add req.user with Prisma User Type in Express (TypeScript)?
I’m building an Express-based backend in TypeScript with Prisma ORM. I want to attach the authenticated user object to req.user, but TypeScript throws this error:
TS2339: Property 'user' does not ...
1
vote
0
answers
51
views
req.session returns without data, session cookie exists but data missing (Express + Render/Vercel)
I’m trying to deploy a MERN stack website that I’ve been working on locally. While everything works fine locally, after deploying to Render and Vercel, I can’t access session data through req.session. ...
0
votes
0
answers
38
views
Express.js server running passport-google-oauth20 logs in when accessed via browser, but not inside my webapp
this is my first react/js web app project and I'm completely stuck.
I have an express server using passport-google-auth20. From accessing the api routes via Chrome, I am able to authenticate and ...
0
votes
0
answers
107
views
How to use Replicate Trained Model after Training is finished?
I am developing an AI Headshot SaaS and I am having a bit of trouble getting the Replicate models to work correctly and it's kind of confusing me. Everything works up to Replicate Training Model but I ...
0
votes
0
answers
144
views
Node.js http-proxy-middleware: Proxy request hangs with 408 timeout, onProxyReq not triggered
I'm building an API Gateway using Node.js, Express, and http-proxy-middleware. All incoming requests are forwarded to different services based on dynamic routing logic.
I'm encountering a 408 Request ...