Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find a specification for ExpoModulesCore depended upon by EXApplication #15959

Closed
MEsteves22 opened this issue Jan 19, 2022 · 16 comments
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues outdated

Comments

@MEsteves22
Copy link

Summary

Since upgrading expo to SDK 44, I get the following error while running pod install --repo-update:

Unable to find a specification for ExpoModulesCore depended upon by EXApplication

I also upgraded all the other expo packages I was using. I am currently using the following packages and versions:

  • expo: 44.0.5
  • expo-keep-awake: 10.0.1
  • expo-notifications: 0.14.0
  • expo-secure-store: 11.1.0

I am using react-native version 0.67.0.

Is someone also having this problem?

Thank you!

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

44

Environment

System:
OS: macOS 11.2.3
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 437.14 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 7.18.1 - /usr/local/bin/npm
Watchman: 2021.11.15.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Reproducible demo

I get the error while running pod install --repo-update.

@MEsteves22 MEsteves22 added the needs validation Issue needs to be validated label Jan 19, 2022
@byCedric
Copy link
Member

Hi @MEsteves22, please provide a repository for us to test with. expo-modules-core is a direct dependency of expo (source). So, if that's not installed, I would recommend reinstalling your node_modules again. But, without a repo, that's the only thing I can do for you.

Hope it helps!

@byCedric byCedric added incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues and removed needs validation Issue needs to be validated labels Jan 19, 2022
@expo-bot
Copy link
Collaborator

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources

Common concerns

"I've only been able to reproduce it in private, proprietary code"

You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase.

"I didn't have time to create one"

That's understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template.

"You can reproduce it by yourself by creating a project and following these steps"

This is useful knowledge, but it's still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue.

@MEsteves22
Copy link
Author

Thank you for your answer!

Sorry for not providing a repo, I didn't think it was needed.

I will do what you suggested :)

@mendesbarreto
Copy link

Thank you for your answer!

Sorry for not providing a repo, I didn't think it was needed.

I will do what you suggested :)

@MEsteves22 Do you were able to fix this error? because I am having the same problem 🥲

@MEsteves22
Copy link
Author

@mendesbarreto I solved my problem by deleting my project from my computer and cloning it again 😅 Then, I reinstalled all my node_modules and pods. After that, it started to work.

@samih7
Copy link

samih7 commented Feb 16, 2022

@mendesbarreto Were you able to get it sorted out? I'm also having the same issue and removing node_modules + Pods didn't help

@pe-johndpope
Copy link

pe-johndpope commented Feb 25, 2022

EDIT:
some findings / background - for my use case is desire to simply use expo-web-browser and get an app with 4 tabs.
It seemed like I could simply start up the expo project and quickly eject.
This I believe is what the expokit sdk was for - which is deprecated/obsolete.
Ejecting seems like a road to horror / or at least unfavourable to get things working.
To get around this problem - seems like best to start a new expo project - import/ cherry pick across all the code - and avoid run expo eject. I'm fine with that - it should be noted that running expo run:ios (automatically runs eject) as opposed to yarn run ios which keeps you inside expo. The fixes below are likely to be out of date come sdk 45.

RANDOM RAMBLINGS - TROUBLESHOOTING
I'm running node 14 and seeing same problem - if that helps. going to bump to later version.


 npm i -g npm@latest

RUBY -  ruby-2.7.4
expo-cli --version
5.2.0

pod --version
1.11.2
NVM -   v16.14.0

react-native-cli: 2.0.1
expo --version
5.2.0

rm -rf node_modules
yarn upgrade --latest
#Commit this
expo upgrade

✅ The following packages were updated:
@react-native-community/datetimepicker, react-native-safe-area-context, @react-native-async-storage/async-storage, @react-native-picker/picker, expo-font, @react-native-community/netinfo, expo-constants, expo-file-system, expo-updates, @expo/vector-icons, expo-application, react-native-gesture-handler, react-native-screens, expo-asset, expo-keep-awake, expo-web-browser, expo-splash-screen, expo-status-bar, react-native-reanimated, react-native-pager-view, react-native-svg, expo-modules-core, react-native, react, react-dom, jest, typescript, @babel/core, @types/react, react-native-web, @types/react-native, expo

🚨 The following packages were not updated. You should check the READMEs for those repositories to determine what version is compatible with your new set of packages:
@react-native-firebase/analytics, @react-native-firebase/app, @react-navigation/bottom-tabs, @react-navigation/material-bottom-tabs, @react-navigation/native, @react-navigation/native-stack, @react-navigation/stack, @reduxjs/toolkit, @sentry/cli, @sentry/react-native, axios, expo-modules-autolinking, html-entities, moment, react-native-android-open-settings, react-native-app-intro-slider, react-native-chart-kit, react-native-charts-wrapper, react-native-confirmation-code-field, react-native-copilot, react-native-device-info, react-native-dropdown-picker, react-native-elements, react-native-google-places-autocomplete, react-native-linear-gradient, react-native-modal-datetime-picker, react-native-onesignal, react-native-paper, react-native-permissions, react-native-popup-menu, react-native-quick-actions, react-native-step-indicator, react-native-swiper, react-native-tab-view, react-native-vector-icons, react-native-wifi-reborn, react-native-woocommerce-api, react-redux, rn-range-slider, @babel/runtime, @react-native-community/eslint-config, babel-jest, eslint, eslint-config-prettier, eslint-plugin-prettier, metro-react-native-babel-preset, prettier, react-test-renderer

# will downgrade react from 
cd ios
rm -rf Pods
rm Podfile
pod install --repo-update



still no joy.

this is my package.json
https://gist.github.com/pe-johndpope/74d330f531d2fed95c997a14a264cb38

UPDATE - still no joy.... I'm seeing this with sdk 43....

PARTIALLY WORKING

expo install expo@42.0.5
expo install  react-native@0.63.4
expo doctor --fix-dependencies 

package.json ->
"expo": "42.0.0",
app.json ->
"sdkVersion": "42.0.0"

downgrading to 42 works for now.
Need to remove Podfile react_native_post_install

https://stackoverflow.com/questions/66833868/how-do-i-troubleshoot-an-error-with-react-native-and-cocopods-on-a-mac-using-r

UPDATE - FIX
you're gonna need to overhaul your podfile with extra things
here's a comparison to my broken file.
https://gist.github.com/pe-johndpope/e34987568454dd3b4b3fc8104122414b

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")

platform :ios, '12.0'

require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}

target 'YOURIPHONETARGETNAMEHEREEEEEE🔥' do
  use_expo_modules!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
  )

  # Uncomment to opt-in to using Flipper
  #
  # if !ENV['CI']
  #   use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  # end

  post_install do |installer|
    react_native_post_install(installer)

    # Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
    # Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
    installer.pods_project.targets.each do |target|
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
  end

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end

end

@mharlowfod
Copy link

mharlowfod commented Apr 19, 2022

Just wanted to leave a comment here if anyone is seeing similar issues relating to Expo, ExpoModulesCore, and cocoapods configuration: @pe-johndpope 's fix above did resolve my pod install failures, and specifically it was the following two linges:

require File.join(File.dirname(node --print "require.resolve('expo/package.json')"), "scripts/autolinking")

and

use_expo_modules!

Update: out of curiousity, I tried aligning the require statement with what seems to be the newer format, and it seems to work also.

require_relative '../node_modules/expo/scripts/autolinking'

For reference, the reason I ended up in a weird state was due to the fact that expo doesn't seem to have an option to generate the iOS and Android directories for new projects. So I was copy-pasting projects into an expo project, but didn't have the boilerplate necessary podfile to make everything work. I'm probably missing something in that process as well - I'd be curious to see any documentation or how-tos that are out there.

@tj-mc
Copy link

tj-mc commented Apr 19, 2022

In my case I faced this error when integrating Expo Modules to a Bare RN 0.67.2 Project. However, the project is a monorepo with multiple targets in the Podfile. This custom structure meant the auto patch failed.

I added this snippet (from the setup guide) to the very end and everything works now.

use_expo_modules!

post_integrate do |installer|
  begin
    expo_patch_react_imports!(installer)
  rescue => e
    Pod::UI.warn e
  end
end

@focux
Copy link

focux commented May 20, 2022

In case anyone runs into the same issue as me, my problem was that I created a monorepo and forgot to add a package.json on the root folder of the workspace. I guess Expo uses that under the hood to get the root node_modules for the hoisted dependencies.

@estebanjb1989
Copy link

estebanjb1989 commented Jun 1, 2022

In my case I've had to add use expo_modules! and worked, seems like npx didn't add it automatically in the install script

@Michael-Davison
Copy link

Michael-Davison commented Nov 11, 2022

getting a similar error when I run eas build -p ios expo managed app.

[!] Unable to find a specification for EXUpdatesInterface depended upon by EXUpdates
You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.
    pod exited with non-zero code: 1

None of the solutions posted here have worked.

@doender
Copy link

doender commented Jan 2, 2023

getting a similar error when I run eas build -p ios expo managed app.

[!] Unable to find a specification for EXUpdatesInterface depended upon by EXUpdates You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.
    pod exited with non-zero code: 1

None of the solutions posted here have worked.

@Michael-Davison I'm running into the the same error. Did you find a fix for this?

@munroAllie
Copy link

getting a similar error when I run eas build -p ios expo managed app.
[!] Unable to find a specification for EXUpdatesInterface depended upon by EXUpdates You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.
    pod exited with non-zero code: 1

None of the solutions posted here have worked.

@Michael-Davison I'm running into the the same error. Did you find a fix for this?

I have this issue after updating my packages. Any fix found yet?

@Dat-Mobile
Copy link

run this command and it's good to go
npx install-expo-modules@latest

@pistonsky
Copy link
Contributor

Took me 3 pomodoro sessions to fix this stuff!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues outdated
Projects
None yet
Development

No branches or pull requests