Invalid `Podfile` file: cannot load such file – Error pod install

I am having an issue when running the pod install command since I updated the operating system to the latest version and Xcode to 15.4.

Error:

[!] Invalid Podfile file: cannot load such file — /Users/zzz/Documents/GitHub/project/apps/mobile/node_modules/@nrwl/react-native/nx_post_install.

This project uses a mono-repo, so at the root of the project, I have this ‘package.json’:

  "private": true,"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@mui/icons-material": "^5.10.16",
"@mui/material": "^5.10.16",
"@mui/styled-engine-sc": "^5.10.16",
"@native-base/icons": "^0.0.11",
"@react-native-community/geolocation": "^3.0.4",
"@react-native-firebase/app": "^15.4.0",
"@react-native-firebase/messaging": "^15.4.0",
"@react-native-picker/picker": "^2.4.8",
"@react-navigation/bottom-tabs": "^6.3.2",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"@types/react-native-vector-icons": "^6.4.12",
"axios": "^0.27.2",
"core-js": "^3.6.5",
"fast-copy": "^2.1.3",
"i18next": "^20.4.0",
"intl": "^1.2.5",
"json-patch": "^0.7.0",
"libphonenumber-js": "^1.10.18",
"lodash.isplainobject": "^4.0.6",
"luxon": "^3.2.1",
"moment": "^2.29.4",
"native-base": "^3.4.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^11.11.4",
"react-native": "0.68.2",
"react-native-beacons-manager": "https://github.com/Hamilton-Robson/react-native-beacons-manager.git",
"react-native-big-calendar": "^4.6.0",
"react-native-biometrics": "^3.0.1",
"react-native-ble-manager": "^11.1.0",
"react-native-bouncy-checkbox": "^3.0.7",
"react-native-calendar-events": "^2.2.0",
"react-native-calendar-picker": "^7.1.4",
"react-native-calendars": "^1.1301.0",
"react-native-collapsible": "^1.6.1",
"react-native-country-picker-modal": "^2.0.0",
"react-native-date-picker": "^4.2.6",
"react-native-device-info": "^10.13.2",
"react-native-flash-message": "^0.2.1",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-localize": "^3.0.2",
"react-native-modal": "^13.0.1",
"react-native-notifications": "^4.3.1",
"react-native-otp-textinput": "^1.1.0",
"react-native-paper": "^5.1.4",
"react-native-phone-number-input": "^2.1.0",
"react-native-pin-view": "^3.0.2",
"react-native-render-html": "^6.3.4",
"react-native-rsa-native": "^2.0.5",
"react-native-safe-area-context": "^4.2.5",
"react-native-screens": "^3.13.1",
"react-native-swipe-gestures": "^1.0.5",
"react-native-swipe-list-view": "^3.2.9",
"react-native-table": "^1.0.1",
"react-native-table-component": "^1.2.2",
"react-native-uuid-generator": "^6.1.1",
"react-native-vector-icons": "^9.2.0",
"regenerator-runtime": "0.13.7",
"styled-components": "^5.3.6",
"tslib": "^2.3.0",
"zustand": "^3.7.2" },"devDependencies": {
"@nrwl/cli": "14.4.3",
"@nrwl/detox": "14.4.3",
"@nrwl/eslint-plugin-nx": "14.4.3",
"@nrwl/jest": "14.4.3",
"@nrwl/linter": "14.4.3",
"@nrwl/nx-cloud": "latest",
"@nrwl/react": "14.4.3",
"@nrwl/react-native": "^14.4.3",
"@nrwl/web": "14.4.3",
"@nrwl/workspace": "14.4.3",
"@react-native-async-storage/async-storage": "^1.17.6",
"@react-native-community/cli": "7.0.3",
"@react-native-community/cli-platform-android": "7.0.1",
"@react-native-community/cli-platform-ios": "7.0.1",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/jest-native": "4.0.5",
"@testing-library/react": "13.3.0",
"@testing-library/react-native": "9.1.0",
"@types/jest": "27.4.1",
"@types/json-patch": "^0.0.30",
"@types/lodash.isplainobject": "^4.0.6",
"@types/node": "16.11.7",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.5",
"@types/react-native": "0.67.8",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"babel-jest": "27.5.1",
"detox": "19.7.1",
"eslint": "~8.15.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.0",
"eslint-plugin-react": "7.30.1",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "27.5.1",
"jest-circus": "27.5.1",
"jest-react-native": "18.0.0",
"metro": "0.71.1",
"metro-babel-register": "0.71.1",
"metro-react-native-babel-preset": "0.71.1",
"metro-resolver": "0.71.1",
"nx": "14.4.3",
"prettier": "^2.6.2",
"react-native-config": "1.4.6",
"react-native-svg": "12.3.0",
"react-native-svg-transformer": "^1.1.0",
"react-test-renderer": "18.2.0",
"ts-jest": "27.1.4",
"ts-node": "~10.8.0",
"typescript": "~4.7.2"}

Package.Json inside apps/mobile:

{"name": "mobile","version": "0.0.1","private": true,"dependencies": {
"@testing-library/jest-native": "*",
"@testing-library/react-native": "*",
"react": "*",
"react-native": "*",
"react-native-config": "*",
"react-native-svg": "*",
"@react-native-async-storage/async-storage": "*",
"i18next": "*",
"react-i18next": "*",
"@react-navigation/native": "*",
"react-native-safe-area-context": "*",
"@react-navigation/native-stack": "*",
"@react-navigation/bottom-tabs": "*",
"styled-components": "*",
"native-base": "*",
"react-native-screens": "*",
"react-native-keyboard-aware-scroll-view": "*",
"react-native-vector-icons": "*",
"lodash.isplainobject": "*",
"axios": "*",
"fast-copy": "*",
"json-patch": "*",
"react-native-flash-message": "*",
"zustand": "*",
"react-native-device-info": "*",
"react-native-rsa-native": "*",
"react-native-uuid-generator": "*",
"react-native-render-html": "*",
"@react-native-firebase/app": "*",
"@react-native-firebase/messaging": "*",
"react-native-notifications": "*",
"react-native-pin-view": "*",
"react-native-otp-textinput": "*",
"moment": "*",
"react-native-date-picker": "*",
"@react-native-community/geolocation": "*",
"react-native-bouncy-checkbox": "*",
"react-native-calendars": "*",
"luxon": "*",
"intl": "*",
"react-native-calendar-events": "*",
"react-native-country-picker-modal": "*",
"react-native-phone-number-input": "*",
"libphonenumber-js": "*",
"react-native-swipe-list-view": "*",
"@react-native-picker/picker": "*",
"react-native-paper": "*",
"react-native-beacons-manager": "*",
"react-native-calendar-picker": "*",
"react-native-localize": "*",
"react-native-modal": "*",
"react-native-big-calendar": "*",
"@eabdullazyanov/react-native-sms-user-consent": "*",
"react-native-biometrics": "*",
"react-native-table": "*",
"react-native-table-component": "*",
"react-native-ble-manager": "*",
"react-native-collapsible": "*"}}

Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/@nrwl/react-native/nx_post_install'

platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false

pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true

abstract_target 'MobileCommonPods' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  
  
  target 'Mobile Dev' do
    end

  target 'MobileTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    nx_post_install(installer)
  end
end

“react-native”: “0.68.2”
“react”: “18.2.0”
Cocoapods: 1.15.2
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]
Apple M2 – MacOS 14.6.1

Help please!

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật