Ionic 2 , Cant find app folder (mac) - macos

I am tried to install ionic 2 :
sudo npm install -g ionic#beta
ionic start mytest --v2 --ts
and then i check the ionic version (ionic -v ) its tell me that my
version is : 1.7.8
it seems that i have the older version of ionic
please help.

Did you by any chance installed Ionic one, after installing ionic 2? If so run:
sudo npm install -g ionic#beta
again and everything should start working.

Related

"ionic : command not found" on Mac after install ionic Cordova

I try to install ionic 4 on my iMac.
I use this : npm install -g ionic Cordova
when I use ionic command I have this error : " ionic : command not found "
At the end I have this : + ionic#5.2.7
+ cordova#9.0.0
and when I try to use some Cordova command it work.
From your question, I see you have installed node, cordova, ionic already to resolve error : " ionic : command not found"
Try this out:
1. check your:
npm root
check:
npm root -g
You should have something like:
"/usr/local"
If your result is different, then that is where your problem is coming from.
Change it using:
npm config set prefix /usr/local
Your can check your result with:
npm root -g
You should have something like
"/usr/local/lib/node_modules"
You can now re-install everything with "-g"
sudo npm install -g cordova
sudo npm install -g ionic
If you still have the previous installation, please remember to uninstall first be re-installation with:
sudo npm uninstall -g cordova
sudo npm uninstall -g ionic

Trying to install ionic globally error on MacbookPro

When launch the command npm install #ionic/cli-framework -g
I have a error 404
Anyone can help me?
thanks
There is no package called #ionic/cli-framework. It's not the valid CLI from the ionic team. The correct command is to run
npm install -g ionic
If you're facing permissions issues, you may need to run that with sudo
sudo npm install -g ionic
Ionic Docs
Try running sudo npm install -g ionic if your are running on a Mac or Linux machine.

Install Ionic Cordova Error

I am trying to install Ionic 2 on a OSx machine. I did install Node.js. When I run the following:
$ npm install -g ionic cordova
I get this error:
If anyone can assist, I would appreciate it.
UPDATE:
Downgraded Node to v6.9.1 and still get the same error:
UPDATE
As suggested below, I tried:
npm cache clean
But still get the same error:
UPDATE
If I try install a specific version, I get the following error:
sudo npm install -g ionic#2.0.0-beta.20 cordova
to install ionic in mac
you have to install nodejs .
to install ionic as per the official doc if you are using linux or mac you should use sudo command
try
sudo npm install -g ionic cordova
note
your npm version should be greater then 3.x
that version of node its the current so maybe its nos stable at all. I recommend to instal NVM (node version manager) from here this is like a "sand-box" where you have all node version you want and can switch between them.
You only need to run nvm install 5.11.0 and nvm will download that node version for you. Then to use a specific node version you need to run nvm use 5.11.0 and thats all.
I recommend to install 5.11.0 for example, its the node version that im using atm and its working fine with ionic2 RC3.
After downgrading your node.js clean npm cache.
npm cache clean
and try the installation again

How to install cordova version 1.5 on mac using npm command?

I am able to download cordova using the following command
sudo npm install -g cordova.
But it downloads the latest version i.e version 3.4 which is not compatible with my xcode version which is 3.2. So I want to download version 1.5 of cordova. How to download version 1.5 of cordova using the above command?
sudo npm install -g cordova#VERSION_NO
these are the available versions
["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.0.9","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.1.10","0.1.11","0.1.12","0.1.13","0.1.14","2.2.0","2.3.0","2.3.1","2.3.2","2.3.3","2.3.5","2.3.6","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","2.4.5","2.4.6","2.4.7","2.4.8","2.4.9","2.4.10","2.5.0","2.5.2","2.5.3","2.5.4","2.5.5","2.6.0","2.6.1","2.6.2","2.7.0-rc.1","2.7.1-rc.1","2.7.2","2.7.3","2.7.4","2.8.0","2.8.1","2.8.2","2.8.3","2.8.4","2.8.5","2.8.6","2.8.7","2.8.8","2.8.9","2.8.10","2.8.11","2.8.12","2.8.13","2.8.14","2.8.15","2.8.16","2.8.17","2.8.18","2.8.19","2.8.20","2.8.21","2.8.22","2.8.23","2.8.24","2.8.25","2.9.0","2.9.1","2.9.2","2.9.3","2.9.4","2.9.5","2.9.6","2.9.7","3.0.0-rc1","3.0.0-rc1-1","3.0.0-rc1-3","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.0.10","3.1.0-0.1.0","3.1.0-0.2.0","3.2.0-rc.1","3.2.0-0.1.0","3.2.0-0.2.0","3.2.0-0.3.0","3.2.0-0.4.0","3.3.0-rc.1","3.3.0-0.1.1","3.3.1-0.1.2","2.9.0-rc1","3.3.1-0.3.0","3.3.1-0.3.1","3.3.1-0.4.1","3.3.1-0.4.2","3.4.0-0.1.0","3.4.0-0.1.1","3.4.0-0.1.2","3.4.0-0.1.3"]
so if i had to install version 0.0.4
I would go with
sudo npm install -g cordova#0.0.4
sudo npm install phonegap#1.5.* -g

Command error running installed npm modules

Hi guys could you help me? i've installed the latest version of node.js and installed cordova and ionic framework the problem starts is when i'm trying to run the ionic command, the console throw me the following message:
MacBook-Pro-de-Diego:~ diegochavez$ ionic start myApp
-bash: ionic: command not found
So then i looked for the root of my npm modules
MacBook-Pro-de-Diego:~ diegochavez$ npm root
/Users/diegochavez/node_modules
if you guys know something to fix this? Thanks in advance
First check if ionic is installed at path like /usr/local/lib/node_modules/ionic/bin/ionic. If it is there, you need to check the npm default global path.
Run command npm config get prefix to check the default path, it should be /usr/local. If it is not /usr/local, run command npm config set prefix /usr/local to set it. And then install again. Also see this answer
I having issue while running - sudo npm install -g gulp ionic with below version of node installed
node -v v0.10.15
npm -v 1.3.5
Error went way after I update node to latest version v0.10.26
The error you are getting is because ionic was not installed successfully. Trying updating node and run command as mentioned sudo npm install -g gulp ionic
Check where your npm folder is located. If your npm folder is located in $Home..then type this:
export PATH="$HOME/npm/bin:$PATH"
You need to run sudo npm install -g ionic from the command line.

Resources