ios – Pod installation not working due to node modules & podfile


i am trying to setup my environment on my new computer( mac-m3) and i am trying to start a mobile application, when i try to run pod install i face these errors. My project uses:
node 14.20.0,
and: 3.3.0 (set by /user/.rbenv/version),
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
cocoapod version 1.14.3
react version 18.2.0
react-native version “0.67.9”,
npm v8.19.4

‘Log files:

While resolving: [email protected]
Found: @types/[email protected]
node_modules/@types/react
dev @types/react@”18.0.28″ from the root project

Could not resolve dependency:
peerOptional @types/react@”^18.2.25″ from [email protected]
node_modules/react-redux
react-redux@”^9.1.0″ from the root project

Conflicting peer dependency: @types/[email protected]
node_modules/@types/react
peerOptional @types/react@”^18.2.25″ from [email protected]
node_modules/react-redux
react-redux@”^9.1.0″ from the root project

[!] Invalid Podfile file: /User/repo/app/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:39: syntax error, unexpected <<
template =<<~EOS
^
/Users/baasandorj.l/Repos/OCH/kb-och/app/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:40: unknown regexp options – ll
/Users/baasandorj.l/Repos/OCH/kb-och/app/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: dynamic constant assignment
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^
/Users/baasandorj.l/Repos/OCH/kb-och/app/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: `$(‘ is not allowed as a global variable name
/Users/baasandorj.l/Repos/OCH/kb-och/app/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)
^.

require_relative ‘../node_modules/react-native/scripts/react_native_pods’

i tried deleting node modules, cocoapods, rbenv and reinstalled but its giving the same error and these are some versions of my environment, i even tried adding this line to my zshrc alias pod=’arch -x86_64 pod’ please help!!!

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img