usually this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension.
here is the solution:
- sudo gem uninstall cocoapods && sudo gem install cocoapods
- restart IDE or Editor
the last step should solve the issue if not close the project entirely