GithubHelp home page GithubHelp logo

electron-penteract's People

Contributors

stoefln avatar

Watchers

 avatar  avatar

electron-penteract's Issues

Windows compile issue

When trying to install via npm i I am getting following error:

'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'pkg-config tesseract --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\steph\AppData\Roaming\nvm\v12.4.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\steph\\AppData\\Roaming\\nvm\\v12.4.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\steph\electron-penteract\node_modules\penteract
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0

Penteract can not be loaded in production

It seems that for some reason when packaging the app via npm run export-mac, the path to the penteract module get's hardcoded. As soon as I move the .app file to another computer and execute it, I get following error:

at Object.<anonymous> (penteract.node:1)
at Object../node_modules/penteract/build/Release/penteract.node (main-bundle.js:45)
at n (bootstrap:19)
at Module../node_modules/penteract/src/index.js (index.js:1)
at n (bootstrap:19)
at i.testPenteract (App.js:45)
at onClick (App.js:65)
at Object.i (react-dom.production.min.js:14)
at m (react-dom.production.min.js:14)
at react-dom.production.min.js:14

The path to the .node file should not be hardcoded. I guess this is related to the fix I proposed here (replacing require('penteract') with require('penteract.node')): #1

Penteract can not be loaded

See kaelzhang/penteract-ocr#11

When starting electron dev server via npm run start-dev you will get a stacktrace similar to this:

  Module not found: Error: Can't resolve '../build/Release/penteract' in '/Users/steph.../electron-penteract/node_modules/penteract/src'
  @ ./node_modules/penteract/src/index.js 1:0-49 25:4-12
  @ ./app/App.js
  @ ./app/main.js
  @ multi @babel/polyfill react-hot-loader/patch webpack-dev-server/client?http://localhost:3000 webpack/hot/only-dev-server ./app/main.js

I figured out that by changing the file electron-penteract/node_modules/penteract/src/index.js I can fix the error:

changing the line import bindings from '../build/Release/penteract' to import bindings from '../build/Release/penteract.node'

However: This seems to trigger another bug: #2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.