[ERROR] The Cordova CLI was not found on your PATH. Please install Cordova globally:

I am so frustrated. After using the code npm i -g cordova a billion times both with and without sudo I feel so confused.

How do I get cordova to work again? I need it to work in order to add platforms and to make the resources generator working. I have looked online, but what is working for others is not working for me.

I am a newbie, so please explain in extremely, detalied simple and clear language.

I am trying to create an android app.

49

Camilas-MacBook-Air:~ Camila$ sudo npm i -g cordova

Password:

/Users/Camila/.npm-global/bin/cordova -> /Users/Camila/.npm-global/lib/node_modules/cordova/bin/cordova

  • cordova@9.0.0

updated 1 package in 5.151s

Camilas-MacBook-Air:~ Camila$

Though, I cannot use ionic cordova platform add

It looks like Cordova’s been installed successfully. As for ‘cordova platform add’, try it without ‘sudo’:

ionic cordova platform add android

You can also run ionic info within an Ionic project to see all details about the tools you have (or don’t have) installed.

1 Like

I solved it eventually.

Thanks.