Incompatibility between minor version

We (as a team) are working on BabylonJS everyday and we recently encounter a number of issues due to babylonjs several versions.
To understand I will copy how our package.json was
@babylonjs/core”: “^4.1.0”,
@babylonjs/inspector”: “^4.1.0”,
@babylonjs/loaders”: “^4.1.0”,
@babylonjs/materials”: “^4.1.0”,
@babylonjs/serializers”: “4.1.0”,
"otherdependency which was using in its package.json “@babylonjs/core”: “4.2.0”
Problem appear because of our unfixed version because another dependency was using 4.2.0, so all version went to 4.2 but serializer was stuck on 4.1.
We experienced same issues with a weird bug on babylonjs inspector (clicking on left menu was making right menu bug).
In clear, we experienced that babylonjs module should all have same minor versions to fully works.

Clearly error is partially from our part but what I would love to have is to babylonjs respect Semver on es6 imports, minor should not break.
It would have save us a lot of times if BJS would have displayed a warning or an error in this case. I think it’s important to display a correct message as most developper were stuck trying to fix bug.

I hope it can contribute to make bjs better, thanks for the work done !

Yes, this is the case at the moment. All dependencies should have the same version, otherwise they won’t work.

There are historical reasons for that, and we do hope to fix that in the future. But for the time being you will need to keep the dependencies in sync.


Thanks for the answer. To help people that would like to work on this problem here is a small task list :
When minor is installed with a different version minor (for eg babylon-core 4.1 with babylon-serializer 4.2)

  • Should work
  • If it does not work it should display a human readable warning or error
1 Like