Questions tagged [mern]

MERN stands for Mongo, Express, React and NodeJS.

Similar technology stack to , replacing with .

3381 questions
30
votes
3 answers

How to fix: "error fsevents@2.0.7: The platform "linux" is incompatible with this module."

I want to deploy my website to Heroku but I get the next error: error fsevents@2.0.7: The platform "linux" is incompatible with this module. error Found incompatible module. I've already tried upgrading yarn, node but it didn't help. I use macOS…
Ilya Solodeev
  • 367
  • 2
  • 4
  • 12
27
votes
1 answer

how to pass data from one page to another page in Next.js?

I am stuck with a problem with passing data from one page to another page in next.js as I am building a basic news application in which I am fetching get requests from news api and I got results of 10 articles and I mapped them correctly but I want…
Mohit Ashliya
  • 403
  • 1
  • 4
  • 7
21
votes
8 answers

MongoParseError: options poolsize, usenewurlparse are not supported

I get the error "MongoParseError: options poolsize, usenewurlparse are not supported" when I run "nodemon server". Here the code for setting up the mongodb connection: import app from "./server.js" import mongodb from "mongodb" import dotenv from…
Pink
  • 223
  • 1
  • 2
  • 5
16
votes
9 answers

TypeError: Cannot read property 'attach' of undefined makeStyles.js

When trying to access the Login component of my MERN app on the production version, I get a series of the following type errors shown in this image: My app (https://github.com/ahaq0/kumon_schedule) works perfectly fine locally and was working…
Indistinct
  • 161
  • 1
  • 4
15
votes
2 answers

Error: `useFindAndModify` is an invalid option

I am new to MERN stack and I am following MERN stack tutorial on YouTube. I got an error on Mongoose. Error: `useFindAndModify` is an invalid option I couldn't find any solution to that. import express from "express"; import bodyParser from…
Myrat
  • 347
  • 2
  • 4
  • 16
12
votes
2 answers

Cannot Populate path in Mongoose while trying to join two documents

MongooseError: Cannot populate path loaned_to because it is not in your schema. Set the strictPopulate option to false to override. I've tried to join two documents in mongodb using mongoose in nodejs, But unfortunately this error occurs. My…
Rishi
  • 125
  • 1
  • 1
  • 8
12
votes
6 answers

Property 'user' does not exist on type 'Request>'

Please help, I am getting this error src/app/middlewares/authentication.ts:16:17 - error TS2339: Property 'user' does not exist on type 'Request>'. 16 req.user = user; I have…
Piyush Garg
  • 133
  • 1
  • 2
  • 6
11
votes
3 answers

React App failed to compile after install

After running the install script, the server starts and serves a page displaying the same text after the 'Failed to compile line.' I'm running Windows 10 and auto update just updated my pc today, right before I did the create-react-express…
StephonA
  • 121
  • 1
  • 6
11
votes
4 answers

How to deploy MERN stack to a hosting service?

I am new to web development and I have a hosting service on which I want to deploy my reactjs/node project. To deploy it previously, I had been simply uploading the build folder created from running npm run build. I have since added a connection to…
Meghan King
  • 185
  • 2
  • 3
  • 7
10
votes
1 answer

What type of architecture/design pattern does MERN follow?

I am a part of a project that is using the MERN stack and need info on how to structure my system architecture diagram. I am unsure whether MERN is a MVC, layered, client-server, or other architecture pattern. I currently have a diagram on our…
Justin Smith
  • 173
  • 2
  • 9
9
votes
3 answers

net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200

Please help solve this problem. I am working with a MERN app. In the app, I upload images to the cloudnary using the API. Then I upload the image on the frontend using secure_url. It works on localhost but does not work on heroku i.e. the image is…
nOybek
  • 305
  • 1
  • 4
  • 7
8
votes
3 answers

Data is not sent using axios to backend in react and Unsupported protocol localhost: axoos is thrown

I am using express js as backend and also have added proxy of backend in the package.json of react js. Before it used to throw an error with fetch method and moved to the axios method to prevent that. The data is in json format and completely…
sumitkhatrii
  • 116
  • 2
  • 5
  • 20
8
votes
1 answer

Helmet causing MERN app hosted on heroku cause ERROR: Refused to execute inline script because it violates the following

I have hosted my MERN app on Heroku , but whenever I implement helmet in app.js file it's causing this issue. const path = require('path'); const express = require('express'); const morgan = require('morgan'); const cookieParser =…
GrimReaper07
  • 455
  • 5
  • 13
8
votes
1 answer

TypeError: braintree.connect is not a function

I've implemented a braintree using its documentation but, facing this error in the terminal. it's showing that braintree.connect is not a function, but in the documentation it has been provided hard coded. var gateway = braintree.connect({ …
Sumit
  • 676
  • 1
  • 6
  • 15
8
votes
5 answers

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. When I submit the form the browser just shows a CANNOT…
James Howell
  • 1,392
  • 5
  • 24
  • 42
1
2 3
99 100