Issue
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$
Solution
Fixed it
By editing ~/.bashrc with the following
export PATH=$PATH:/Users/EDIT_THIS_PUT_YOUR_USER_NAME_HERE/.npm-packages/bin
sudo npm install -g grpc --allow-root --unsafe
node-sass : npm rebuild node-sass
Answered By - Sunny Shah
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.