i am trying to create .env in my backend db url and my auth client id in frontend have the same error apparently it is not defined at least the server throws this error:
MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string. did not connect
PS C:\Users\manue\Documents\Development\recall_socialmedia\server>
This is my .env
REACT_APP_MONGODB_CONNECTION_URL=mongodb+srv:**//My url**
REACT_APP_GOOGLE_CLIENTID=**My client ID**
this is my server index.js
import express from 'express';
import bodyParser from 'body-parser';
import mongoose from 'mongoose';
import cors from 'cors';
import postRoutes from './routes/posts.js';
import userRouter from "./routes/user.js";
const app = express();
app.use(express.json({ limit: '30mb', extended: true }))
app.use(express.urlencoded({ limit: '30mb', extended: true }))
app.use(cors());
app.use('/posts', postRoutes);
app.use("/user", userRouter);
const CONNECTION_URL = process.env.REACT_APP_MONGODB_CONNECTION_URL;
const PORT = process.env.PORT|| 5000;
mongoose.connect(CONNECTION_URL, { useNewUrlParser: true, useUnifiedTopology: true })
.then(() => app.listen(PORT, () => console.log(`Server Running on Port: http://localhost:${PORT}`)))
.catch((error) => console.log(`${error} did not connect`));
mongoose.set('useFindAndModify', false);
This is my auth.js GoogleLogin button where id need my cliend id
<GoogleLogin
clientId= {process.env.REACT_APP_GOOGLE_CLIENTID}
render={(renderProps) => (
<Button className={classes.googleButton} color="primary" fullWidth onClick={renderProps.onClick} disabled={renderProps.disabled} startIcon={<Icon />} variant="contained">
Google Sign In
</Button>
)}
onSu