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

283
Views
Depuración: interno, implementación, error, Error: el método exportCsvFile no devolvió un valor, una promesa o arrojó un error

Recibí este error en el proyecto de mangosta de Hapijs. No sé dónde me estoy equivocando. ¿Alguien puede ayudar?

método exportCsvFile:

 exportCsvFile: async function (req, h) { // export csv file try { await Family.find({}).lean().exec((err, data) => { if (err) throw err; const csvFields = ['id','client_id','catalog_id','name','no_of_products','no_of_attributes','no_of_mandatory', 'image','fileLocation','status','created_by','updated_by']; console.log(csvFields); const json2csvParser = new Json2csvParser({ csvFields }); const csvData = json2csvParser.parse(data); fs.writeFile("family.csv", csvData, function(error) { if (error) throw error; console.log("Write to family.csv successfully!"); }); return h.response({ message: 'File downloaded Successfully' }).code(200); }); } catch (error) { console.error("Error in export csv file method"); return h.response({ error: responseMessages.internal_server_error }).code(500); } },
about 4 years ago · Juan Pablo Isaza
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!