3,400 questions
Advice
1
vote
2
replies
76
views
Tauri or Electron js
I’m starting a new project to build an ERP POS application using the MERN stack. I’m confused about whether I should use Electron.js or Tauri to turn it into a desktop/web app. Which option is better ...
0
votes
0
answers
23
views
MERN Project Backend Not Loading Data on Vercel Deployment
I’m trying to deploy my full MERN project (frontend + backend) on Vercel. The frontend works fine, but the backend is not loading data. I keep getting this error in the console:
GET https://cutomer-...
0
votes
0
answers
39
views
How to avoid JWT Refresh Token Race Condition
In my MERN app, when an API call fails with a 401, I intercept it, call the /refresh endpoint to get a new access token, and retry the original request.
The problem: if multiple API calls fail at the ...
0
votes
0
answers
32
views
How to configure Nginx for a WordPress root domain while preserving dynamic MERN app routes?
I’d appreciate some advice from experienced DevOps or full-stack engineers.
We have a SaaS product built with the MERN stack, currently running on example.com.
Current setup:
Backend API → api.example....
-1
votes
0
answers
46
views
API Gateway Timeout Error in mern project
Currently I am building a restuarant project, mono-repo in microservice, only auth-service(I am learning micro services so i just moved auth module as a service)
the issue is, if i use api-gatewway ...
1
vote
0
answers
67
views
Not Able to update Single Type in Strapi
I have created a single type in my strapi named "LibraryConfig".
When I am trying to update the data in this single type using api, so the response is successfull but when I see the strapi ...
0
votes
0
answers
57
views
react-simple-code-editor scrollbar not working properly with custom CSS
I’m using react-simple-code-editor in my React app.
Deployed app: https://ai-code-reviwer-cbv1.onrender.com/
GitHub repo: https://github.com/santukumar01/real-time-tracker
The left editor box is not ...
0
votes
1
answer
55
views
Nextjs Authentication With Cookies
This is my folder structure in nextjs
my backend code login
export const loginUser = async (req, res) => {
const { email, password } = req.body;
console.log("Login attempt:", { email ...
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
1
answer
84
views
How can I save the search name and filters in react?
I have a site made using the MERN stack, and right now I am trying to save the search names and filters when the user clicks to return to the Families.jsx page.
GIF showing the problem.
Before, the ...
-1
votes
1
answer
64
views
token in cookie get lost after refreshing the page. MERN stack
i am using the mern stack to make chat app, everything works fine on the my local environment but when i deployed my site on render and vercel both, they have common problem -> after login token is ...
-1
votes
1
answer
57
views
set cookie header is available in network tab but cookie is not set
I had hosted the server on the localhost:3000 and frontend on the localhost:5173 when i send the request to the server i get the response in network tab.
using node.js in backend and react in frontend
...
0
votes
1
answer
51
views
Does copying fcmToken from one document to another document causes an error of SenderId Mismatch?
I have been working on an application whose frontend is in react-native (using expo) and backend is in express js. Now during the testing the frontend guy generates the FCM token and then send me to ...
0
votes
1
answer
121
views
My deployed MERN web app work fine on PC but not on mobile
My web app works fine on the PC but when I try to login on mobile I get error: unauthorized access, i.e, the cookies are not being set. I deployed my backend on render and frontend on vercel.
Here’s ...
0
votes
0
answers
18
views
req.query remains empty even after attempting to add a property in Express middleware [duplicate]
Body:
I'm working with Express.js, and I'm trying to add a status property to req.query in middleware, but it remains empty. Here’s my code:
Route:
router.get(
"/published",
faqController....
0
votes
0
answers
28
views
Numplates project in mern stack paypal integrations causing cors error
we are working on the a project creating in the mern stack , we have deployed the project on the iis server and it is working properly but when we add the files where the paypal is integrated (sandbox)...
0
votes
0
answers
37
views
Name label in yjs code-mirror editor taking full width
I am trying to implement the collaborative code-editor, using yjs and code mirror, here the problem i am facing is the name label of the editor it takes full width, this makes the text to shift to ...
0
votes
0
answers
39
views
cookie related issue in MERN stack web app deployed on Render
I am having an issue about cookies in my mern stack project I use passport local strategy for auth and express-session for session storage and database is deployed on mongodb atlas, actually ...
1
vote
3
answers
86
views
MERN Stack -TodoAPP - Nothing display when adding Route
I was learning and practising tutorial on mern stack, by watching a video on youtube but nothing is displayed since I have added the Routes. White page. Is there anyone who get an idea what is wrong.
...
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....
0
votes
0
answers
46
views
CORS Error with Ngrok and Express Server: "No 'Access-Control-Allow-Origin' header is present" and 401 Unauthorized
I'm developing a React application that uses Firebase Authentication for Google sign-in. After successful sign-in, I retrieve the Firebase ID token and send it to my Node.js/Express server for ...
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
2
answers
72
views
Redirect User to Booking Page After Login in React Router v6
Description:
I’m building a room booking system in React with React Router v6. When a user clicks on a booking link (/book/:roomId), if they are not authenticated, they should be redirected to the ...
0
votes
1
answer
62
views
Facing a race condition in ProtectedRoute over my React Chat (MERN) app
I am building a react chat app and for that I have created the backend and frontend in MERN stack.
Now there are routes which are protected and needs authentication and for that I have created a ...
0
votes
1
answer
58
views
mongodb push update based on ne and arrayfilters not working
I'm trying to create a patch API for a database of products in a MERN application that keeps track of expiry dates.
The idea is when a product's UPC is given, as well as the date in which it expires, ...
0
votes
2
answers
51
views
Issues setting up a new React project with create-react-app
When you try to run the command npx create-react-app and proceed to install the dependencies with npm it returns an error code
ERESOLVE Unable to resolve dependency tree as it generates the package....
0
votes
1
answer
64
views
Why my axios get method isn't updating my react useState?
so the code of my app.jsx is
import Navbar from "./components/Navbar";
import TodoList from "./components/TodoList";
import Authentication from "./components/Authentication&...
1
vote
3
answers
769
views
How to fix a Chakra import file not found error in Vite
I am following this tutorial - https://www.youtube.com/watch?v=O3BUHwfHf84 (MERN Stack Tutorial with Deployment - Beginners Course). @59.15 we are up to developing the front end using Chakra, Vite and ...
0
votes
0
answers
45
views
How to deploy a web application with multiple backends?
I coded up a basic website with MERN as my primary tech stack. But I had to use Python's backend framework Flask to use LangChain(There was some issue with Langchain and Js). I wish to deploy this ...
0
votes
1
answer
348
views
How to resolve MinIO connection issues when deploying on Render Cloud using Ngrok?
I'm working on the deployment of my backend app, which has been developed using Node/Express, MongoDB, and MinIO. During development, I used the MinIO connection locally without any issues. However, ...
0
votes
2
answers
296
views
Next.js – window is not defined error even when using useEffect and typeof window !== 'undefined' check
I am working on a Next.js project where I am encountering the error:
Error occurred prerendering page "/dashboard". Read more: https://nextjs.org/docs/messages/prerender-error ReferenceError:...
1
vote
1
answer
95
views
Cannot read properties of undefined (reading '_id') and Cast to ObjectId failed for value for express router
So I am having this two error in my terminal(postman):
This one for my authUser function in authController.js:
{
"message": "Cast to ObjectId failed for value \"{ email: '...
-1
votes
1
answer
140
views
no token found or no token provided
the problem i am facing is that everything works fine locally but when it comes to production it gives this error ...
...front end code
import React, { useState } from 'react';
import { motion } from '...
1
vote
2
answers
132
views
I am getting "No overload matches this call." error
I am creating a MERN Stack web project using typescript.
Below is authRoutes.ts
import { Router } from "express";
import { register, login } from "./../controllers/authController";
...
1
vote
1
answer
49
views
TypeScript Error While Using MERN Stack: Says TypeError: Invalid schema configuration: `false` is not a valid type at path `select`
I don't know what is wrong here.... im getting this error when i am trying to run my passport config for Google SignIn. This is my schema, i tried almost every solution and now, i am here.
interface ...
0
votes
0
answers
25
views
React WebSocket Chat: Messages Not Rendering in Other Tabs Until Rejoined
Body:
I’m building a real-time chat application using the MERN stack, where the frontend uses React, the backend uses Node.js with WebSocket, and MongoDB stores chat history.
Problem:
When I send a ...
0
votes
0
answers
25
views
Middleware cannot access cookies set on frontend domain
I am encountering a bug in my public deployment that does not occur in my local deployment. When users enter correct login info and press the button, a cookie is created to grant them access to the ...
-1
votes
1
answer
39
views
Does anyone know why express module type imports are not supported by graph ql upload?
i am using type module in package.json file so that is not working only
const {
GraphQLUpload,
graphqlUploadExpress,
} = require('graphql-upload');
commonjs only working in module imports not working ...
1
vote
1
answer
2k
views
I am getting an error just creating a fresh Next.js app, without adding ANY code
I am getting an error just creating a fresh Next.js app, without adding any code.
npx [email protected] --ts
Hi. Does not make sense that a fresh app without any code added is having an error.
...
1
vote
0
answers
79
views
USER ID NOT FOUND
I'm trying to work with product adding but there's a problem no matter how I set the withCredentials to true. Still the backend responds with an error 'User not found'. It's as if it can't detect the ...
0
votes
1
answer
40
views
Page refresh on token-authenticated route redirects to 404 page in React
I have a simple app where there is a login page and upon submitting the form, it makes a request to the backend which returns a token upon successful authentication, which then redirects to internal ...
0
votes
1
answer
256
views
how to fetch headers in middleware in Next js
In below NextJS code how can i access Authorization in middleware when client component call API every time api is call it show empty headers in middleware can some on explain it
Client Component:-
'...
0
votes
0
answers
33
views
Using different stripe accounts for different subscriptions
I am making a payment site where I need to recieve payments from customers using stripe.
Problems:
We are using two stripe accounts one for a base subscription and one is an addon subscription which ...
0
votes
0
answers
9
views
the images are not uploading it is showing as undefined {Error Handling and debugging Multer"}
here the all the enteries are made except the images its showing as undefinedI’m working on an Express.js-based product management system where users can upload product details along with up to four ...
2
votes
1
answer
33
views
Navbar not showing the changed value when a state changes
i am using same navbar in multiple components. But when the state changes my navbar showing the changed value in login component only , not in the other components.
Navbar Component
import React, { ...
1
vote
0
answers
24
views
Not able to store data in mongodb compass from docker container
I create d a simple todo list app using mern stack which take data from users and store in mongodb database it works fine on devlopment even with frontend and backend but when when i created a docker ...
-5
votes
1
answer
60
views
When i try to run dev server its is giving me this [duplicate]
X [ERROR] Expected identifier but found "import"
(define name):1:0:
1 │ import.meta.dirname
╵ ~~~~~~
X [ERROR] Expected identifier but found "import"
(define name):1:0:
1 │...
0
votes
1
answer
77
views
Vercel cookie is not getting deleted after log out
I have deployed my MERN app in Vercel. I am having an issue with logout. After I log out, if I do a refresh, I get logged in again. The cookie is not getting deleted, but it is getting deleted in the ...
0
votes
0
answers
34
views
Error (not allowed) when trying to hit the backend
Hi I uploaded my MERN (BTW I am using Mysql instead of mongo DB) app to the VPS everything was working fine in my local environment but when I deployed it on the VPS and try to communicate with the ...
0
votes
0
answers
38
views
Parsing large Excel file in MERN cause Heap out of stack error, should I convert it to Python?
I have a working MERN app that parses Excel file and insert it in the MongoDB. It uses Promises and bulk insert. However, it needs to read large files, when it read about less than 200,000 rows, it ...