Npm start failing

i know so many have issues with this step but i just dont understand what im doing wrong. i ran npm start and get this message

C:\Users\Amy\Downloads\mflix-js>npm start

> server@1.0.0 start C:\Users\Amy\Downloads\mflix-js
> nodemon -L ./index.js

[nodemon] 1.19.4
[nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./index.js
MongoParseError: URI malformed, cannot be parsed

  • at parseConnectionString (C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\core\uri_parser.js:560:21)*
  • at connect (C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\operations\connect.js:282:3)*
  • at C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\mongo_client.js:224:5*
  • at maybePromise (C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\utils.js:665:3)*
  • at MongoClient.connect (C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\mongo_client.js:220:10)*
  • at Function.connect (C:\Users\Amy\Downloads\mflix-js\node_modules\mongodb\lib\mongo_client.js:443:22)*
  • at Object. (C:\Users\Amy\Downloads\mflix-js\src/index.js:23:13)*
  • at Module._compile (internal/modules/cjs/loader.js:1063:30)*
  • at Module._compile (C:\Users\Amy\Downloads\mflix-js\node_modules\pirates\lib\index.js:99:24)*
  • at Module._extensions…js (internal/modules/cjs/loader.js:1092:10)*
    [nodemon] app crashed - waiting for file changes before starting…

it then stays like this for hours and never changes.

when i do npm install i get this:

C:\Users\Amy\Downloads\mflix-js>npm install
npm WARN eslint-config-react-app@2.1.0 requires a peer of babel-eslint@^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@2.1.0 requires a peer of eslint-plugin-jsx-a11y@^5.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN server@1.0.0 No repository field.

audited 1997 packages in 9.424s

54 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

C:\Users\Amy\Downloads\mflix-js>

but the app always crashes when i try to start it.

The problem is

You did not set your URI correctly in the configuration file.

oh thank you! how would i fix this? where is the configuration file?

Please read Chapter 0: Introduction and Setup - README: Setting Up mflix.

1 Like

I had the very same problem. I read the instructions wrong. I renamed the .env file incorrectly to dotenv_win.env and not just to filename .env. The program is looking for the file .env to work correctly.