Closed LeonardoGentile closed 7 years ago
Same here.
Unpublished 3.1.1 for now, will investigate
Either upgrading mobx
to 3.1.2
or mobx-react
to 4.1.1
(or doing both :)), should fix this issue. If someone can confirm that would be great!
@mweststrate fix confirmed, upgraded both 😄
Root cause of the issue is that mobx-react
was accidentally using the default
export of mobx, although mobx doesn't have (isn't supposed to have) a default export. So it is actually unclear to me why it worked before. Somehow I guess either babel/webpack/typescript have slightly changed how they export the code and do no longer "fix" the usage of default imports?
Fix in mobx-react: https://github.com/mobxjs/mobx-react/commit/8573bf0d88430f4e766c6f838484ef4694736b76#diff-08f3e9ab539253c87ea111cc61c69e29L1
Workaround in mobx for un-upgraded mobx-react versions: https://github.com/mobxjs/mobx/commit/96c150d52d58b5353eb3748a7a7bb09faa95bac5
@mweststrate something has changed because I have had a couple issues with imports that used to work fine coming in as the module namespace object instead of the default import separately from issues with mobx.
@mweststrate I upgraded both and the error went away 👍
Is due to this fix that webstorm complains "Cannot Resolve Symbol" anytime I import anything from mobx?
I'm not sure this happened before
Hello, I have two exact projects, A and B, B is git-cloned from A. On B I made an
npm install
and the only observable (...sorry for the joke) difference between the two projects is that A uses mobx3.1.0
while B uses mobx3.1.1
. Both projects are usingmobx-react@4.1.0
.When I run my webpack dev server for B the server starts but I get quite some errors in the chrome console and the application won't start:
and
Where my NavAccount component is something like this:
Reverting to
mobx@3.1.0
fixes the problem