MERN Stack - Express and React on same port?

I'm working on a project with the MERN (MongoDB, Express, React, Node) stack and I'm having issues when posting data from a form within a React component to an API endpoint defined in Node.js....

Passport-Facebook works in localhost but not in Heroku (MERN Stack)

I'm making a simple app with Facebook login. It works perfectly fine in localhost. However, after deploying to Heroku, the Login button just refreshes the page and the browser stays on...

Connecting MongoDB to MERN app

I am in the process of trying to connect my MongoDB to my MERN web application and was wondering the best resource for information on this type of thing. Basically, I have a MERN web app, electron...

BrowserslistError: Unknown browser query `dead` in React/Express App

When I run 'npm start', the app starts just fine but 'npm run build' gives me the following message in the terminal: > [email protected] build /Users/*******/mern-workout/client >...

FormData doesn't work on upload files in React project with Redux and AXIOS when Its deployed

I have a full MERN stack project with Redux and AXIOS. I used FormData to upload the images to my node server which has the multer and it works perfectly fine on my localhost even tho console on...

Heroku Deployment Error: displaying backend, not frontend

I am trying to deploy my local MERN application to Heroku. Application works offline. After deployment, when click "Open app", all I see is the data from the backend. Not the front end. Deployment...

How to fix: "error [email protected]: The platform "linux" is incompatible with this module."

I want to deploy my website to Heroku but I get the next error: error [email protected]: The platform "linux" is incompatible with this module. error Found incompatible module. I've already tried...

How to fix 431 Request Header Fields Too Large in React-Redux app

I'm working through a MERN sign up/login auth tutorial on youtube that uses Redux. When attempting to POST a test user to the server in Postman, I receive the 431 header request is too large error...

Module not found: Can't resolve 'react-datepicker

I'm trying to use date picker in a MERN tutorial, but it fails to compile because it can't resolve 'react-datepicker'. I've rm -rf node_modules and datepicker to no avail. component.js import...

fetch(url) in redux.js using the wrong port

I have a MERN application that uses a combination of: Async/Await with Axios, and Redux to manage the data flow throughout my application. Redux is mainly used for login + authorization (along...

SSH "kex_exchange_identification: read: Connection reset by peer"

The setup: Raspberry 3B running Raspbian Stretch 9 on an external HDD and using ZRAM Raspi used as a webserver running LAMP and MERN stacks and accessed remotely via SSH with 1 IDE (Coda for Mac...

Network Error in react after deploy on heroku

I deployed my MERN project on heroku app but when I tried to submit my form it send me this error in console: Access to XMLHttpRequest at 'localhost:8000/api/products' from...

Can't Connect to MongoDB using Mongoose

I'm following this video tutorial on the MERN stack and I'm unable to connect to MongoDB for some very strange reason. This issue has been frustrating me quite a bit since I'm probably just...

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)

I understand there are many similar questions. However, I'm still new to MERN and I am looking for a simplified answer to this problem. I'm following a tutorial on the MERN stack, the application...

TypeError: http.ServerResponse is undefined

I've been building my React app (using create-react-app) and suddenly I have hit the following error: TypeError: http.ServerResponse is undefined I was in the process of adding a delete comment...

Multer Image Not loaded on Production Build React?

I am using MERN to create simple eCommerce I am facing error when i am in production mode. The file uploads on the specified folder but don't get load on front-end. Server.js import path from...

Trouble deploying a MERN app to Namecheap's cPanel for web hosting

I couldn't solve a certain Heroku issue (image storage/retrieval) so I'm trying my hand at Namecheap. I purchased a domain and web host server from Namecheap, so I can deploy my completed MERN...

Operation `posts.find()` buffering timed out after 10000ms

It works perfectly when I tried it locally. But Heroku gives this error after server deployment. Can anyone help? { "message": "Operation `posts.find()` buffering timed out after...

Webpack error "Module build failed: ERR_INVALID_ARG_TYPE"

I'm pretty new to react and am having some issues with web pack. All I'm trying to do is import a SVG file into my react project. I'm lost as to what is causing this as it doesn't give me much...

How to add new pages without rebuilding an app with +150k static pages?

I have a MERN app in which I have integrated NextJS. First time with NextJS so bear with me. I have initially used SSR everywhere (getServerSideProps). Key points: I have over 150,000 pages with...

How to solve this MERN stack filebase64 error?

import FileBase from 'react-file-base64'; I get an error after I hover the triple dot indicator in VS Code. My setup has already been successful (other input fields have successfully inserted on...

deploying mern app to heroku. error message: Not found

I have made a MERN app. Locally it works perfectly with no errors but, when I deploy it to Heroku it builds successfully but, it doesn't show my react app. I only get a error message which says...

Unable to redirect to Stripe hosted checkout page

I am trying to integrate Stripe Checkout in a MERN app. I have never done payment integration before. On the Shopping page, whenever, I click on the Checkout button, I should ideally be redirected...

UnhandledPromiseRejectionWarning: CastError: Cast to ObjectId failed for value "undefined" at path "_id" for model "User"

Whenever I login to my app this is what it says, and my user profile does not get my details. I rechecked everything but cant seem to find the problem. I am still learning MERN and I am stuck here...

'exec user process caused: exec format error' in AWS Fargate Service

I am totally new to AWS but I've been running my dockerized application locally for months now with no issues. Now that I am trying to deploy this app via AWS ECS/Fargate, my containers are...

Issue in deployment heroku - MongooseError: Operation `users.findOne()` buffering timed out after 10000ms

I have deployed my MERN chat application in heroku, it's working fine locally without any issues but having problem in connection to databse in heroku I have checked heroku log My Index.js...

Hosting a MERN application with Vercel in 2021 (without Next.js)

I've been using Vercel to host several React web applications and it's been great! Recently, I upgraded an existing project with a backend (Express.js and MongoDB Atlas) and I'd like to host it...

NodeJs/Express/MongoDb - ERR_HTTP_HEADERS_SENT

hope you spent really good holidays I'm following a tutorial online but i've an error that the teacher doesn't have in the video (i also copy his code but same error). I have this error only with...

Craco unable to build react app when Deployed in Heroku

Been at it for two days and stumped.. tried every solution I can find on stackoverflow. Trying to deploy my MERN stack app with tailwind on Heroku. It seems Craco/tailwind is giving me...

Error: option gssapiservicename is not supported

mongoose(6.0.12) throw error Error: option gssapiservicename is not supported. Here the code for setting up the mongodb connection : const connectDB = async () => { try { const conn = await...