95,366 questions
-2
votes
0
answers
24
views
How do i upload multiple images to cloudinary via streams?
I am building a travel-log app where authenticated users can pin places they visit and add records. I am planning to add images on record with cloudinary on server. this is the current way i am doing ...
-1
votes
0
answers
11
views
Problem with orm drizzle in webapp based in ExpressJS, React and Postgre SQL
I created a crud with based in ExpressJS and React. For the DB I use Postgre SQL.
In this project I use orm drizzle for defining the DB operations.
I want only change
The problem I think is with the ...
0
votes
0
answers
18
views
How does Express/Passport detect when a session is manually deleted from MongoDB without calling sessionStore.get()?
I'm using express-session with connect-mongo as the session store in my Node.js server. I’ve added console logs to the session store methods to trace calls to .get(), .set(), .touch(), and .destroy() ...
-1
votes
1
answer
33
views
Express V5: Is there any way to modify `req.query`?
Express v5 changed the behavior of req.query:
The req.query property is no longer a writable property and is instead a getter.
That being the case... In our ExpressV4 app, we use Joi in middleware ...
0
votes
1
answer
28
views
TypeError: Cannot read properties of undefined (reading 'id') when using createAdapter() from @socket.io/cluster-adapter
I'm trying to set up Socket.IO with cluster support using PM2, following this docs.
Here's my code:
import { createAdapter } from "@socket.io/redis-adapter";
import { createAdapter as ...
-1
votes
0
answers
18
views
How i can handle better auth onApiError?
enter image description here
I have configured better auth in backend:
import { AuthContext, betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma&...
0
votes
2
answers
29
views
React + Express: Navbar not updating after login/logout without refresh
I'm building a web app with React (frontend on Netlify) and Express.js (backend on Vercel).
Sessions are stored in PostgreSQL using express-session and connect-pg-simple.
I check authentication status ...
1
vote
0
answers
32
views
Different session data for router middleware
I am having trouble understanding how express.js works with routers in this instance. I am using express and passport.js to authenticate and store user data. What I am trying to do currently is have ...
-3
votes
0
answers
50
views
Cannot find module 'express' in server.js [closed]
I'm working on a Node.js project and express is not found when I use it in server.js.
This is what I see when I run pm2 logs. In pm2 the only active process is server.js
/home/ec2-user/.pm2/logs/...
0
votes
0
answers
39
views
How to fix Error with include Credentials in CORS
This is the error I am facing, only with add to cart and add fav API not with login or register, it was working fine until yesterday evening, I don't know what happened.
Access to XMLHttpRequest at
'...
-4
votes
1
answer
32
views
Why is my DELETE Blog API returning "Blog not found" when I try to delete a blog with a reference to a User? [closed]
I am working on a REST API where I am trying to delete a blog document from my MongoDB database. Everything works fine, and the blog is deleted when I don't have a reference to a User in the blog ...
-1
votes
1
answer
33
views
How to get requests to the correct port
I am using an express server running on port 3000 like this
https.createServer(options, app).listen(3000, '0.0.0.0', () => {
const timestamp = new Date().toISOString();
console.log(`${...
0
votes
0
answers
16
views
How to properly configure @adminjs/upload to store image files and hide the text input for the file path?
Product Model
import { DataTypes } from "sequelize";
import sequelize from "../util/database.js";
const Product = sequelize.define("product", {
id: {
type: ...
0
votes
0
answers
29
views
Using Express session ID as Client ID for an anonymised event count in Google Analytics
I am setting up Google Analytics for a web application. In addition to the standard client-side implementation, I want to track some events from the server, using the measurement protocol.
This should ...
0
votes
1
answer
46
views
On product edit page, to send the same images, need to click on the button and choose the same images again
On the product edit page, if you want to send the same images, you'll need to click the button and select "Same Images" again.
The images are uploaded to Cloudinary as URLs, and they don't ...
-3
votes
0
answers
47
views
Pins only appear when i refresh after i login . How do i fix this problem?
I am building a Travel-log app using Node.js/Express where users can add pins on map and log entry for each pin. Currently when i login, i also need to refresh for the pins to appear. Also when i log ...
1
vote
0
answers
31
views
how TypeScript types + Mongoose typings behave, and why certain return types “just work” while others don’t
I'm new to express and I'm using Mongoose with TypeScript and ran into a typing inconsistency that I can't wrap my head around.
I have a custom interface IVoyageLeg that extends Document, and I'm ...
0
votes
0
answers
17
views
Erro: nodeJS - Empty Callback=undefined or baseUrl=http://localhost:8080 - Onlyoffice document server with Vue.js 2 + TS
I am working with ONLYOFFICE Document Server running in a Docker container. My frontend and backend are running on my local machine. However, when trying to save a document via the ONLYOFFICE editor, ...
-1
votes
0
answers
18
views
Is there an router attribute which is the opposite of @Hidden?
Currently Im using @Hidden attribute on each controller function (which kind of blackList) and I want to use whiteList and to pick only the ones that need to be exposed in swagger and not the one that ...
-2
votes
0
answers
34
views
Keeping Modal open with AJAX background data refresh [closed]
I have a Node.js Express app using DataTables, and in those DataTables, I have child rows with bootstrap 5 modals. The modals open just fine; however, I am refreshing the data in the background every ...
-1
votes
0
answers
13
views
How to effectively format "System" prompts and rubric-style instructions in .jsonl files for fine-tuning?
I'm working on preparing a .jsonl file for fine-tuning a language model and had two questions:
Q2. What are some best practices for writing the "System" prompt in the dataset? Are there ...
0
votes
0
answers
39
views
Process is not defined using mariaDb with Vite
I am getting the following error trying to run a MariaDb file in a node enviornment.
Ive started the express api and when I try to run the application, I get this:
Uncaught ReferenceError ...
0
votes
2
answers
35
views
Express NodeJS code is not reading the asset directory
My directory is in form
-split
-splitSiteFiles (css/js/html assets)
servercode.js
I want the servercode.js to access the files in the splitSiteFiles folder but the solutions I have tried do ...
-4
votes
0
answers
42
views
ExpressJS API integration [closed]
I've been trying to build an API integrated section for my website since it needs a news section. I have a small amount currently built but am struggling with getting it to work. This is through using ...
-1
votes
0
answers
38
views
How to fix here "EPIPE" in Node js Socket.io
Receiving this error:
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket....
-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
38
views
Not able to run server [closed]
PS C:\Users\HP\Desktop\CODING\Gigx\Project_001\project1_Frontend> npm run start
[email protected] start
react-scripts start
(node:2456) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning:...
-2
votes
0
answers
40
views
How to join three collections with pagination and shared filters (under 2s response time)? [closed]
I'm working on a MongoDB query where I need to join data from three collections and apply filtering and pagination across all of them. Here's what I'm trying to achieve:
Join data from three ...
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 ...
-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....
0
votes
0
answers
42
views
Problem storing user in database using Clerk webhooks
I have installed ngrok, added my signing secret key to my .env file and deployed my app online.
I can view posts on my database with this domain
https://400a-78-135-249-138.ngrok-free.app/posts
But ...
1
vote
1
answer
38
views
TypeError: Cannot read properties of undefined (reading 'map') in Express controller when uploading images to Cloudinary
I'm building a Travel Log app using Node.js/Express, and I have a controller that handles creating a new travel log. Right now, I'm testing my API using Postman (no frontend yet).
Users can optionally ...
1
vote
0
answers
36
views
Express + Vite app works on Replit but local dev crashes with “Missing parameter name at 1: https://git.new/pathToRegexpError”
I have an Express + Vite project that runs fine in Replit’s environment, but when I clone it locally and run:
npm run dev
[email protected] dev
tsx server/index.ts
I immediately get:
TypeError: ...
0
votes
1
answer
28
views
React APP error with CORS and fetch from an Rest API
I am working on an assignment and have gotten this CORS issue when trying to post to the API. I have been trying to fix the cors error
server.js:
const corsOptions = {
origin: process.env....
-3
votes
0
answers
30
views
express js app.all() throwing error for no apparent reason [duplicate]
this is the code im trying to run
const express = require("express");
const app = express()
app.all('*', (req, res) => {
res.status(404).send('<h1>resource not found</h1>')
...
-1
votes
0
answers
11
views
Having access denied for getting the access token for serviceM8
I am trynna build a custom integration for my client in Australia, Integration scope is that it will pull leads from gohighlevel to create a job in ServiceM8 once accepted, then after the job is paid, ...
0
votes
1
answer
44
views
How to delete the user after logout in Sveltekit using runes?
I am trying to get auth working in my sveltekit 2.20.7 / svelte 5.27.0 application
I have an express backend that runs on port 8000 and uses express-session with connect-redis and passport to provide ...
-2
votes
0
answers
57
views
Express Server Closes Immediately After Starting — No Error, No Crash
I'm running into a weird issue while setting up an Express.js app. I'm using Node (with "type": "module") and the server logs Server is running on port 3000 correctly, but ...
0
votes
0
answers
29
views
express angular error while verifying the JWT
the problem is that i get the error that the token is undefined then magically appears and it only happens if the user refresh the page and i verified everything chatGPT told me
this is the function:
...
0
votes
1
answer
50
views
Express cannot get the value from textarea
I have the following form that allows user to edit their content. The form has two input tags and one textarea tag.
I was expecting Express would return the value from the input and textarea, but the ...
0
votes
1
answer
33
views
Render Deployment Failed
I deployed my app to render but got the error :
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express' imported ...
0
votes
0
answers
38
views
how to check if the document id isn't wrong in case of dynamically created models/collections?
I want to create a middleware function to check if the document_Id exists and it's not wrong using Model.exist({_id: id}) or such a query, so the API throws an error.
However, the problem is my models/...
0
votes
2
answers
95
views
Prisma Client Initialization Issue After Running npx prisma generate
I'm facing an issue with Prisma Client initialization after running npx prisma generate. Here's the error I'm encountering:
PS C:\Users\USER\DataAnalytics> node Scripts/loadData.js
[class ...
-1
votes
1
answer
105
views
How to solve path-to-regexp dependency issue in Express 5.1.0?
I created this simple file:
import express from "express";
import type { Request, Response } from "express";
const app = express();
const port = 3000;
app.get('/', (req:Request, ...
-3
votes
0
answers
36
views
How to automate the order according to the razorpay payment status
So I am making a webapp integrating the razorpay's payment gateway,
I am not able to identify why is the order being when I click these
This is Cancel Button on the Razorpay's popup
This is the button ...
-1
votes
1
answer
31
views
How can i get the large sized images/videos by my backend express Api?
How can I get the large sized images/videos by my backend express Api?
I got project which demands the user can upload many numbers of large images and videos and click save. and if the user refreshes ...
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';
...
-1
votes
0
answers
22
views
Argument of type 'Promise<void>' is not assignable to parameter of type 'ClerkWebhookEvent<any>'. ts(2345)
Clerk Webhook Controller
import { Request, Response } from "express";
import { verifyClerkWebhook } from "@/utils/handleClerkWebhook";
import { handleClerkWebhookEvent } from "...
-1
votes
0
answers
24
views
Node Express redirect from server back to client results in CORS
I have a client React app running on port 3000.
I have a node express app running on port 5000.
When hitting localhost:5000/logout I want to do a redirect using Express to okta's logout url. Any ...
0
votes
1
answer
34
views
CSRF token error when using multer with enctype="multipart/form-data" in Express.js
I am encountering a CSRF token error when submitting a form with file uploads using multer in an Express.js application. I am using enctype="multipart/form-data" to handle the file input, ...