Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda