Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing in linux #59

Open
dragneelfps opened this issue Dec 7, 2018 · 5 comments
Open

Error while installing in linux #59

dragneelfps opened this issue Dec 7, 2018 · 5 comments
Assignees

Comments

@dragneelfps
Copy link

This is the log: https://pastebin.com/nUiJgegZ

@Schultzer
Copy link
Collaborator

Do you have OpenCV installed?

@dragneelfps
Copy link
Author

Yes

@Destreyf
Copy link

@dragneelfps I am also in the process of installing receipt-scanner and ran into a similar issue, turns out the git clone i did installed opencv 4, i manually downloaded 3.4.4 from github and extracted/installed that.

When running npm install git+https://[email protected]/danschultzer/receipt-scanner.git -g i still got an error, turns out that it wants to compile, and i was trying to use root, NPM blocked this directly, i haven't tried as a normal user as this is for a docker instance for testing (so i'm not too worried) but i added --unsafe-perm to the end of the npm install command and was able to get it to at least compile/install.

I haven't finished my tinkering on this, noce i do i'll follow up with more information.

@Destreyf
Copy link

@dragneelfps I installed on Debian 9, another issue i ran into is the default directory for opencv's libs is apparently /usr/local/lib/ and the process couldn't find them until i copied the libraries into /usr/lib I don't think this is the best practice, however i'm working through this as a proof of concept ATM.

After moving the libraries into the correct position, i ran into another issue, i'm wondering if Node 11 isn't supported by the progress bar library as it throws an error saying the following:

/usr/lib/node_modules/receipt-scanner/node_modules/progress/lib/node-progress.js:234
    this.stream.write('\n');
                ^

TypeError: this.stream.write is not a function
    at ProgressBar.terminate (/usr/lib/node_modules/receipt-scanner/node_modules/progress/lib/node-progress.js:234:17)
    ... (omitted for brevity)
    at updateProgressBar (/usr/lib/node_modules/receipt-scanner/cli.js:74:9)

At this point just to have this run as a working POC i edited /usr/lib/node_modules/receipt-scanner/cli.js and commented out the "updateProgressBar" function so that it wouldn't try to update it.

  function updateProgressBar () {
    /*bar.update(percentages.reduce(function (a, b) {
      return a + b
    }, 0) / files.length)*/
  }

However i believe this has created an issue where the function never finishes running so now i am going to troubleshoot this further, it seems that "progress" is being tracked even when the progress flag is not set.

@Schultzer Schultzer self-assigned this Dec 21, 2018
@Schultzer
Copy link
Collaborator

@Destreyf Thank you for your investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants