When starting node application after running npm start command , some error coming

when starting node application after running npm start command, below mentioned error coming:-

TypeError: Cannot read property ‘split’ of null
at parseSrvConnectionString (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb-core\lib\uri_parser.js:39:23)
at parseConnectionString (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb-core\lib\uri_parser.js:225:12)
at connect (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\operations\mongo_client_ops.js:180:3)
at connectOp (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\operations\mongo_client_ops.js:284:3)
at C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\utils.js:437:24
at new Promise ()
at executeOperation (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\utils.js:432:10)
at MongoClient.connect (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\mongo_client.js:168:10)
at Function.MongoClient.connect (C:\Users\OWNER\Desktop\mflix-js\node_modules\mongodb\lib\mongo_client.js:372:22)
at Object. (C:/Users/OWNER/Desktop/mflix-js/src/index.js:23:13)
[nodemon] app crashed - waiting for file changes before starting…

Kindly help me to solve this issue.

This link may help

Problem faced me while working with set-ups

Hi @akshay_81885,

Let me know if you are still facing this issue. If yes, make sure you do not surround connection uri with double quotes in .env file.


Hi Kanika,

Thanks for your help . I am able to solve the problem

Best Regards,

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…

1 Like