-bash: ionic: command not found
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior:
Just heard you support React and attempted the installation to start learning.
So all I did was: npm install -g ionic@latest
It did install with a warning as below:
npm WARN deprecated superagent@4.1.0: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header). This notice will go away with v5.0.2+ once it is released.
/usr/local/Cellar/node/11.7.0/bin/ionic -> /usr/local/Cellar/node/11.7.0/lib/node_modules/ionic/bin/ionic
+ ionic@5.4.5
added 235 packages from 145 contributors in 27.975s
But then when I run:
ionic start my-app
It returns: -bash: ionic: command not found
Expected behavior:
Well, it should create the app in the designated directory. Steps to reproduce:
Related code:
Other information:
Ionic info:
Node version : v10.16.3
npm version: 6.9.0
unable to run any ionic
command
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
bash: ionic: command not found (Not able to install any version)
This command show globally available modules in npm npm list -g --depth=0. if you cant see ionic cordova in this list it means...
Read more >Ionic seemed to install but is reported as "command not found"
I installed via “sudo npm install -g cordova ionic” on my Mac 10.9.4 but when running “ionic” it reports “-bash: ionic: command not...
Read more >bash: ionic: command not found (Not able to install any version)
I am trying to install ionic globally. sudo npm install -g cordova ionic AND npm install ionic@3.2.0 --save. I tried both the commend...
Read more >Module 1: Install Ionic
Open a terminal window (Mac) or a command window (Windows), and install Cordova and Ionic: ... 404 Not Found - GET https://registry.npmjs.org/.
Read more >'ionic' is not recognized as an internal or external command
Resolve 'ionic' is not recognized command error ... First, you need to check whether npm path “;C:\Users\{username}\AppData\Roaming\npm” was added ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
okay, the problem is not with ionic. Here’s a fix I came up with. First clear the cache from npm. npm cache clean --force after that run npm install -g ionic if you’re on mac include sudo.
@BernardA This is an issue with your npm environment. Run the following to see where npm will put runnable scripts:
Then, ensure that the outputted directory exists in
PATH
environment variable:If it isn’t, you have to add it using
.bashrc
file.