🥶

Expo49 -> 50で起こったバグまとめ

2024/02/10に公開

アップグレードの工程

基本的にはベーコンさんの記事のMigrating from Expo Router v2 to v3セクションを進めます。

  1. yarn add expo@next
  2. npx expo install --fix
  3. pachage.jsonのresolutionの中身を削除
  4. pachage.jsonにあるexpo-router/babelを削除
  5. babel.config.jsにあるpresetsの中身を削除して、yarn add babel-preset-expo metro-react-native-babel-preset --dev
  6. app.jsonのpluginsの中に ["expo-router", { "root": "./app" }]を追加
  7. メトロキャッシュを削除して起動。npx expo start --clear

陥った問題一覧

Support for the experimental syntax 'jsx' isn't currently enabled

Expo SDK 50 and expo-router 3 upgrade: node_modules/expo-router/entry.js: .plugins[0][0] must be a string, object, function

Suddenly getting: Cannot find module 'babel-plugin-expo-build-properties'

Make sure that all the Babel plugins and presets you are using
are defined as dependencies or devDependencies in your package.json
file. It's possible that the missing plugin is loaded by a preset
you are using that forgot to add the plugin to its dependencies: you
can workaround this problem by explicitly adding the missing package
to your top-level package.json.

参考記事

https://blog.expo.dev/expo-router-v3-beta-is-now-available-eab52baf1e3e
https://zenn.dev/ryuu/articles/upgrade-exposdk-50

Discussion