tkdgy_dl
(Tkdgy Dl)
#1
exports = function(arg){
var collection = context.services.get(“Cluster0”).db(“Database”).collection(“alldata”);
return collection.find({});
};
error:
TypeError: Cannot access member ‘db’ of undefined
I keep getting this error. How can I fix this?
1 Like
tkdgy_dl
(Tkdgy Dl)
#2
I’ve also tried “mongo-atlas” too.
Hi @tkdgy_dl ,
You should try mongodb-atlas
instead.
If that doesn’t work can you go into function UI and copy paste the URL in the browser here
Thanks
Pavel
1 Like
_BE_Austin
((Be) Austin)
#5
@tkdgy_dl
I find the answer your problem.
In Atlas UI > Triggers, you have to press “Link” button after choice your Link Data Source(s).
The reason for the error in TypeError is not connected “Link Data Source(s)”, so occur ‘db’ of undefined.