question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

-bash: ionic: command not found

See original GitHub issue

Bug 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sanjay-devappsyscommented, Jan 3, 2020

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.

2reactions
imhoffdcommented, Nov 5, 2019

@BernardA This is an issue with your npm environment. Run the following to see where npm will put runnable scripts:

npm bin -g

Then, ensure that the outputted directory exists in PATH environment variable:

echo $PATH

If it isn’t, you have to add it using .bashrc file.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found