MiniMap extension


#1

Hi,

I want to add the Minimap to my bpmn modeler.
I have followed all the steps described here
When I try running the modeler I currently get this error :
Uncaught Error: Cannot find module 'diagram-js-minimap’

It seems that the node_module for diagram-js-minimap is present in the project as you can see bellow

Does anyone why this is happening ?
Thank you,
Patrick


#2

Have you tried running the example?


#3

Yes, the example is running fine. But I want to import it in my “custom” modeler(which I enhanced with a few features).
That is what I was trying to achieve, but failed


#4

Can you show your code? For some reason the module cannot be resolved.


#5

So I have done the npm install --save diagram-js-minimap command
and after that have tried to import it in my index.js as shown bellow

Do I need to change my package.json file as well and define it there as a dependency?

Thanks


#6

Can you log minimapModule after requiring it and see if it’s undefined?


#7

Because of this error nothing gets console logged :frowning:

I am not too sure whats happening .


#8

There seems to be a problem with the dependency.

Maybe try rm -rf /node_modules/ and npm i again.


#9

That did not work either.

Does the fact that I am serving the application on a TomCat server have any play in all of this?