Expo Detach Error - Object.entries is not a function

#1

11:15:42 [exp] Object.entries is not a function
11:15:42 [exp] TypeError: Object.entries is not a function
    at Object.<anonymous> (/xdl/src/detach/IosLocalization.js:13:48)
    at next (native)
    at step (/Users/user/.nvm/versions/node/v6.10.1/lib/node_modules/exp/node_modules/xdl/build/detach/IosLocalization.js:55:191)
    at /Users/user/.nvm/versions/node/v6.10.1/lib/node_modules/exp/node_modules/xdl/build/detach/IosLocalization.js:55:361
    at process._tickCallback (internal/process/next_tick.js:109:7)
"expo": "26.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz",
node -v
v6.10.1
0 Likes

#2

Hey @appjitsu, what version of exp are you using?

0 Likes

#3

exp --version
51.4.0

0 Likes

#4

@jimmylee I figured out what it was. I started a new expo project and compared my app.json and the following was missing from the new project, so I removed and retried the detach and it worked.

"packagerOpts": {
      "assetExts": [
        "ttf",
        "mp4",
        "png"
      ]
    },

I guess the above was incompatible with expo v26. Worked fine with v25.

1 Like

#5

Great! Yeah we should do a better job of messaging this, I’m sorry you had to stumble upon this without our help :frowning:

Do you have any recommendations for how we could avoid this in the future?

0 Likes

#6

Np. I don’t remember this being in the release notes. Maybe it was…

0 Likes

#7

Running into same error here.

exp --version
53.0.0

sdk 25.0.0

app.json does not contain packagerOpts section

0 Likes

#8

@jimmylee I am getting this error again. This time like @emadsenoma said above there is no packagerOpts in the app.json file. I am using the latest exp.

...
Your iOS ExpoKit project will not contain an .entitlements file by default. If you need specific Apple entitlements, enable them manually via Xcode or the Apple Developer website.
We noticed the following keys in your project which may require entitlements:
  ios.associatedDomains
Configuring iOS Launch Screen...
13:13:43 [exp] Object.entries is not a function
13:13:43 [exp] TypeError: Object.entries is not a function
    at Object.<anonymous> (/xdl@49.1.0/src/detach/IosLocalization.js:13:48)
    at next (native)
    at step (/Users/jason/.nvm/versions/node/v6.10.1/lib/node_modules/exp/node_modules/xdl/build/detach/IosLocalization.js:55:191)
    at /Users/jason/.nvm/versions/node/v6.10.1/lib/node_modules/exp/node_modules/xdl/build/detach/IosLocalization.js:55:361
    at process._tickCallback (internal/process/next_tick.js:109:7)
{
  "expo": {
    "name": "MyApp",
    "description": "MyApp",
    "slug": "my-app",
    "privacy": "unlisted",
    "sdkVersion": "26.0.0",
    "version": "0.10.9",
    "orientation": "portrait",
    "primaryColor": "#fff",
    "scheme": "myapp",
    "icon": "./assets/logo.png",
    "loading": {
      "icon": "./assets/logo.png",
      "hideExponentText": true
    },
    "ios": {
      "buildNumber": "1",
      "supportsTablet": false,
      "bundleIdentifier": "com.myapp",
      "associatedDomains": [
        "applinks:myapp.app.link"
      ],
      "config": {
        "googleSignIn": {
          "reservedClientId": "XXXXXX"
        },
        "branch": {
          "apiKey": "XXXXXX"
        }
      }
    },
    "android": {
      "package": "com.myapp",
      "config": {
        "googleSignIn": {
          "certificateHash": "XXXXXX"
        },
        "branch": {
          "apiKey": "XXXXXX"
        }
      }
    }
  }
}
0 Likes

#9

I did the following and it works for some reason now:

$ npm uninstall exp
$ npm uninstall exp -g
$ npm install exp -g

Then I rebooted. I have no clue why it works now…

2 Likes

closed #10

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

0 Likes