I'm getting this TypeError while using Keyv and Keyv/mongo.
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
When trying to create a new instance of Keyv
, I pass in the connection string as instructed.
Given String Template From MongoDB Atlas
Keyv Documentation Example On Passing A Connection String
This is my code, I have inserted my password and database name into the given connection string as instructed.
const Keyv = require('keyv');
const keyv = new Keyv('mongodb+srv://Elitezen4531:***********@zen.hjg40.mongodb.net/Discord_Zen_Bot?retryWrites=true&w=majority');
keyv.on('error', err => console.error('Keyv connection error:', err));