#ionic/cli not installed after installing - ionic-framework

I tried to update my ionic cli by removing the ionic package and replacing it with #ionic/cli, but now ionic is no longer a recognized command. Here's what I've tried so far:
Node version - v13.13.0
npm version - 6.13.4
exporting prefix to $PATH,
prefix - /usr/local
$path - /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:...
npm root -g returns /usr/local/lib/node_modules
brew doctor, brew upgrade node,
npm update -g verbose, npm cache clean --force
Every time I run npm i -g ionic or npm i -g #ionic/cli the installation is successful, but I cannot use ionic commands. Any idea on why this is?

Related

Unable to install ionic -g

npm ERR! code E404
npm ERR! 404 Not Found: #ionic/cli-framework#0.1.3
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-05-10T07_52_51_175Z-debug.log
That version of Ionic doesn't exist. Try installing from the versions listed here NPM's Websites
Then npm install -g ionic#3.20.0 for the latest version of ionic
Do you already have an existing version of Ionic?
Try updating your current version or:
sudo npm uninstall -g ionic && sudo npm install ionic
Or:
npm install -g #ionic/cli-framework#3.20.0
As suggested by the other user.
my problem is solved.i uninstall nodejs and remove .npmrc file in C:\Users{user} and then,i reinstall nodejs.This errors is OK.

Ionic installation on macOs

I am trying to install ionic and every time I try to install it says:
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
and I can't even check ionic -v to check version as it is not installed.
I can check npm version as it is installed correctly.
➜ ~ node -v
v8.7.0
➜ ~ npm -v
5.4.2
➜ ~ npm install -g cordova ionic
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
/Users/bilaltariq/.npm-packages/bin/cordova -> /Users/bilaltariq/.npm-packages/lib/node_modules/cordova/bin/cordova
/Users/bilaltariq/.npm-packages/bin/ionic -> /Users/bilaltariq/.npm-packages/lib/node_modules/ionic/bin/ionic
+ cordova#7.1.0
+ ionic#3.13.2
updated 2 packages in 27.258s
Had the same problem. The fix is to install ionic CLI globally:
As the developer user execute the following from your ionic project root directory:
npm uninstall ionic
then as user "root" execute the following:
npm i -g ionic#latest
after that, you should be able to use the new ionic CLI version 4.12.0

ionic1 error: TypeError: Cannot read property 'emit' of undefined

i am making a application using ionic1 and angularjs1.
Today, when i execute ionic serve command in terminal. then i got following error.
js#js:peoject$ ionic serve
[INFO] Starting server: --port=8100 --p=8100 --livereload-port=35729 --r=35729 --address=0.0.0.0 - Ctrl+C to cancel
TypeError: Cannot read property 'emit' of undefined
from last 2-3 months there was no any issue but today suddenly i faced with this issue.
My ionic version is 3.3.0
Is there anything update on ionic or what else? i dont understand.
I tried a lot and the solutions is very simple.
My previous version of ionic was 2.2.0
So, i downgrade the ionic version.
First, remove the ionic, then reinstall with your old version.
harish#harish: sudo npm uninstall -g ionic
harish#harish: sudo npm install -g ionic#2.2.0
or
harish#harish: sudo npm uninstall -g ionic
harish#harish: sudo npm install -g ionic#2.2.3
or
harish#harish: sudo npm uninstall -g ionic
harish#harish: sudo npm install -g ionic#2.3.0
Whatever the version is, just uninstall your latest ionic and install your old version.
Then the issue is solved.
I had the same error downgrade your ionic version.
sudo npm install -g ionic#2.2.3
This worked for me.
reinstall the ionic
npm uninstall -g cordova ionic
npm install -g cordova ionic
this solved my same problem

Error installing ionic on Mac OS

I'm trying to install the ionic on but it has error.
I've checked other articles here, but their solution does not help.
I am using the command:
sudo npm install -g ionic cordova
I am with:
$ npm --version
3.10.9
$ node --version
v6.9.2
And the error:
UPDATE:
There are mentions of this on the ionic forums if you do a search there
What I would so is completely remove ionic and Cordova by running
npm uninstall -g cordova
And
npm uninstall -g ionic
Then I would start the process again with
npm install -g cordova ionic
Just note that this docs say to install Cordova and then Ionic whereas it looks like you did it the other way around which could have caused some issues.

Update IONIC not working (windows)

I want to update ionic-cli to 1.7.1 i run this command
npm uninstall -g ionic
npm install -g ionic
and this
npm update -g ionic
but it won't update , when i run
ionic
it shows the version 1.6.5
what's wrong ? and how to fix it ?
i'm on Windows 10
inject this line of code in your bower.json file and run bower update
"ionic": "driftyco/ionic-bower#1.1.0",