Open AshwinDeTaeye opened 2 years ago
does it also happen if you use another engine instead of hermes?
When i set /android/build/build.gradle to:
project.ext.react = [ enableHermes: false, // clean and rebuild if changing ]
It stays the same. I also updated the hermes engine from 0.5.2 to 0.11.0 without effect.
If you edit this line from the package.json inside node_modules/mobx-keystone to this:
"react-native": "./src/index.ts",
does it work then?
With Hermes 'off' and "react-native": "./src/index.ts", it gives following error:
mobx-keystone@0.69.5 & 0.60.5 without Hermes
ERROR TypeError: (0, _mobxKeystone.prop_dateString) is not a function. (In '(0, _mobxKeystone.prop_dateString)()', '(0, _mobxKeystone.prop_dateString)' is undefined)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
For this, I should refactor quite a bit, I've done it before in other migrations. I'll do it in the next week and try again. However the two last errors seem similar to the ones before.
When I set Hermes back on I have the same error as initially mobx-keystone@0.69.5 & 0.60.5 with Hermes
ERROR TypeError: undefined is not a function, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication), js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication), js engine: hermes
mobx-keystone@0.50.0
error: Error: While trying to resolve module `mobx-keystone` from file `/home/u/git/CamePrinterLast/app/models/root-store.ts`, the package `/home/u/git/CamePrinterLast/node_modules/mobx-keystone/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved...
Logic, since the src doesn't exist in 0.50
Thanks for the support yet, your package has been very helpful since the start!
What if besides the other change you also set "sideEffects": true
in the package.json?
I just published v0.69.7 which has some changes that make it work for expo (the previous one was not), could you check if it works now?
It's the same with 0.69.7
ERROR TypeError: (0, _mobxKeystone.prop_dateString) is not a function. (In '(0, _mobxKeystone.prop_dateString)()', '(0, _mobxKeystone.prop_dateString)' is undefined)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
In node_modules/mox-keystone package.json:
When updating the mobx-keystone package in a react native app from v0.54.0 to v0.55.0 i have the following error:
I have previously migrated most of my other apps without issue ( node, electron ) It seems to only be with react native.
babel.config.js
package.json
Does anybody have similar experiences? All versions from 0.55.0 on have this issue.
Kr,