无法`pod install`+ M1(Rosetta)[React Native Setup]
我正在Mac M1中设置一个React Native项目,当我尝试使用React-Navigation
时
ERROR [react-native-gesture-handler] react-native-gesture-handler module was not found. Make sure you're running your app on the native platform and your code is linked properly (cd ios && pod install && cd ..).
,我会收到此错误,当我尝试运行时,
cd ios && pod install
我会读取多个线程并尝试安装> brew
和ruby
使用rosetta
终端,我仍然会遇到相同的错误。
arch -x86_64 pod install 14:12:19
[!] Invalid `Podfile` file: /Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:39: syntax error, unexpected <<
template =<<~EOS
^
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:40: unknown regexp options - ll
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: dynamic constant assignment
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: `$(' is not allowed as a global variable name
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: syntax error, unexpected end-of-input
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^.
# from /Users/akilesh/Documents/akilesh/personal/learning/zippy/ios/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'```
I am setting up a react native project in my Mac M1 and when I try to use react-navigation
I get this error,
ERROR [react-native-gesture-handler] react-native-gesture-handler module was not found. Make sure you're running your app on the native platform and your code is linked properly (cd ios && pod install && cd ..).
and when I tried running,
cd ios && pod install
I read through multiple threads and tried installing brew
and ruby
using the rosetta
terminal and I still get the same error.
arch -x86_64 pod install 14:12:19
[!] Invalid `Podfile` file: /Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:39: syntax error, unexpected <<
template =<<~EOS
^
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:40: unknown regexp options - ll
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: dynamic constant assignment
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: `$(' is not allowed as a global variable name
/Users/akilesh/Documents/akilesh/personal/learning/zippy/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: syntax error, unexpected end-of-input
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^.
# from /Users/akilesh/Documents/akilesh/personal/learning/zippy/ios/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native/scripts/react_native_pods'
# require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'```
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论