Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
I tried to get data using filter in nodejs and firestore when show me this error "Cannot read properties of undefined (reading '_internalPath')"

I tried to get data using filter in nodejs and firestore when show me this error in postman

"Cannot read properties of undefined (reading '_internalPath')"

my code

const getAllWords = async (req, res, next) => {
     let categoryName = "fruits"
    
    try {
        const word = await firestore.collection('12words');
        const data = await word.where({categoryName}).get();
        const wordArray = []; 
        if(data.empty) {
            res.status(404).send('No words12  found');
        }else {
            data.forEach(doc => {
                const words = new Word12(
                    doc.id,
                    doc.data().name,
                    doc.data().categoryName,
                    
                );
                wordArray.push(words);
            });
            res.send(wordArray);
        }
    } catch (error) {
        res.status(400).send(error.message);
    }
}
almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The .where() takes 3 parameters (fieldPath, opStr, value) but you are passing only 1 object. Try refactoring the code as shown below:

// replace fieldName with the field name in document
const data = await word.where("fieldName", "==", categoryName).get();
almost 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!