I am trying to get back into the swing of full-stack and am using this guide: How To Use MERN Stack: A Complete Guide | MongoDB
as a refresher.
I am having an issue after going through this code back and forth a couple times. Super simple but annoyingly evasive for the search engines.
The loadEnvironment.mjs file has the following code:
js import dotenv from "dotenv"; dotenv.config();
VS Code kicks back the following:
./mern/server/loadEnvironment.mjs:1 js ^ ReferenceError: js is not defined
I am only copy pasting the code from the guide at this point because i’ve gone through the code and tried to figure it out myself.
commenting out or removing the ‘js’ line throws error:
MongoParseError('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"
But my ATLAS_URI does in fact start with the latter and is copied from the Atlas UI that provides it.
I cannot go further by myself right now and get too frustrated with all the information search engines kick back that i cannot get to the bottom of such a seemingly simple question.
Thank you to anyone that sees this and helps.