[nodemon] app crashed

I followed the directions in renaming the unix file to just .env and yet was still getting the [nodemon] app crashed error, so I read the other two topics about this and both are about simply renaming your .env file which I already did. However, when I found an old thread that said it had solved the problem and I read the so-called solution:
"found the Problem

delete the file name “dotenv_win”
delete those words and the file will only be “.env "
It doesn’t have any name it is just .env
Put Nothing before the .env just leave it blank”

I must have misunderstood because I deleted the file named “dotenv_win” and I think I was supposed to just change the file name. But now that entire file is gone so what do I do now? Can anyone tell me what that file contained so I can recreate it? I am a Mac user so I still have the unix version file. Really unsure why this is crashing. Here’s a screenshot of my terminal.

I decided to start over from the beginning and this time I created a folder called mflix-js and temporarily made it my download location so that all the hidden files and so on could land in the right place and I wouldn’t have to operate from inside of the downloads folder. Now I am wondering if all these error messages are cause for concern and may be leading up to the later problem of the [nodemon] app crashed issue. Here’s some screenshots for help in troubleshooting:

New installation

Download the m220/mflix-js.zip file.

Under the root folder.

run npm start (Missing by purpose the npm install step) - throw error:

Next, run npm install

image

Throw this error (Same as yours):

Always look at the error message (They tell you to run npm update).

Browserslist: caniuse-lite is outdated. Please run next command `npm update`

Run:

npm update

Fix this issue. Now the app crashes because of the missing .env file.

Rename .env file

image

Then edit the file:

# Ticket: Connection
# Rename this file to .env after filling in your MFLIX_DB_URI and your SECRET_KEY
# Do not surround the URI with quotes
SECRET_KEY=super_secret_key_you_should_change
MFLIX_DB_URI=mongodb+srv://m220student:m220password@<your-atlas-cluster-address>
MFLIX_NS=sample_mflix
PORT=5000

MFLIX_DB_URI

Under: https://www.mongodb.com/cloud/atlas

image

save

Run npm start done :slight_smile:

image

1 Like