I upgrade to latest Expo CLI 2.19.2 and tried upgrade my expo application using SDK 33.
When I called expo start, i have a message saying:
Opening DevTools in the browser... (press shift-d to disable) error: unknown option `--assetPlugins'
Metro Bundler process exited with code 1 Set EXPO_DEBUG=true in your env to view the stack trace.
I tried to set EXPO_DEBUG=true on Mac but doesn't show any debugging details when running expo start again.
I found it i should called export EXPO_DEBUG=true
Here is additional message:
error: unknown option `--assetPlugins'
Metro Bundler process exited with code 1 Error: Metro Bundler process exited with code 1 at ChildProcess. (/@expo/[email protected]/src/Project.js:1598:16) at Generator.next () at step (/Users/simonlam/.nvm/versions/node/v11.6.0/lib/node_modules/expo-cli/node_modules/@expo/xdl/build/Project.js:2347:191) at /Users/simonlam/.nvm/versions/node/v11.6.0/lib/node_modules/expo-cli/node_modules/@expo/xdl/build/Project.js:2347:437 at new Promise () at ChildProcess. (/Users/simonlam/.nvm/versions/node/v11.6.0/lib/node_modules/expo-cli/node_modules/@expo/xdl/build/Project.js:2347:99) at ChildProcess.packagerProcess.once (/@expo/[email protected]/src/Project.js:1595:5) at Object.onceWrapper (events.js:276:13) at ChildProcess.emit (events.js:188:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
Be sure to also upgrade "react-native" to version 33.
yarn add react-native@https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz
Also check "jest-expo" has been updated and you change the "sdkVersion" in app.json to match SDK 33.
The issue is about version mismatch in package.json
and app.json
in your expo project. You need to perform upgrades as given below,
Update your Expo SDK Version
Open the app.json
file from the project and change sdkVersion
to 33.0.0
Update your Dependancies
Open the package.json
file and update the following dependencies,
jest-expo
to ^33.0.0 in devDependencies
react-native
to ^0.59.10 in dependencies
expo
to ^33.0.0 in dependencies
react
to ^16.8.3 in dependencies
After making the changes, run npm install
and then start the project by clearing the older js build cache by running expo r -c
and you will be good to go. The Metro Bundler
will crash only if you have SDK version mismatch. For more information, you can read through Upgrading the Expo SDK Step by Step
I've had this a couple times and it always feels a little mysterious. From my experience it's either a package mismatch or you need to clear the expo cache.
Triple check you have the right versions in your package.json
. https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough/#sdk-33
Delete any expo related folders and start expo with a cleared cache
rm -rf node_modules/* && npm i && expo start -c
As mentioned above, this issue generally arises due to mismatch of package versions of sdk, expo, expo-cli so make sure all are compatible.
In my case the issue was the expo-cli version was old and sdk was latest (38 as available today) and the upgrade of expo-cli was failing.
The error looked like -
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (3.11.2). │
│ You are currently using expo-cli 3.11.0 │
│ Install expo-cli globally using the package manager of your choice; for example: `npm install -g expo-cli` to get the latest version │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
This is what I did to make it work -
which expo-cli
rm -rf <path>
npm install -g expo-cli # This ensures you have latest expo cli
Now to run
expo-cli start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With