Dylan Guzman
Dylan Guzman

Reputation: 181

I am getting an error when running the flutterfire configure command on my mac

Unhandled exception:
Exception: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from -e:1:in `<main>'

#0      ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:517:11)
<asynchronous suspension>
#1      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#2      main (file:///Users/dylanguzman/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.6+1/bin/flutterfire.dart:57:5)
<asynchronous suspension>

I tried :

flutterfire configure --project=test-app-egr423

Firebase configuration file lib/firebase_options.dart generated successfully with the following Firebase apps:

Upvotes: 18

Views: 3703

Answers (2)

Chloe
Chloe

Reputation: 71

The only thing that worked for me, was the same as others have said. I had tried to install xcodeproj through brew and was having link issues, but I've installed it using

sudo gem install xcodeproj

and now flutterfire configure is working.

Upvotes: 7

ebarooni
ebarooni

Reputation: 1918

I was getting the same error when using flutterfire version 0.2.7 on my Macbook Air M1 when running flutterfire configure. In my case I solved this issue by opening the terminal and running the following command:

gem install xcodeproj

Or if running the command gives any permission errors:

sudo gem install xcodeproj

I hope this solves the problem for you as well. I found my solution from this Github issue.

Upvotes: 30

Related Questions