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

140
Views
_path2.default.basename is not a function using convertapi in angular

I am trying to integrate the convertapi in my Angular 11 application using the following documentation

https://www.npmjs.com/package/convertapi

I need to convert the pdf's into images,

When I try to upload a file, I get

_path2.default.basename is not a function

Here is how I have implemented this in my component

Import

import ConvertAPI from 'convertapi';

Initiate

const convertapi = new ConvertAPI('my actual api-secret ');

And convert

convertapi.convert('jpg', { File: file }) //'file' is actual file object, also tried pdf url
      .then(function(result: any) {
      console.log(result)
})
.catch(function(e: any) {
      console.log(e.toString()); // this prints out the error message
});

Is there anything I am missing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This library is a non module, please refer to this question on how to use it with Angular: Angular 2+ Import a Non Module into TS

This is the documentation: https://github.com/ConvertAPI/convertapi-js

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!