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

117
Views
Have an issue in React Js after installed html-pdf. the command works find on cmd line in vs code but in app is not
  var fs = require('fs');
  var pdf = require('html-pdf');
  //var pdf = require('html-pdf');
  var html = fs.readFileSync(resp, 'utf8');
  var options = { format: 'Letter' };

  pdf.create(html, options).toFile('./businesscard.pdf', function (err, res) {
    if (err) return console.log(err);
    console.log(res); // { filename: '/app/businesscard.pdf' }
  });

this having below error: Failed to compile. ./src/app/components/sscclabel-container/screen2.js Module not found: Can't resolve 'html-pdf' in 'C:\REACT\MDCV3\src\app\components\sscclabel-container'

Terminate batch job (Y/N)? y Note below command works and odf file is generated. PS C:\REACT\MDCV3> html-pdf ./businesscard.html businesscard2.pdf PS C:\REACT\MDCV3>

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!