mobx-devtools
mobx-devtools copied to clipboard
Fix mobx-devtools-mst peer dependency for MobX
Is it possible to update peer dependency on mobx to include v6?
"mobx": "^6.3.5",
"mobx-devtools-mst": "^0.9.30",
npm ERR! Could not resolve dependency:
npm ERR! peer mobx@"^2.2.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" from [email protected]
npm ERR! node_modules/mobx-devtools-mst
npm ERR! mobx-devtools-mst@"^0.9.30" from the root project
Do you guys have a workaround for this?
Interestingly, when using yarn (v1) instead of npm, there's no such error, only a warning:
warning " > [email protected]" has incorrect peer dependency "mobx@^2.2.0 || ^3.0.0 || ^4.0.0 || ^5.0.0".
A workaround I found is to add an overrides config in the package.json when using a modern version of npm.
...
"overrides": {
"mobx": "$mobx"
},
...
You can read more about that setting here: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
With that being said, I have no idea if mobx-devtools-mst can handle the current versions of mobx or mobx-state-tree.