DEV Community

Discussion on: Best NodeJs React Js Redux Project on Github

Collapse
 
fazzfeed profile image
FazzFeed.com • Edited

Hi Salah,
When I run this command line: npm start. It has an error like the attached image.

starter-crud-auth-api-express@1.0.0 start
node ./server.js

Assertion failed: You must provide either mongoUrl|clientPromise|client in options
E:\Study\NodeJS\starter-antd-admin-crud-auth-mern\backend\node_modules\connect-mongo\build\main\lib\MongoStore.js:119
throw new Error('Cannot init client. Please provide correct options');
^

Error: Cannot init client. Please provide correct options
at new MongoStore (E:\Study\NodeJS\starter-antd-admin-crud-auth-mern\backend\node_modules\connect-mongo\build\main\lib\MongoStore.js:119:19)
at Function.create (E:\Study\NodeJS\starter-antd-admin-crud-auth-mern\backend\node_modules\connect-mongo\build\main\lib\MongoStore.js:136:16)
at Object. (E:\Study\NodeJS\starter-antd-admin-crud-auth-mern\backend\app.js:35:23)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (E:\Study\NodeJS\starter-antd-admin-crud-auth-mern\backend\server.js:37:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint as runMain
at node:internal/main/run_main_module:17:47

Please help me to support.
Thank you.

Collapse
 
lalami profile image
Salah Eddine Lalami

1 ) just create MongoDB Atlas accout database url
2) change this file name .variables.env.tmp to .variables.env
3) open .variables.env and paste your MongoDB url here : DATABASE=your-mongodb-url