dynamsoft-dwt/web-twain-package

require is not defined

Closed this issue · 1 comments

I tried to use dwt package in my React application but in early steps it crashes my app with error: "unhandled rejection (referenceerror): require is not defined" while import the package via " import dynamsoft from 'dwt' "

Actually I searched for a solution but it seems a config problem with create-react-app or something like that.
I also saw the project sample of dynamsoft with react and it works on my machine but my existing project crashes at the module I import dwt in it.

@MuAladdinIbrahim We are importing the module like this import Dynamsoft from 'dwt';. It works fine in the react projects https://github.com/dynamsoft-dwt/dwt-react-simple and https://github.com/dynamsoft-dwt/dwt-react-advanced.

Please try debugging your projects or if you can provide a working sample that can reproduce the issue, we might be able to help