get userPackagerOpts.sourceExts is not iterable while runing the expo app

Viewed 801

I am getting the following error while runing the expo app.

   $ expo-cli start --tunnel
    [00:24:51] Starting project at C:\Users\DEMO\Desktop\worldsweets
    [00:24:51] Expo DevTools is running at http://localhost:19002
    [00:24:59] userPackagerOpts.sourceExts is not iterable
    [00:24:59] TypeError: userPackagerOpts.sourceExts is not iterable
        at startReactNativeServerAsync (C:\@expo\xdl@57.9.12\src\Project.ts:1788:80)
        at Object.startAsync (C:\@expo\xdl@57.9.12\src\Project.ts:2407:5)
        at action (C:\Users\DEMO\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:181:3)
        at C:\Users\DEMO\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:354:16
        at Command.<anonymous> (C:\Users\DEMO\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:80:7)
3 Answers

I believe this is an old bug that has been reintroduced in expo-cli v3.21.2 or v3.21.3. I am using expo-cli v3.21.3 and ran into this issue too.

This post on the expo forum suggested adding "sourceExts": ["js", "jsx", "svg", "svgx"] to your app.json under packagerOpts and worked to get my project running again.

app.json

    "packagerOpts": {
      "assetExts": ["ttf"],
      "sourceExts": ["js", "jsx", "svg", "svgx"]
    }

You just need to update your expo-cli Run this command

npm install -g expo-cli

Problem Solved

Related