Closed akd3vs closed 4 years ago
Hi, sorry for that we haven't tried compatibility with electron.
I'm looking at it.
However, before we done, there might be something you can do to walk around the bug. I haven't test because I need some time to read electron's doc.
If you want dbrjs work in Node.js side:
global.process.release.name
as any true
value, like "Tom" but not "".dist/dbr.mjs
.If you want dbrjs work in browser side.
navigator.vendor
, navigator.userAgent
and navigator.platform
before import dist/dbr.browser.js
.Things are not so easy. Still working on it.
@Keillion Yeah, I tried to define the things it says that were missing. We are trying to use it only as browser.
Thanks for the quick reply!
@akd3vs Try this: https://github.com/dynamsoft-rd-0/dbrjs-electron In main process, dbrjs works like in a node environment. In renderer process, dbrjs works like in a web environment.
@Keillion I think it worked, but now I'm getting this error:
Also, we are using Electron 7, if that helps.
Oh Wait the error is because how we are trying to retrieve the worker. I'll let you know when I've sorted that out.
Yeah, it is working now. When will this be in a release?
@akd3vs If everything goes well, we will release 7.3.0-v3 in about a week or two.
@akd3vs If everything goes well, we will release 7.3.0-v3 in about a week or two.
In the meantime, can we keep using your fork?
@akd3vs Yes, of course.
@akd3vs the issue is fixed. Please install the latest version 7.3.0-v4.
Hello, we are building a PoC for a client that has an application in Electron but we cannot import the module, I've tried different ways to import it but it's always the same error, could you help me?
The error is:
Uncaught TypeError: Cannot read property 'platform' of undefined
Image of the stacktrace:![image](https://user-images.githubusercontent.com/1646108/76576163-ee063180-6486-11ea-8d27-63d0067aad19.png)
Thanks in advance!