Closed5

Managed Work Flow から Bare Work Flowに移行したときのメモ

がーみがーみ

作成していたアプリをBareに変換する際にまず、開発中の環境がExpoのSDK39だったのでバージョンを最新のSDK42へアップデート

以下を実行

expo upgrade
Warning! Your git working tree is dirty.
It's recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.

✔ Would you like to proceed? … yes

✔ You are currently using SDK 39.0.0. Would you like to update to the latest version, 42.0.0? … yes

がーみがーみ

環境のupdate中にエラー

✖ Failed to install expo package with error: yarnpkg exited with non-zero code: 1
yarnpkg exited with non-zero code: 1

以下を見て対応
https://stackoverflow.com/questions/63829104/failed-to-install-expo-package-with-error-yarnpkg-exited-with-non-zero-code-1

package.jsonからこの行を削除
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz"

node_modulesを削除

以下を実行

expo upgrade
yarn install
がーみがーみ

expo startしてiOS Simulatorでビルドするとエラー

Failed building JavaScript bundle.
Unable to resolve module expo-device from /Users/.../node_modules/sentry-expo/build/integrations/managed.js: expo-device could not be found within the project.

参考資料
https://zenn.dev/terrierscript/scraps/32e7680131c559

以下を実行

expo install expo-application expo-constants expo-device expo-updates
がーみがーみ

SDK42にバージョンアップできたのでここでejectしてみる

expo eject
✔ Cleaned JavaScript dependencies.
✔ Installed JavaScript dependencies.
⠙ iOS config syncing
Using node to generate images. This is much slower than using native packages.
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.

⚠️  iOS config synced with warnings that should be fixed:
- splash: Unable to automatically configure splash screen. Please refer to the expo-splash-screen README for more information: https://github.com/expo/expo/tree/master/packages/expo-splash-screen
⚠️  Android config synced with warnings that should be fixed:
- splash: Unable to automatically configure splash screen. Please refer to the expo-splash-screen README for more information: https://github.com/expo/expo/tree/master/packages/expo-splash-screen

iosフォルダ
androidフォルダが生成されていることを確認

このスクラップは2021/07/13にクローズされました