Skip to content

Webpack fails to resolve bpmn-moddle dependency in Rails 6 application with bpmn-js #3343

Open
@snawar92

Description

Description

When trying to use bpmn-js in a Rails 6 application with webpack, the compilation fails due to an unresolved dependency bpmn-moddle

Ruby version:3.0.0
Rails version:6.1.7
Webpacker version:5.4.4
Node version:18

Steps to Reproduce

  1. Create a new Rails application with webpack
  2. Install bpmn-js via npm/yarn
  3. Import BpmnJS in application.js
  4. Run webpack compilation

Expected Behavior

Webpack should successfully compile the application with all bpmn-js dependencies resolved.

Actual Behavior

Webpack fails to compile due to missing bpmn-moddle dependency, despite it being a sub-dependency of bpmn-js.

Error Message

ModuleNotFoundError: Module not found: Error: Can't resolve 'bpmn-moddle' in '[path]/node_modules/bpmn-js/lib'

Attempted Solutions

  • Verified that bpmn-moddle is present in node_modules
  • Confirmed the setup works in a standard Node.js application

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions