dpa99c / cordova-plugin-firebasex

Cordova plugin for Google Firebase
MIT License
571 stars 462 forks source link

Error `cocoapods not found` when install cordova-plugin-firebasex #613

Open lebaphi opened 3 years ago

lebaphi commented 3 years ago

I have install the cocoapds success by the following https://cocoapods.org/, check:

image

Then I want to add the ios platform by running ionic cordova platform add ios, it will install the cordova-plugin-firebasex and I get this error:

Installing "cordova-plugin-firebasex" for ios
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)

Usage:

    $ pod COMMAND

      CocoaPods, the Cocoa library package manager.

Commands:

    + cache        Manipulate the CocoaPods cache
    + env          Display pod environment
    + init         Generate a Podfile for the current directory
    + install      Install project dependencies according to versions from a
                   Podfile.lock
    + ipc          Inter-process communication
    + lib          Develop pods
    + list         List pods
    + outdated     Show outdated project dependencies
    + repo         Manage spec-repositories
    + setup        Setup the CocoaPods environment
    + spec         Manage pod specs
    + update       Update outdated project dependencies and create new Podfile.lock

Options:

    --allow-root   Allows CocoaPods to run as root
    --silent       Show nothing
    --version      Show the version of the tool
    --verbose      Show more debugging information
    --no-ansi      Show output without ANSI codes
    --help         Show help banner of specified command
        from /usr/local/Cellar/cocoapods/1.10.0/libexec/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:102:in `ensure_not_root_or_allowed!'
        from /usr/local/Cellar/cocoapods/1.10.0/libexec/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:48:in `run'
        from /usr/local/Cellar/cocoapods/1.10.0/libexec/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
        from /usr/local/Cellar/cocoapods/1.10.0/libexec/bin/pod:23:in `load'
        from /usr/local/Cellar/cocoapods/1.10.0/libexec/bin/pod:23:in `<main>'
Failed to install 'cordova-plugin-firebasex': Error: cocoapods not found - please install cocoapods >=^1.9.1
    at checkCocoapodsVersion (/Users/lebaphi/Desktop/panda-cypress-project/code/plugins/cordova-plugin-firebasex/scripts/ios/before_plugin_install.js:15:15)
    at module.exports (/Users/lebaphi/Desktop/panda-cypress-project/code/plugins/cordova-plugin-firebasex/scripts/ios/before_plugin_install.js:7:5)
    at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:32)
    at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:136:12)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:108:40
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
cocoapods not found - please install cocoapods >=^1.9.1

I'm using:

I'm not sure what is the issue. Thanks!

gczudowski commented 3 years ago

same issue. cordova@9.0.0 and cordova-ios@6.2.0

gczudowski commented 3 years ago

update: for me the issue was actually missing pod in $PATH so build script could not reach it. what helped was: brew install cocoapods

SvyatoslavPozhydaev commented 3 years ago

This error also occurs if you install the plugin on windows.

"cordova": "^10.0.0", "cordova-android": "^9.0.0", "cordova-browser": "^6.0.0", "cordova-ios": "^6.2.0",

Installing "cordova-plugin-firebasex" for ios
"pod" �� ���� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
Failed to install 'cordova-plugin-firebasex': Error: cocoapods not found - please install cocoapods >=^1.9.1
    at checkCocoapodsVersion (D:\OpenServer\domains\***\plugins\cordova-plugin-firebasex\scripts\ios\before_plugin_install.js:15:15)
    at module.exports (D:\OpenServer\domains\***\plugins\cordova-plugin-firebasex\scripts\ios\before_plugin_install.js:7:5)
    at runScriptViaModuleLoader (D:\OpenServer\domains\***\node_modules\cordova-lib\src\hooks\HooksRunner.js:157:32)
    at runScript (D:\OpenServer\domains\***\node_modules\cordova-lib\src\hooks\HooksRunner.js:136:12)
    at D:\OpenServer\domains\***\node_modules\cordova-lib\src\hooks\HooksRunner.js:108:40
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
cocoapods not found - please install cocoapods >=^1.9.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

IlanVokov commented 3 years ago

Installing "cordova-plugin-firebasex" for ios /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20/rbconfig.rb:229: warning: Insecure world writable dir /Users/ilanvolkov/Desktop/Cordova/cordova-package in PATH, mode 040707 /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)

Usage:

$ pod COMMAND

  CocoaPods, the Cocoa library package manager.

Commands:

+ cache        Manipulate the CocoaPods cache
+ env          Display pod environment
+ init         Generate a Podfile for the current directory
+ install      Install project dependencies according to versions from a
               Podfile.lock
+ ipc          Inter-process communication
+ lib          Develop pods
+ list         List pods
+ outdated     Show outdated project dependencies
+ repo         Manage spec-repositories
+ setup        Setup the CocoaPods environment
+ spec         Manage pod specs
+ update       Update outdated project dependencies and create new Podfile.lock

Options:

--allow-root   Allows CocoaPods to run as root
--silent       Show nothing
--version      Show the version of the tool
--verbose      Show more debugging information
--no-ansi      Show output without ANSI codes
--help         Show help banner of specified command
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/command.rb:102:in `ensure_not_root_or_allowed!'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/command.rb:48:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'

Failed to install 'cordova-plugin-firebasex': Error: cocoapods not found - please install cocoapods >=^1.9.1 at checkCocoapodsVersion (/Users/ilanvolkov/Desktop/Cordova/cordova-package/plugins/cordova-plugin-firebasex/scripts/ios/before_plugin_install.js:15:15) at module.exports (/Users/ilanvolkov/Desktop/Cordova/cordova-package/plugins/cordova-plugin-firebasex/scripts/ios/before_plugin_install.js:7:5) at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:32) at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:136:12) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:108:40 at processTicksAndRejections (internal/process/task_queues.js:95:5) cocoapods not found - please install cocoapods >=^1.9.1

alexbres commented 2 years ago

The same issue.

adipascu commented 2 years ago

Somebody should remove the wontfix label, this is an issue that is affecting me on Linux (but working as expected on macOS).

My current workaround is to run cordova prepare android when on Linux (when cordova-plugin-firebasex was already added from macOS into the project).

dpa99c commented 2 years ago

stalebot got carried away with marking issues as stale and closing them so I got rid of it

blackram commented 2 years ago

are u running as root?

`help!': [!] You cannot run CocoaPods as root.

I haven't had the issues above but you might refer to this:

https://stackoverflow.com/questions/23190064/cant-run-sudo-pod-install-after-updating-to-cocoapods-0-32-1-with-error-you-ca/37451422

newuser44 commented 2 years ago

Any update on this?
I have been tasked with seeing what does and doesn't work on this ionic 3 apps. :( I had been using a newer version of Java and so installed Cordova 10 to get android builds working.
Now on Mac and IOS trying to get build working I get the error.

Installing "cordova-plugin-firebasex" for ios /bin/sh: pod: command not found Failed to install 'cordova-plugin-firebasex': Error: cocoapods not found - please install cocoapods >=^1.9.1

Thoughts?

blackram commented 2 years ago

did u install cocoapods >=^1.9.1 ?

https://stackoverflow.com/questions/20755044/how-do-i-install-cocoapods