Reactjs – React (MERN) app works on localhost but shows blank page and "Uncaught TypeError" when deployed to Render and Netlify
I am working on a school project.
I am working on a school project.
I am building a website backend and frontend using MERN and I have finished the backend and it is now the frontend's turn to be developed. I am using Vite, TailwindCSS and PostCSS with of course React.js. So I have…
Cant connect to MongoDB database and store data in localhost:27017 using MongoClient. Cant display connection result in the console (both failure and success connections). var express = require('express'); var router = express.Router(); var mongoClient = require('mongodb').MongoClient /* GET home page.…
I am implementing the MERN stack for a project, and have this code running in an Express server import express from "express"; import { PORT, mongoDBURL } from "./config.js"; import mongoose from "mongoose"; import { Partner } from "./models/partnerModel.js"; import…
I'm developing a recipe sharing web app using MERN stack, and i was planning to use this kind of url for showing the recipes info ../recipe/:recipeName/:id I wanted to know if it is a bad practice to use Mongodb auto…
I want to retrieve data from mongoDB, a collection of products, But instead of an array or an object with data, I get an HTML template. What can this be related to? The database is connected, I checked. Screenshots below.…
I'm facing an issue with Google OAuth login in my React app. The authentication process works perfectly on localhost, but when deployed to a domain server (hosted on Vercel), the login is not successful. I have already verified the following:…
I have created my mongoDb database in mongoDb Atlas and was trying to connect to server(node.js). But I'm unable to connect to my database.ERR_SOCKET_CONNECTION_TIMEOUT error is showing in the server log. Plaese find the error log below. return new error_1.MongoNetworkError(err);…
I am getting this error will constructing a MERN page and couldn't get the get format. Here is the code: const express = require("express"); const app = express(); const mongoose = require("mongoose"); const UserModel = require("./models/Users"); const cors = require("cors");…
As a newcomer to web development, I've been delving into a project that involves implementing Server-Side Rendering (SSR) with React and integrating it with a Node.js backend server. I'm seeking a clear understanding of the following technical aspects: When a…