(node:18000) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
MongooseError: The uri
parameter to openUri()
must be a string, got “undefined”. Make sure the first parameter to mongoose.connect()
or mongoose.createConnection()
is a string.
at NativeConnection.createClient (C:UsersADDownloadsreadBook-mainreadBook-mainBackendnode_modulesmongooselibdriversnode-mongodb-nativeconnection.js:206:11)
at NativeConnection.openUri (C:UsersADDownloadsreadBook-mainreadBook-mainBackendnode_modulesmongooselibconnection.js:755:34)
at Mongoose.connect (C:UsersADDownloadsreadBook-mainreadBook-mainBackendnode_modulesmongooselibindex.js:404:15)
at Module.connectDB [as default] (C:/Users/AD/Downloads/readBook-main/readBook-main/Backend/src/config/database.js:11:61)
at eval (C:/Users/AD/Downloads/readBook-main/readBook-main/Backend/src/app.js:33:30)
at async instantiateModule (file:///C:/Users/AD/Downloads/readBook-main/readBook-main/Backend/node_modules/vite/dist/node/chunks/dep-df561101.js:55974:9)
MongoDB connect error: The uri
parameter to openUri()
must be a string, got “undefined”. Make sure the first parameter to mongoose.connect()
or mongoose.createConnection()
is a string. ❌
i want to fix that error
B21DCCN327_ Nguyn Th Thu Hng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.