Error when ejecting to bare: use_native_modules! missing

When ejecting to bare,

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
and
use_native_modules!

is missing inside the Podfile

Expo SDK 36

  Expo CLI 3.11.3 environment info:
    System:
      OS: macOS 10.15.2
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.16.3 - /usr/local/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.13.2 - ~/Gitlab/nightstomp/netstar/eject-test/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5977832
      Xcode: 11.3/11C29 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ~16.9.0 => 16.9.17 
      @types/react-native: ~0.60.23 => 0.60.27 
      expo: ^36.0.0 => 36.0.0 
      react: ~16.9.0 => 16.9.0 
      react-native: ~0.61.4 => 0.61.5 

This comment and the discussion following may be informative:

https://github.com/expo/expo/issues/6230#issuecomment-565224188

@brettdh I know that, but since Expo aims to optimize their “eject” workflow to be as less painful as possible, these are things that should be covered.

It tooked me like 4 hours to get a running iOS and Android project. I am willing to share all the steps I had to take (they might be totally different for others, since each setup is different), but with some good articles, the bare eject can actually go pretty smooth, but I had to google the heck out of me to get Linking, weird issues with “EXPO SDK IS MISSING”, wrong constants and no access to manifest.extra, broken Lottie etc etc.

I agree, having just been through it myself. Just providing the latest info I’ve seen on the status and how to resolve it. Since you’re already aware and seem to be reporting a bug rather than requesting help, a GitHub issue might be the way to go with this.

1 Like

Not being in sync with react-native inits podfile is also not understandable for me. All users on SDK 36 should get the 0.61.4 template, which has autolinking active. It’s not even documented somewhere. So yeah, there is room for improvement in the workflow or in the readme.

And the expo eject should report that a file imports “expo” (eg notifications), since they are already reporting that there are n-unimodules which have to be configured.

@hirbod I’d love if you could post a gist or something with whatever steps you took for upgrading. I’ve been struggling for a week now, and still hitting a number of the issues you mentioned solving, so whatever you have, I’d be immensely thankful if you could share. :pray:

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