Embedding the modeler into my local application,after the bpmn-js installed,when i import Modeler from ‘bpmn-js/lib/Modeler’ ,it throw a error whitch in ./~email@example.com/lib/Modeler.js. Module build failed:Error:parse Error:Line 1 :Illegal import declaration.
But i see the source code of bpmn-js package ,the declaration about import is no problem.
Can you tell me how to solve this problem?
Thanks a lot !
This is an issue with your setup. Could you share it with us?
As mentioned on the project main page you need an ES module aware transpiler to consume the library.
I want to integrate bpmn-js into my project. Using the webpack to handle the js file in my project.but i try to use bpmn-js in my project ,it throw error.i don’t know how to resolve the error .
How can I solve the problem like me?
Share your project setup and there is a small chance we may be able to help you.
For what it’s worth,
bpmn-js can be consumed absolutely fine within a standard react application, bootstrapped via the
Generate project boilerplate via:
npx create-react-app my-app
npm install bpmn-js
import Modeler from 'bpmn-js/lib/Modeler';
Run the application via:
Those are all my setup,because we are in the company’s internal network development, so i can only take pictures to show you.
Please verify you’re using a compatible module bundler (cf. this issue).