Closed kutomer closed 3 years ago
We're seeing the same issue in the downstream project redoc, which generates OpenAPI/Swagger docs. Redoc is pulling in mobx-react 6.3.0 but also relies on an older version of mobx, so it is breaking as well.
Related issue: https://github.com/Redocly/redoc/issues/1398
One way to fix this could be to publish a new patch version 6.3.1, with a stricter dependency on mobx-react-lite
like
"dependencies": {
"mobx-react-lite": ">=2.2.0 <3.0.0"
},
Thanks!
Or use mobx-react 6.2.2
use "mobx-react": "6.2.2",
instead of "mobx-react": "^6.2.2"
Yes that should have been a caret range. Will publish a fix.
But please folks, commit your lock files, otherwise transitive dependencies can always break your stuff completely at random :)
published mobx-react@6.3.1 to fix this issue.
Working, thanks :)
Hello,
I'm using mobx v5 (5.15.7) and mobx-react v6 (6.3.0) and noticed that your last deployment (7.0.0) those unrelated versions stoped working, this is because "mobx-react 6 / 7 is a repackage of the smaller mobx-react-lite package..." and the package.json in 6.3.0 is defined as follows: "mobx-react-lite": ">=2.2.0" which now brings mobx-react-lite v3, and throws:
Error: mobx-react-lite@3 requires mobx at least version 6 to be available
.This bug unfortunately broke our production environment (deployed to QA env before the mobx-react version deployment so we couldn't catch that there)
How to reproduce? just install
mobx 5.15.7
&mobx-react 6.3.0
and see :)Edit:
For those of you suffering from the same issue, here is a temporary solution I found: inside package-lock.json, search for:
and replace with:
Will very much appreciate your help in this matter.
Tomer.