mobxjs / mobx-react

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

warnings - export '_allowStateReadsStart' was not found in 'mobx #869

Closed evankazadaiev closed 4 years ago

evankazadaiev commented 4 years ago

Hello everybody! I'm using yarn and trying to update the mobx-react version to the 6.1.8 in order to use a hooks approach in my project. I've also updated mobx version to 4.15.4.

But yarn gives me these several warnings: image

mobxreact.esm.js imports these functions from mobx module: image

And I see them in mobx.d.ts in mobx module: image

I made sure that mobx 4.15.4 has _allowStateReadsStart low-level method, so now I'm confusing, what's wrong with it. I looked at other relevant issues in this repository and still have no idea what to do.

Any suggestions on how I can solve this problem? Thanks! Ivan

danielkcz commented 4 years ago

Are you able to reproduce that? Chances are you don't actually have mobx version you are saying you have. Might be some package manager mishap or something. Looking here I can clearly see _allowStateReadsEnd exported.

https://unpkg.com/browse/mobx@4.15.4/lib/mobx.js

evankazadaiev commented 4 years ago

@FredyC , I look through node_modules/mobx/mobx.js and I see this functionality is exported: image

This is my package.json file before the update and after, previously versions were mobx 4, mobx-react ^5.3.1: image

I don't even understand what's wrong.

danielkcz commented 4 years ago

Sorry, but without some reproduction, I cannot really help you. Obviously, it works for others.

mweststrate commented 4 years ago

Clear your node modules, run yarn why mobx if using yarn. Otherwise search your entire node modules tree, maybe some other package is bringing in a different version as transitive dependency.

On Sun, 31 May 2020, 15:11 Daniel K., notifications@github.com wrote:

Sorry, but without some reproduction, I cannot really help you. Obviously, it works for others.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react/issues/869#issuecomment-636476679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBDZATVX4LTY4IHXSF3RUJQPRANCNFSM4NO5ODZQ .

evankazadaiev commented 4 years ago

@FredyC @mweststrate , thank you guys. I ran yarn cache clean, reinstalled node_modules and ran dll build in the project. Seems my problem is fixed now.