So, im trying to get the videoPaths of my database, and get that error, that's the code, and i get that on another post here in stackoverflow
export const getStaticProps = async () => {
let videos = [];
try {
const querySnapshot = await firebase
.firestore()
.collection('allVideos')
.get();
querySnapshot.forEach(function (doc) {
console.log(doc.data().title);
console.log(doc.data().pid);
videos.push({
pid: doc.data().pid,
title: doc.data().title,
});
});
} catch (error) {
console.log('Error getting documents: ', error);
}
return {
props: {
videos,
},
};
};