Unless you use the prepackaged version of bpmn-js the modeler needs to be bundled for the browser with Browserify or Webpack. This is because it relies on external resources (such as fs) via require and the browser is not able to resolve these dependencies.
The modeler example generates the browser bundle into the dist folder. You’d need to serve the dist folder with a web server to get it working.
I am stuck on this. May be this is related to how you deploy a Node.js application as a web Application. In my case I just put the entire “dist” folder , in the WEB-INF folder in tomcat.
Once the application is built are there any instructions for how to deploy it as a Web Application or integrate it with existing Web Application.
The modeler is a web based javascript component. You would need to integrate it into any website just like you’d integrate jQuery or the like. It does not provide any backend.
It already has a pretty well documented API. We are working on providing it to you as a user. Stay tuned on this.
The Bundled version seems to be a viewer, and reads a bpmn diagram
I also checked the ‘modeler’ sample project. It also contains javascript files which start with something like
require("fs")
When executed javascript is not able to find the requrie() function.
It does look like fs module is being used for reading the file.
Even the bundled version does not seem to be having any such module.
So the question is do we need fs , which is part of “node.js” for the modeler to work
And how can the require() function be resolved
Is there any ready to install bundle with all scripts available?
The modeler is also available as a bundled version and it should be possible for you to replace the viewer in the seed project with the modeler.
If you would like to try out the modeler example, follow the instructions in projects README.md and ensure you correctly bundle the app. fs is a module provided by NodeJS that is being removed during bundling. You do not need nor should provide a fs module in the browser.
Hi
I am integrating properties panel in bpmn modeler but I am facing issue of Uncaught ReferenceError: require is not defined, for this which js is required please give me solution of this error.
Please do not necrobump old threads. Instead, open a new linked topic with a clear description of your setup and the steps you undertook to hit this error.