I am building a web application using the MERN stack (MongoDB, Express Server, ReactJS front end and NodeJS back end) and was wondering some good ways to store images from the back end.
In the past, I have used Firebase for authentication and…
This is the weirdest thing in my MERN app. When I do a PUT from Postman to my api it works and updates my api and mongoDB. On the front-end it doesn't update the api even though console logs are showing the correct values and the url is the same?…
Trying to install mongodb server on my mac using Brew but getting this error.
Updated my brew to latest version, still egtting this error.
Command i used:
brew install mongodb-community@6.0
I have a Navbar component in my React app which shows a Sidebar component when screen is small. I used Material UI for the Drawer for displaying the sidebar.
My issue is, on clicking the hamburger icon, drawer opens fine. But it doesn't close when…
I'm trying to hide a sidebar component from showing when a user visits the signup or login page. In react-router-dom version 5, we could use a div tag inside the Switch but it has been replaced with the Route element and it throws an error when a…
I know this is subjective and opinionated, but I just need something to start off from knowing what the best practices may be.
I've got a MERN application running on localhost with the React script currently running on port 3000 and an Express.js…
Hello I am learning MERN stack and I have problem with serving my react component this is server.js code
const path = require('path')
const fs = require('fs')
const express = require('express')
const app = express()
app.set('view engine',…
I am trying to implement pdf viewer using this react-pdf-viewer.
But, it keeps throwing this error:
/node_modules/pdfjs-dist/build/pdf.js: Unexpected character '#'
(1413:9)
1411 | 1412 | class PDFDocumentLoadingTask {
1413 | static #docId =…
I accidently run a command in my Mern project that ' npm un dev' instead of 'npm run dev' and it delete some packages and i don't know how to recover these packages.
I've a simple app built on redux-toolkit. I am dispatching createProduct actions which is working fine. I want to navigate to /products/ page form /products/new page after createProduct action. How can I use navigate (react-router-dom) to do this.
I…
I have a simple MERN APP, that works fine on localhost, but when I deploy it to Heroku I see a page with this error:
Application error An error occurred in the application and your page
could not be served. If you are the application owner, check…
I am creating an apllication using the technology stack MERN and Redux. I am wondering how to retrieve the last added record to the database using moongose. Assume it will be, for example, a list of orders assigned to a particular user.
I already…