Skip to content

Invalid hermes-engine.podspec file: undefined method `exists?' for File:Class #35807

Closed
@leotm

Description

@leotm

Description

npx react-native@next init RN071RC6 --version 0.71.0-rc.6
cd ios && pod install

Locally started noticing

...
[Codegen] Done.
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[!] Failed to load 'hermes-engine' podspec:
[!] Invalid `hermes-engine.podspec` file: undefined method `exists?' for File:Class.

 #  from /Users/leo/Documents/GitHub/react-native-template-new-architecture/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:46
 #  -------------------------------------------
 #    source[:http] = "file://#{destination_path}"
 >  elsif File.exists?(hermestag_file) && isInCI
 #    Pod::UI.puts '[Hermes] Detected that you are on a React Native release branch, building Hermes from source but fetched from tag...'.yellow if Object.const_defined?("Pod::UI")
 #  -------------------------------------------


[!] [Codegen] warn: using experimental new codegen integration

Same in template (0.71.0-rc.5)
But CI passing as normal
So seems to be my machine, not figured exactly what yet

This is getting me passed it atm as temp workaround

# node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec
- elsif File.exists?(hermestag_file) && isInCI
-   Pod::UI.puts '[Hermes] Detected that you are on a React Native release branch, building Hermes from source but fetched from tag...'.yellow if Object.const_defined?("Pod::UI")
-   hermestag = File.read(hermestag_file).strip
-   source[:git] = git
-   source[:tag] = hermestag

Result

...
Installing glog (0.3.5)
Installing hermes-engine (0.71.0-rc.6)
Installing libevent (2.1.12)
Generating Pods project
Setting REACT_NATIVE build settings
Setting CLANG_CXX_LANGUAGE_STANDARD to c++17 on /Users/leo/Documents/GitHub/RN071RC6/ios/RN071RC6.xcodeproj
Pod install took 14 [s] to run
Integrating client project

[!] Please close any current Xcode sessions and use `RN071RC6.xcworkspace` for this project from now on.
Pod installation complete! There are 59 dependencies from the Podfile and 49 total pods installed.

Version

0.71.0-rc.5-6

Output of npx react-native info

System:
    OS: macOS 13.2
    CPU: (8) arm64 Apple M1
    Memory: 219.19 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.2.0 - /opt/homebrew/bin/npm
    Watchman: 2023.01.09.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 19.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.0-rc.6 => 0.71.0-rc.6
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

npx react-native@next init RN071RC6 --version 0.71.0-rc.6
cd ios && pod install

On System info above

Snack, code example, screenshot, or link to a repository

TODO

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions