94,957 questions
-1
votes
1
answer
80
views
Node / express / ejs / Uncaught SyntaxError: missing ] after element list
I'm running a express server and render a list.
This is the code of the route:
try {
let result = await servCollections.prepareDataForListCollections();
let colls = result.data;
let ...
1
vote
0
answers
13
views
Electron Error running server node js where packaging
i have a problem to connect with server when using electron builder so i guess the electron cant find the server file server.js
in the root there is client server folders and main.js package.json
main....
-1
votes
1
answer
75
views
Access to XMLHttpRequest from Origin Localhost Blocked by CORS Policy | ExpressJS
I have an expressjs app behind nginx server already importing and using cors module.
var express = require("express");
var cors = require("cors");
var app = express();
var ...
1
vote
0
answers
61
views
Argon2 always returns false
I create a user on the login page and hash this password with Argon2 but when I compare it, it does not match the password. The hashed password is shown in the database and I can also see the plain ...
0
votes
0
answers
40
views
Data Leakage issue when caching multiple sequelize instance
When I cache multiple Sequelize instances while sharing the same models (entities), the last cached instance in memory overrides the Sequelize instance of the models from the previous cache.
for ...
0
votes
0
answers
59
views
serving static files with a proxy server
I have an apache server that is reachable from outside my local network, named interfaceserver.com.
I also have an express server in my local network, named localserver.
In apache configuration of ...
0
votes
0
answers
30
views
Deleting Files from Autodesk Viewer
I want to be able to delete files from the Autodesk Viewer. When I delete them - I want them to disappear from my dropdown and not appear as "Model not translated".
I was using the code from ...
0
votes
1
answer
77
views
passport.serializeUser & passport.deserializeUser not working
I try to do a login via a LocalStrategy in Passport, but the serializeUser and deserializeUser functions don't seem to be called at all. The versions of the ‘Relevant’ packages are:
"express"...
0
votes
1
answer
50
views
Custom Express Middleware resulting in TypeError: app.use() requires a middleware function
const ErrorHandler = (err, req, res, next) => {
logging.error(err);
let message = 'An error occured, please try again.';
let statusCode = 500;
const response = {
success: ...
0
votes
2
answers
64
views
post route is not working in my express js project
Here is the code for the index.js of my expressjs project. I'm new to Node.js and trying to understand how to develop a web app using MERN Stack.
import express from "express";
import ...
0
votes
2
answers
64
views
NodeJS cookie settings (HTTPS, saveUninitialized) fail to apply
I set cookies in NodeJS with the following code:
const session = require('express-session');
const MongoDBStore = require('connect-mongodb-session')(session);
const max_session_ms = 365 * 24 * 60 * ...
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 ...
0
votes
0
answers
65
views
How can I set a CSRF cookie as a server cookie in NextJS to send it to ExpressJS backend?
About my architecture:
I have a backend with Express.js and a frontend with Next.js.
I have massive problems with my CSRF cookie. I create it in Express.js and send it to Next.js (Client). Here it is ...
1
vote
1
answer
52
views
Netlify app can't login to Express app only on mobile
I have a Vue 3 app hosted on Netlify, and the backend is hosted on Heroku. The login is a simple /login endpoint made with Express and Sequelize. It works well on desktop, but when I try to log in on ...
0
votes
0
answers
44
views
Unable to Set Cookies from Express.js to Next.js SSR Component (app router)
I have an Express.js backend running on http://localhost:8000 and a Next.js frontend (App Router) running on http://localhost:3000.
What Works:
• When making a request from a Next.js client ...
-2
votes
1
answer
70
views
Vite React Proxy Requests to Backend in Production
As I implement passport's Google OAuth2.0 strategy, I realized I need the callback to hit the server, then from there, I can redirect to a different page depending on if the user needs to finish ...
0
votes
1
answer
225
views
Issues converting existing express app to use serverless framework
I am currently working on an express app (API) which I now want to convert to use the serverless framework so I can deploy on AWS Lambda. I have done this before and did not have too many issues.
I ...
0
votes
1
answer
64
views
Unbounded breakpoint, some of your breakpoints could not be set using tsx and express
Having a really hard time setting up a breakpoint for debugger in VSCode to a very simple express project which uses tsx. I have 3 files inside my src directory
src/app.ts
import express, { ...
1
vote
3
answers
2k
views
Why are my global declarations in index.d.ts not being recognized in my TypeScript project?
I'm working with a TypeScript project where I have two files:
index.ts - This file contains the main application logic.
index.d.ts - This file is where I declare global types.
In my index.d.ts, I'm ...
1
vote
0
answers
274
views
PayPal API Error: "The requested action could not be performed, semantically incorrect, or failed business validation"
am integrating PayPal's REST API for processing payments in my React.js application, using the sandbox environment. While creating an order works fine, capturing the payment fails with the following ...
2
votes
1
answer
1k
views
Zod Schema Validation of FormData with multiple Files failing
I'm trying to use Zod to perform Schema Validation on a FormData Object which has multiple files (HTML file input element with multi-select) in an Express App. When the Schema is validated, it appears ...
0
votes
0
answers
154
views
How can I handle GraphQL error status codes and pass them from the backend to the frontend in an Express app?
I am building a full-stack application using React on the frontend and Express with GraphQL on the backend. I need to handle errors in my GraphQL mutation and pass the appropriate status codes (like ...
-1
votes
1
answer
68
views
Express js cors error for public folder access from other domain
Here is my code
const app = express();
const limiter = rateLimit({
windowMs: 1 * 60 * 1000, // 15 minutes
limit: 60, // Limit each IP to 100 requests per `window` (here, per 15 minutes).
});...
0
votes
0
answers
564
views
Meta WhatsApp Cloud API: "(#100) Invalid parameter" error while sending template message in Node.js
I'm trying to integrate the Meta WhatsApp Cloud API in my Node.js + Express project to send a registration confirmation message after a user signs up. However, I am encountering an error:
(#100) ...
0
votes
1
answer
49
views
Where do I find server response data in socket.io-client?
I am interested in creating (for testing purposes) a fake client that mimics a browser accessing a route in a Node.js HTTP server. In the minimal example below, I am able to point an actual browser to ...