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

Can't do pod install in example project when choose Turbo Native Modules with backward compatible: Invalid Podfile file: Could not find Node #639

Closed
1 of 2 tasks
LeXuanKhanh opened this issue Sep 25, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@LeXuanKhanh
Copy link

Description

Step:

  • Create new libraries with the option 'Turbo Native Modules with backward compatible'
  • Yarn install the repo
  • Go to example/ios, do pod install

Error:

[!] Invalid `Podfile` file: Could not find Node.

 #  from /Users/macbookpro/Projects/react-native-awesome-module/example/ios/Podfile:9
 #  -------------------------------------------
 #  
 >  use_test_app!
 #  -------------------------------------------

Example/ios/Podfile:

ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
  File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
  ws_dir.expand_path.to_s == '/'
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"

workspace 'RnScanCodeFromImageExample.xcworkspace'

use_test_app!

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

  • Turbo Native Modules with backward compatible
  • Test app

Link to repro

https://github.com/LeXuanKhanh/react-native-awesome-module

Environment

System:
  OS: macOS 13.6.3
  CPU: (10) arm64 Apple M1 Pro
  Memory: 93.16 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.2
    path: ~/.asdf/installs/nodejs/18.20.2/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.asdf/plugins/nodejs/shims/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/macbookpro/.asdf/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11047128
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.7
    path: /usr/bin/javac
  Ruby:
    version: 3.3.0
    path: /Users/macbookpro/.asdf/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.3
    wanted: 0.75.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
@LeXuanKhanh LeXuanKhanh added the bug Something isn't working label Sep 25, 2024
atlj added a commit that referenced this issue Oct 18, 2024
### Summary

This makes the vanilla example app the first option when the CLI asks
for the type of the example app.
![Screenshot 2024-10-18 at 18 12
00](https://github.com/user-attachments/assets/63943479-cab2-4a54-b8e7-6d5a6355799d)

We were seeing some RNTA specific bugs such as #639

With that being said, this is in no way an attempt to fix the bugs that
are caused by create-react-native-library when we integrate with the
React Native Testing App. Such bugs should still be fixed by the team.

### Test plan

1. Run creact-react-native-library
2. Pick a native library template
3. Make sure when the example type is asked, vanilla example is the
first option.
@atlj
Copy link
Collaborator

atlj commented Oct 18, 2024

Hey, @LeXuanKhanh this was an issue with the way RNTA searches for node and the way asdf treats the "binaries" as shellscript files.
Looks like this was fixed with RNTA 3.10.13
Detailed description of the actual issue

Please create a new library from scratch or update your RNTA version. This should be fixed. Closing the issue, please open it again if it isn't fixed.

@atlj atlj closed this as completed Oct 18, 2024
@LeXuanKhanh
Copy link
Author

Hey, @LeXuanKhanh this was an issue with the way RNTA searches for node and the way asdf treats the "binaries" as shellscript files. Looks like this was fixed with RNTA 3.10.13 Detailed description of the actual issue

Please create a new library from scratch or update your RNTA version. This should be fixed. Closing the issue, please open it again if it isn't fixed.

hi @atlj, I have created a new library from scratch with test app option and the newest RNTA but this issue still exists, you can check out here:
https://github.com/LeXuanKhanh/awesome-library

I have checked the yarn.lock file and saw the version of RNTA installed is 3.10.17

since this is mainly an issue about RNTA, should I bring this conversation to current main issue of RNTA that you mention above ?
I tried to get as many useful info as I can by using yarn ios --verbose, but it only print out error Something when wrong while installing CocoaPods. Please run pod install manually. 🥲

@atlj
Copy link
Collaborator

atlj commented Oct 20, 2024

Hey @LeXuanKhanh I think filing an issue for React Native Test App and creating a reproducable enviroment for them would be the best move. Also if you want to be able to move forward faster, I would recommend either using nvm or just straight installing node from brew/nix for the moment being. Once the issue is fixed, you can go back to asdf.

@LeXuanKhanh
Copy link
Author

LeXuanKhanh commented Oct 20, 2024

Hey @LeXuanKhanh I think filing an issue for React Native Test App and creating a reproducable enviroment for them would be the best move. Also if you want to be able to move forward faster, I would recommend either using nvm or just straight installing node from brew/nix for the moment being. Once the issue is fixed, you can go back to asdf.

Thanks for the suggestion, I think I should stick with the vanilla app option when create a new library since It still work fine for me without this issue

@LeXuanKhanh
Copy link
Author

LeXuanKhanh commented Oct 22, 2024

Hi @atlj, after some poking around, I figure out that this is not an issue with the Node finder rather than the cocoapod itself, my global pod seems to get the error when installing dependencies, I then try to set up a local cocoapod for the project using bundler then everything is working as normal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants