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

315
Views
Javascript browserify bundle Error Cannot find module 'ocr-space-api-alt2'

i'm trying to bundle up my javascript object to run main.js on browser so i used browserify steps:-

1- npm install -g browserify

2- write javascript code and save it to main.js

var ocrSpaceApi = require('ocr-space-api-alt2')

const options =  { 
  apikey: '',
  filetype: 'png',
  verbose: true,
  url: `${__dirname}/Uff.png`
}

const getText = async () => {
  try {
    const result = await ocrSpaceApi(options)

    console.log({ result })
  } catch (error) {
    console.error(error)
  }
}

getText()

3- installing ocr-space-api-alt2

npm install ocr-space-api-alt2 also tried npm i ocr-space-api-alt2

at least bundle up using the command

browserify main.js -o bundle.js

but when i use the command to bundle the project i get this Error :-

Error: Can't walk dependency graph: Cannot find module 'ocr-space-api-alt2' from 'C:\xampp\htdocs\browser\main.js' required by C:\xampp\htdocs\browser\main.js

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!