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

694
Views
¿Por qué recibo "Error de tipo de rechazo de promesa no manejado: nulo no es una función" cuando uso Pdfmake con Angular 8?

Estoy usando PDFmake para generar archivos pdf en la aplicación Angular. Puedo generar todos los resultados requeridos usando la biblioteca pdfmake.

Pero obtengo 'Error de tipo de rechazo de promesa no manejado: nulo no es una función' este error en el registro de la consola como se muestra a continuación.

ingrese la descripción de la imagen aquí

 pdfmake.js:31998 Unhandled promise rejection TypeError: null is not a function at __webpack_modules__.9662.module.exports (pdfmake.js:29878:1) at new Promise (pdfmake.js:36500:1) at ZoneAwarePromise.then (zone.js:1034:1) at pdfmake.js:36565:1 at new Promise (pdfmake.js:36504:1) at ZoneAwarePromise.then (pdfmake.js:36564:1) at push../node_modules/@angular/platform-browser/fesm5/animations.js.AnimationRendererFactory._scheduleCountTask (animations.js:152:1) at animations.js:181:1 at push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391:1) at push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150:1) module.exports @ pdfmake.js:31998 dispatchEvent @ pdfmake.js:36416 (anonymous) @ pdfmake.js:36429 module.exports @ pdfmake.js:33533 (anonymous) @ pdfmake.js:36426 queue.<computed> @ pdfmake.js:34218 run @ pdfmake.js:34194 listener @ pdfmake.js:34205
 const documentDefinition = { content: [ { table: { widths: [100, '*', 200, '*'], body: [ ['width=100', 'star-sized', 'width=200', 'star-sized'], [ 'fixed-width cells have exactly the specified width', { text: 'nothing interesting here', italics: true, color: 'gray' }, { text: 'nothing interesting here', italics: true, color: 'gray' }, { text: 'nothing interesting here', italics: true, color: 'gray' }, ], ], }, }, ], pageSize: 'A4', pageOrientation: 'landscape', pageMargins: [20, 30, 20, 30], }; pdfMake.createPdf(documentDefinition).download(`myPDF.pdf`);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe proporcionar un fragmento de código de la línea que causa este error. Pero creo que no manejó el caso en el que el bloque de reject() de su promesa necesita proporcionar un bloque catch para manejar el rechazo de la promesa.

about 4 years ago · Juan Pablo Isaza 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!