mobxjs / mobx-react

React bindings for MobX

Home Page:https://mobx.js.org/react-integration.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incosistencies in mobx-react dependency versions.

ssejjemba opened this issue · comments

We have a setup of a react app that has been building fine with the following combinations of mobx libraries.

"mobx": "5.15.4",
"mobx-react": "6.2.5",

Then we bumped the mobx-react version to 6.3.0 to have the new combination as

"mobx": "5.15.4",
"mobx-react": "6.3.0",

And this also built fine without errors for a while, until it started failing with the following error:

./node_modules/mobx-react-lite/es/utils/assertEnvironment.js
Attempted import error: 'makeObservable' is not exported from 'mobx'.

It is important to note that we are not using mobx-react-lite in our repository, regardless when we tried to switch back to the original combination it still failed with the same error. Also on the CI running the build again with the same exact inputs that worked a couple of weeks ago, nothing changed now also fails with exactly the same error as above. Changing the version to mobx-react: 6.3.1 solves the build and no more errors with this version. But doesn’t tell us exactly why the same code with the same inputs would pass at a certain point and then fail at another.

See mobxjs/mobx-react-lite#319. There is no point in reporting issues on old versions that as you indicate have been already fixed in newer versions.

But doesn’t tell us exactly why the same code with the same inputs would pass at a certain point and then fail at another.

Sounds like your package / yarn lock files are either different since them, or you are not using them and you should :). Installs are only deterministic if you use those, and actual installed versions of a package isn't determined by your package.json but by your lock files.