bpmn-io / bpmn-to-image

Convert BPMN 2.0 diagrams to PDF documents or PNG files.
62 stars 38 forks source link

Unable to run as a part of react.js code #29

Closed sochoterez closed 2 years ago

sochoterez commented 2 years ago

Hi, I try to embed bpmn-to-image package to react.js project. After installing package I get errors connected to polyfills for node.js and errors connected to fs and child_process package. Is there somebody who has the same problem. Is there a way how to solve it ?

Steps how to reproduce error

  1. Create react project named test by command : npx create-react-app test
  2. Install bpm-to-image by command: npm install bpmn-to-image
  3. Add button to react
  4. Add click handler on button with code from bpm-to-image readme
  5. Strat project by command: npm start

*Expected Behaviour***

Start app without errors

Enviroment

nikku commented 2 years ago

That is due to the fact that this utility is meant for commandline / NodeJS usage.

It is not meant as a browser utility.