getomni-ai / zerox

PDF to Markdown with vision models
https://getomni.ai/ocr-demo
MIT License
6.74k stars 367 forks source link

ReferenceError while installing the zerox package using npm #27

Closed mitul-asodariya closed 2 months ago

mitul-asodariya commented 2 months ago

When i tried to install the package using npm install zerox, i got reference error. Below is the logs for reference

azureuser@pjsip:~/ZEROX$ sudo npm install zerox npm error code 1 npm error path /home/azureuser/ZEROX/node_modules/zerox npm error command failed npm error command sh -c node node-zerox/scripts/install-dependencies.js npm error /home/azureuser/ZEROX/node_modules/zerox/node-zerox/scripts/install-dependencies.js:80 npm error const command = sudoAvailable npm error ^ npm error npm error ReferenceError: sudoAvailable is not defined npm error at checkAndInstall (/home/azureuser/ZEROX/node_modules/zerox/node-zerox/scripts/install-dependencies.js:80:23) npm error npm error Node.js v22.8.0 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-09-10T08_48_53_985Z-debug-0.log

I am using a VM with OS as Linux (ubuntu 22.04)

tylermaran commented 2 months ago

Good find! Quick fix, the variable was not included in the same scope as the libreoffice postinstall script.

tylermaran commented 2 months ago

Merged and re-released on version 1.0.26. Please test it out and let me know if that works!

mitul-asodariya commented 2 months ago

Thanks for the fix! It is working