@adamjnav
This is strange because I didn’t have problem using it like in detached expo app from sdk 18 to sdk 25.
private _loadAssetsasync = async () => {
try {
await Promise.all([
Asset.loadAsync(ICONS),
Font.loadAsync({
'NotoSans-Italic': require('@assets/fonts/NotoSans-Italic.ttf'),
'NotoSans-BoldItalic': require('@assets/fonts/NotoSans-BoldItalic.ttf'),
'NotoSans-Bold': require('@assets/fonts/NotoSansKR-Bold.ttf'),
'NotoSans-DemiLight': require('@assets/fonts/NotoSansKR-DemiLight.ttf'),
'NotoSans-Light': require('@assets/fonts/NotoSansKR-Light.ttf'),
'NotoSans-Medium': require('@assets/fonts/NotoSansKR-Medium.ttf'),
'NotoSans-Regular': require('@assets/fonts/NotoSansKR-Regular.ttf'),
'NotoSans-Thin': require('@assets/fonts/NotoSansKR-Thin.ttf'),
}),
]);
} catch (e) {
// In this case, you might want to report the error to your error
// reporting service, for example Sentry
console.warn(
'There was an error caching assets (see: App.js), perhaps due to a ' +
'network timeout, so we skipped caching. Reload the app to try again.',
);
console.log(e);
}
}
}
However, in sdk 26, it is throwing error
undefined is not an object (evaluating 'moduleIds.map')
- node_modules/expo/src/Asset.js:105:33 in loadAsync
* src/index.tsx:62:8 in _callee$
- node_modules/regenerator-runtime/runtime.js:62:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:296:30 in invoke
- node_modules/tslib/tslib.js:107:17 in <unknown>
- node_modules/promise/setimmediate/core.js:45:7 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:23 in doResolve
- node_modules/promise/setimmediate/core.js:66:12 in Promise
- node_modules/tslib/tslib.js:103:40 in __awaiter
* src/index.tsx:43:14 in _loadAssetsasync
* src/index.tsx:25:4 in componentDidMount
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:10102:12 in commitLifeCycles
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:11472:25 in commitAllLifeCycles
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:39:15 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:221:34 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:11585:32 in commitRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12795:46 in completeRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12745:23 in performWorkOnRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12660:26 in performWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12622:16 in performSyncWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12535:6 in requestWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12374:22 in scheduleWorkImpl
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13025:17 in scheduleRootUpdate
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13796:35 in render
- node_modules/react-native/Libraries/ReactNative/renderApplication.js:58:21 in renderApplication
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:196:26 in runApplication
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:353:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:118:26 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:316:6 in __guardSafe
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:117:17 in callFunctionReturnFlushedQueue
Having hard time with this issue, have no idea…
If I remove the above code, it stucks in building javascript 100% in loading screen…
I feel like I can’t upgrade expokit app anymore…
I am debugging my entire project now and found the issue.
import { Platform, StatusBar, StyleSheet, View } from ‘react-native’;
And I found out sometimes those 4 properties are undefined.
When I moved them below the mobx lib I am using, they were no more undefined…
I am digging if there is problem in mobx related to RN 0.54…
Still working…
Finally solved the issue on the javscript side
. I’ve been using observer in parent of Provider
component which is anti-pattern
in using mobx. Therefore, I changed to local state instead of using mobx-store in this component only. This fixed my issue. It was hard to figure out since my code was working fine in expo sdk 25 tough.
So! Now I am left with android upgrade
. I will come back if there is any problem.
Thank you for help!
Also, there was breaking changes in fetch api
because of RN 0.54 upgrade.
I had to fix this one too.
I am back to tell you that there was no issue in android side
. I just finished up the whole upgrade from exp init and detach from a new project. Then I moved all my files to here.
What I really want is not moving my files to new Expo project and linking libraries. I want to upgrade to new expo sdk from my project dir which is very difficult recently from expo sdk 24
. I think for ios, it would be working just fine from my project dir but I bet it won’t work in android side which I have to recreate new expo project.
I really need the upgrade guide for expo for existing project. I hope some readme is supported.
Thank you for reading.