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

Cannot find module '@callstack/react-native-visionos/scripts/react_native_pods.rb' #156

Closed
guilherme-francisco opened this issue Jul 16, 2024 · 1 comment

Comments

@guilherme-francisco
Copy link

Description

I am just trying to run the react native vision OS but I am encountering the following error:

[!] Invalid Podfile file: [!] /usr/local/bin/node -p require.resolve(
"@callstack/react-native-visionos/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
) /MySpatialApp/visionos

node:internal/modules/cjs/loader:1148
throw err;
^

Error: Cannot find module '@callstack/react-native-visionos/scripts/react_native_pods.rb'
Require stack:

  • //MySpatialApp/visionos/[eval]
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Function.resolve (node:internal/modules/helpers:190:19)
    at [eval]:1:9
    at runScriptInThisContext (node:internal/vm:209:10)
    at node:internal/process/execution:118:14
    at [eval]-wrapper:6:24
    at runScript (node:internal/process/execution:101:62)
    at evalScript (node:internal/process/execution:133:3)
    at node:internal/main/eval_string:51:3 {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/MySpatialApp/visionos/[eval]' ]
    }

Node.js v20.14.0
.

from /MySpatialApp/visionos/Podfile:2

Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(

Steps to reproduce

  1. npx @callstack/react-native-visionos@latest init MySpatialApp
  2. bundle install
  3. bundle exec pod install
  4. Error

React Native Version

0.77.4

Affected Platforms

Runtime - iOS, Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M3
  Memory: 487.34 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.14.0
    path: /usr/local/bin/node
  Yarn:
    version: 3.6.4
    path: /usr/local/bin/yarn
  npm:
    version: 10.7.0
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "28"
      - "30"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 35.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

Error: Cannot find module '@callstack/react-native-visionos/scripts/react_native_pods.rb'

Reproducer

https://github.com/react-native-community/reproducer-react-native

Screenshots and Videos

j

@guilherme-francisco
Copy link
Author

I found the solution: Just run

bash npm install

in MySpatialApp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant