Reputation: 101
I try to install ionic 4 on my iMac.
I use this : npm install -g ionic Cordova
when I use ionic command I have this error : " ionic : command not found "
At the end I have this : + [email protected]
+ [email protected]
and when I try to use some Cordova command it work.
Upvotes: 1
Views: 3173
Reputation: 131
From your question, I see you have installed node, cordova, ionic already to resolve error : " ionic : command not found" Try this out: 1. check your:
npm root
check:
npm root -g
You should have something like: "/usr/local"
Change it using:
npm config set prefix /usr/local
Your can check your result with:
npm root -g
You should have something like
"/usr/local/lib/node_modules"
You can now re-install everything with "-g"
sudo npm install -g cordova
sudo npm install -g ionic
If you still have the previous installation, please remember to uninstall first be re-installation with:
sudo npm uninstall -g cordova
sudo npm uninstall -g ionic
Upvotes: 5