ahwgs / react-gantt

Gantt Component for React
https://ahwgs.github.io/react-gantt/#/en-US
MIT License
102 stars 32 forks source link

Multilple MobX instances – There are multiple, different versions of MobX active #32

Open kr4chinin opened 6 months ago

kr4chinin commented 6 months ago

I have a project where I am using this package, I also have mobx and mobx-react-lite packages in it:

"mobx": "^6.12.0",
"mobx-react-lite": "^4.0.5",

When I am trying to use RcGantt component I am getting this error in console:

rc-gantt.js?v=ce4c31c5:3737 Uncaught Error: [mobx] There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`
MobX error in console

I've tried overriding rc-gantt mobx version in my package.json file like a so:

"overrides": {
  "mobx": "^6.12.0",
  "mobx-react-lite": "^4.0.5"
}

... and I've also tried configuring my project's mobx with this line isolateGlobalState: true. Nothing seems to work. Error still occures.

Although it seems to be working just fine for now I was wondering whether you could update your package's mobx and mobx-react-lite version. Or, at least, put isolateGlobalState: true in mobx configuration (issue).

Best regards 👋🏼