2

I have already tried : #448

Environment

System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
Memory: 30.63 MB / 4.00 GB
Shell: 3.2.57 - /bin/sh
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.19.2 - /usr/local/bin/yarn
npm: 6.13.1 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5

Description

enter image description here

➜ ios git:(master) ✗ pod install --verbose
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Users/jack/Desktop/root in PATH, mode 040777

[!] Invalid Podfile file: 767: unexpected token at ''.

from /Users/jack/Desktop/root/outonox/quibik/ios/Podfile:45
use_native_modules!
end

/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in rescue in block in from_ruby' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in instance_eval' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in new' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:in from_file' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:in verify_podfile_exists!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46:in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:in load'
/usr/local/bin/pod:23:in `

' Reproducible Demo

Not sure why this is happing, but this is started after installing "@react-native-firebase" this package

POD FILE

platform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'quibik' do # Pods for quibik

pod 'RNFBAuth', :path => "../node_modules/@react-native-firebase/auth" pod 'RNFBApp', :path => "../node_modules/@react-native-firebase/app"

pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

target 'quibikTests' do inherit! :search_paths # Pods for testing end

use_native_modules! end

target 'quibik-tvOS' do # Pods for quibik-tvOS

target 'quibik-tvOSTests' do inherit! :search_paths # Pods for testing end

end

Abhishek Tomar
  • 827
  • 1
  • 10
  • 20
  • Can you post your `Podfile` here? – Sanyam Jain Dec 11 '19 at 06:24
  • thanks for prompt reply... i have added pod file in Github. https://github.com/react-native-community/cli/issues/885 – Abhishek Tomar Dec 11 '19 at 08:31
  • Take a look on: https://stackoverflow.com/a/57239476/2638849. Maybe your solution has there – C-lio Garcia Dec 29 '19 at 15:02
  • I was stuck on this exact error for about 2 days, it started for me after installing rvm, so at least in my case it appears to have been a problem with the ruby version. I encountered issues with version 2.6.3 and with the default mac version of 2.3.7. The problem stopped after cleaning rvm installation and re installing. I noticed the file worked fine on a coworker's machine running rvm with ruby 2.5.3 as default and cocoapods 1.8.4, after reinstalling rvm and emulating this environment the file worked again on my machine. Hope it helps. – Itsca Feb 03 '20 at 22:09
  • I couldn't find a solution so I had to move my code to a new solution. – Abhishek Tomar Feb 05 '20 at 09:39

2 Answers2

5

Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

rm -rf package-lock.json
cd ios
pod install
2

What worked for me is:

  • Install Yarn Package manager

npm install --global yarn

  • In order to not to mix package managers

rm package-lock.json

  • Then run;

yarn install

cd ios && pod install && cd ..

npx react-native run-ios

Good luck!

Ahmad hassan
  • 1,039
  • 7
  • 13