Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
2.7 kB
5
Indexable
Never
PS D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech> npm start

> backend@1.0.0 start
> node index.js

Server is running on port 3000
MongoDB connection error: 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 (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:206:11)
    at NativeConnection.openUri (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\connection.js:759:34)
    at Mongoose.connect (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\mongoose.js:403:15)
    at Object.<anonymous> (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\index.js:12:10)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

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 (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:206:11)
    at NativeConnection.openUri (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\connection.js:759:34)
    at Mongoose.connect (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\node_modules\mongoose\lib\mongoose.js:403:15)     
    at Object.<anonymous> (D:\P PNP\KULIAH\Muhammad Fadhel\TA\absensi cybertech\new backend\cybertech\index.js:12:10)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0
Leave a Comment