mobxjs/mobx-state-tree

TypeError: 0, _mobx.defineProperty is not a function (it is undefined)

KhanhToan-HT opened this issue · 4 comments

I updated the mobx state tree. It gives an error. Do not know why?
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
WARN Possible Unhandled Promise Rejection (id: 0):
TypeError: 0, _mobx.defineProperty is not a function (it is undefined)
TypeError: 0, mobx.defineProperty is not a function (it is undefined)
at defineProperty (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:217307:70)
at addHiddenFinalProp (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:217314:19)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:215362:27)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:215015:23)
at apply (native)
at executeAction (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143417:22)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143405:27)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:214966:40)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:215838:46)
at get (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:214459:34)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:215722:65)
at apply (native)
at executeAction (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143417:22)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143405:27)
at call (native)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:215830:44)
at apply (native)
at executeAction (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143417:22)
at value (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:143405:27)
at ?anon_0
(http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:233058:54)
at next (native)
at asyncGeneratorStep (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:6081:26)
at _next (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:6100:29)
at tryCallOne (/root/react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/Release/1i515cg5/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)
at anonymous (/root/react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/Release/1i515cg5/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)
at apply (native)
at anonymous (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:39584:26)
at _callTimer (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:39463:17)
at _callReactNativeMicrotasksPass (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:39508:17)
at callReactNativeMicrotasks (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:39714:44)
at __callReactNativeMicrotasks (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:3639:46)
at anonymous (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:3413:45)
at __guard (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:3612:15)
at flushedQueue (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:3412:21)
at invokeCallbackAndReturnFlushedQueue (http://192.168.80.142:8081/node_modules/expo/AppEntry.bundle//&platform=android&dev=true&minify=false&app=vn.com.qlsdn&modulesOnly=false&runModule=true:3406:33)
PayloadTooLargeError: request entity too large
at readStream (C:\App\qlsdn-app\node_modules@expo\dev-server\node_modules\raw-body\index.js:163:17)
at getRawBody (C:\App\qlsdn-app\node_modules@expo\dev-server\node_modules\raw-body\index.js:116:12)
at read (C:\App\qlsdn-app\node_modules@expo\dev-server\node_modules\body-parser\lib\read.js:79:3)
at jsonParser (C:\App\qlsdn-app\node_modules@expo\dev-server\node_modules\body-parser\lib\types\json.js:138:5)
at call (C:\App\qlsdn-app\node_modules\connect\index.js:239:7)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:183:5)
at remoteDevtoolsCorsMiddleware (C:\App\qlsdn-app\node_modules@expo\dev-server\build\middleware\remoteDevtoolsCorsMiddleware.js:36:3)
at call (C:\App\qlsdn-app\node_modules\connect\index.js:239:7)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:183:5)
at serveStatic (C:\App\qlsdn-app\node_modules\serve-static\index.js:75:16)
at call (C:\App\qlsdn-app\node_modules\connect\index.js:239:7)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:183:5)
at call (C:\App\qlsdn-app\node_modules\connect\index.js:248:3)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:183:5)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:161:14)
at next (C:\App\qlsdn-app\node_modules\connect\index.js:161:14)

i am using this mobx for my expo project. And i use update "mobx-react-lite": "4.0.4" and "mobx-state-tree": "5.3.0". It gives an error. Do not know why?

If i use update "mobx-react-lite": "4.0.4" and "mobx-state-tree": "5.0.4". it no report error run app normal

Can you share more details??
@KhanhToan-HT

Hey @KhanhToan-HT - I labeled this as "needs reproduction/info". Can you please use a CodeSandbox to provide us with a reproduction of the issue? That would be very helpful.

I'm also curious to know what MobX version you're on. This error looks like it's coming from a missing function on mobx, and perhaps we included something in an MST version between 5.0.4 and 5.3.0 that actually raised the required mobx version to some new minor release.

i updated mobx 6.1.8 to 6.11.0. It doesn't give an error when running the application normally.
Thanks @coolsoftwaretyler