mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 350 forks source link

Problem with version 6.3.0 and mobx v5 #898

Closed eloim-zubkov closed 3 years ago

eloim-zubkov commented 3 years ago

Actual outcome

WARNING in ./node_modules/mobx-react-lite/es/utils/assertEnvironment.js 6:5-19 "export 'makeObservable' was not found in 'mobx'

Versions

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

danielkcz commented 3 years ago

6.3.0 requires mobx v6. It's declared in peerDependencies.

@mweststrate Perhaps it might be worth releasing mobx-react@7 so people don't fall into this accidentally and then have to follow through a "painful" upgrade loop?

eloim-zubkov commented 3 years ago

6.3.0 requires mobx v5, not 6 https://github.com/mobxjs/mobx-react/blob/6.3.0/package.json#L45

danielkcz commented 3 years ago

Ok sorry, I looked to the master branch assuming it's the latest.

https://github.com/mobxjs/mobx-react/blob/9b5d61c10f0876b67ab39270b586a7b3f6ace6e4/package.json#L45

So it seems you have mobx-react-lite@3 installed for some reason? That's where the error is popping.

eloim-zubkov commented 3 years ago

yeap but mistake is over here https://github.com/mobxjs/mobx-react/blob/6.3.0/package.json#L93 it's automatically install mobx-react-lite v3

danielkcz commented 3 years ago

I see you are right, that was clearly an oversight. Should be something like >=2.2.0 <3.

I guess we will have to unpublish 6.3.0 and publish 7.0 instead just make it more clear.

mweststrate commented 3 years ago

Duplicate of #897, please upgrade to 6.3.1

danielkcz commented 3 years ago

Just wanted to say the same thing :) I've deprecated 6.3.0 with the message "Please use 6.3.1 instead of this version".

mweststrate commented 3 years ago

hmm the dist tag of latest is wrong though, let me see if that can be fixed

On Thu, Oct 1, 2020 at 9:24 AM Daniel K. notifications@github.com wrote:

I see you are right, that was clearly an oversight. Should be something like >=2.2.0 <3.

I guess we will have to unpublish 6.3.0 and publish 7.0 instead just make it more clear.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react/issues/898#issuecomment-701975677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBEC65U3NUT5O44SYWLSIQ4DVANCNFSM4SACS65A .

danielkcz commented 3 years ago

image

I see it fine

mweststrate commented 3 years ago

No, latest should be 7.0.0 which has already released. Should be fixed now but might take a bit to propagate

npm dist-tags add mobx-react@7.0.0 latest
+latest: mobx-react@7.0.0
mweststrate commented 3 years ago

@eloim-zubkov mobx-react@6.3.1, not mobx@6.3.1. Those version number are unrelated.