Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Failed to install CocoaPods dependencies for iOS project

$
0
0

I want to create a react native firebase project. But when I follow the setup instructions from https://invertase.io/oss/react-native-firebase/quick-start/new-project and run the following commands, I cannot resolve some cocoapod errors. I tried to run the following commmands:

npx react-native init --template=@react-native-firebase/template HelloApp

✔ Downloading template ✔ Copying template ✔ Processing template ⠏ Installing CocoaPods dependencies (this may take a few minutes)internal/modules/cjs/loader.js:979   throw err;   ^

Error: Cannot find module '/Users/me/Desktop/HelloApp/ios/undefined'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {   code: 'MODULE_NOT_FOUND',   requireStack: [] }

✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. Please try again manually: "cd ./HelloApp/ios && pod install". CocoaPods documentation: https://cocoapods.org/

The I trield to install the cocoapod deps manually:

cd ./HelloApp/ios && pod install

> > internal/modules/cjs/loader.js:979   throw err;   ^
> > 
> > Error: Cannot find module '/Users/me/Desktop/HelloApp/ios/undefined'> >     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
> >     at Function.Module._load (internal/modules/cjs/loader.js:859:27)
> >     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
> >     at internal/main/run_main_module.js:17:47 {   code: 'MODULE_NOT_FOUND',   requireStack: [] }
> > 
> > [!] Invalid `Podfile` file: 767: unexpected token at ''.
> > 
> >  #  from /Users/me/Desktop/HelloApp/ios/Podfile:46  # 
> > -------------------------------------------  #  
> >  >    use_native_modules!  #  end  #  -------------------------------------------

Then I tried to update Cocoapod:

pod install --repo-update

 internal/modules/cjs/loader.js:979   throw err;   ^

Error: Cannot find module '/Users/me/Desktop/HelloApp/ios/undefined'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {   code: 'MODULE_NOT_FOUND',   requireStack: [] }

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

 #  from /Users/me/Desktop/HelloApp/ios/Podfile:46  # 
-------------------------------------------  #  
 >    use_native_modules!  #  end  #  -------------------------------------------

But none of them were able to solve the cocoapod error. How can I install the firebase template correctly?


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>