I am trying to install ionic globally.
sudo npm install -g cordova ionic AND npm install [email protected] --save
I tried both the commend it execute successfully.
But when i run ionic info it shows -bash: ionic: command not found
Can anyone help me?
EDIT : Same thing happen when i install cordova
sudo npm install -g cordova
Password:
/Users/hardik/.npm-packages/bin/cordova -> /Users/hardik/.npm-packages/lib/node_modules/cordova/bin/cordova
+ [email protected]
updated 1 package in 7.011s
Sshah-Mac-mini:node_modules sunny$ cordova -v
-bash: cordova: command not found
Terminal Log
Sshah-Mac-mini:~ sunny$ npm list -g --depth=0
/Users/hardik/.npm-packages/lib
├── @angular/[email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Sshah-Mac-mini:~ sunny$ npm root -g
/Users/hardik/.npm-packages/lib/node_modules
╭───────────────────────────────────────────────────────────────╮
│ │
│ New minor version of npm available! 6.7.0 → 6.9.0 │
│ Changelog: https://github.com/npm/cli/releases/tag/v6.9.0 │
│ Run npm install -g npm to update! │
│ │
╰───────────────────────────────────────────────────────────────╯
Sshah-Mac-mini:~ sunny$ npm install -g npm
/Users/hardik/.npm-packages/bin/npm -> /Users/hardik/.npm-packages/lib/node_modules/npm/bin/npm-cli.js
/Users/hardik/.npm-packages/bin/npx -> /Users/hardik/.npm-packages/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 16.501s
Sshah-Mac-mini:~ sunny$ ionic info
-bash: ionic: command not found
Sshah-Mac-mini:~ sunny$
This command show globally available modules in npm
npm list -g --depth=0
if you cant see ionic cordova in this list it means both packages are not installed globally.
check your global installation path by
npm root -g
check if your ionic and cordova installed in this directory or not. if you have tried path changing in first answer and still not working then uninstall node and install latest recommended version of node.
then install
npm install -g ionic
npm install -g cordova
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With