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

157
Views
obteniendo un error en mi código nhpdf.js que alguien me ayude

¿Cómo arreglar esto? Recibo un error como este Por cierto, estoy creando una API . Estoy alojado en Replit y obtengo un error. Estoy creando una API con este código, pero recibo un error como el siguiente y el código. arreglar este código?? Que alguien me ayude por favor :(

 const nhpdf = async (input) => { let count = 0 let ResultPdf = [] let doujin = await nhentai.getDoujin(input) let title = doujin.title.default let details = doujin.details let parodies = details.parodies.map(v => v.name) let characters = details.characters.map(v => v.name) let tags = details.tags.map(v => v.name) let artists = details.artists.map(v => v.name) let groups = details.groups.map(v => v.name) let categories = details.categories.map(v => v.name) let array_page = doujin.pages for (let i = 0; i < array_page.length; i++) { if (!fs.existsSync('./nhentai')) fs.mkdirSync('./nhentai') let image_name = './nhentai/' + title + i + '.jpg' await new Promise((resolve) => request(array_page[i]).pipe(fs.createWriteStream(image_name)).on('finish', resolve)) console.log(array_page[i]) ResultPdf.push(image_name) count++ } await new Promise((resolve) => topdf(ResultPdf, 'A4') .pipe(fs.createWriteStream('./nhentai/' + title + '.pdf')) .on('finish', resolve) ) for (let i = 0; i < array_page.length; i++) { fs.unlink('./nhentai/' + title + i + '.jpg') } let size = await fs.statSync(`./nhentai/${title}.pdf`).size if (size < 45000000) { console.log('Uploading...') .then(() => fs.unlinkSync(`./nhentai/${title}.pdf`)) } else { console.log('Uploading to anonfiles because file size to large') let options = { method: 'POST', url: 'https://api.anonfiles.com/upload', formData: { file: fs.createReadStream(`./nhentai/${title}.pdf`), }, } request(options, function(err, res, body) { if (err) return console.log(JSON.stringify(err)) fs.unlinkSync(`./nhentai/${title}.pdf`) let we = JSON.stringify(body).data.file.url.full ResultPdf.push({ title, details, parodies, characters, tags, artists, groups, categories, array_page, size, we }) return result = { title: title, url: we, details: details } }) } } module.exports = { nhpdf }

error en la consola

 (node:547) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON --> starting at object with constructor 'Socket' | property '_writableState' -> object with constructor 'WritableState' | property 'afterWriteTickInfo' -> object with constructor 'Object' --- property 'stream' closes the circle at JSON.stringify (<anonymous>)

:{ lo siento mal inglés

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!