"ionic serve --lab" gives an error for ionic2 - ionic-framework

I used to create Ionic apps by
ionic start AppName blank --v2 and run with ionic serve --lab.
But now it gives:
"Error: ENOENT: no such file or directory"
What should I do?

I was able to run ionic lab as before after updating ionic. Must be due to a new release.
I just ran below in the terminal.
$ npm uninstall -g ionic
$ npm install -g ionic

Related

Ionic 6: unknown option '--npm-client'

I have a project with ionic 6 and capacitor, when I run ionic serve it work like a charm and I can see the project in my browser, but then when I run ionic capacitor build android I got this error:
error: unknown option '--npm-client'
[ERROR] An error occurred while running subprocess capacitor.
I have tried to use this solution, but it didn't work.
It says to:
npm uninstall -g ionic
npm uninstall -g #ionic/cli
npm install -g #ionic/cli
but I still get the same error. Someone already got the same error before?
Thanks!
npm uninstall -g ionic
npm install -g #ionic/cli#latest
Try this
I fix it updating to the last version with this, because the upgrade commands didn't work for me.
cd /tmp
wget https://registry.npmjs.org/#ionic/cli/-/cli-6.19.0.tgz
sudo npm -g install cli-6.19.0.tgz
I had the same issue and had to upgrade from node 14 to node 16.15 to make it work.
This issue is caused by older version of ionic-cli, you should upgrade the CLI version.

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.

npm uninstall not working for ionic

I have ionic cli installed in my PC
Windows 10 OS
as per new ionic release the beta has to be uninstalled and new ionic need to be installed.
https://github.com/driftyco/ionic/releases
But when I try to uninstall ionic using npm
npm uninstall -g ionic
also
npm uninstall -g ionic#2.0.0-beta.25
after uninstall
I did
npm list -g
the ionic was not shown in the output.
But upon everything when I type
ionic -v or ionic --version
I still see ionic 2.0.0-beta25 in my console.
Tried this multiple times and also there was a solution in forum by one who says there might be old entry. But I am not sure from where this is getting picked.
Is there a way to find out where npm is picking this or where it is installed?
I cant find it under my npm directory.
C:\Users\Bala\AppData\Roaming\npm\node_modules
Output of Where ionic
C:\>where ionic
C:\Program Files (x86)\nodejs\ionic
C:\Program Files (x86)\nodejs\ionic.cmd

Cannot start an ionic 2 blank project

I am trying to start an ionic 2 blank project but it always create an ionic 1 project. That's what I do:
npm install -g ionic#beta
ionic start Test --v2
but when I open the project it's still version 1. I have tried to remove ionic completely with:
sudo npm uninstall -g ionic
sudo npm uninstall -g ionic#beta
sudo npm uninstall -g cordova
but after that when I type "ionic" it's showing that I have ionic v1.7.14. (did it several times and there aren't any errors).
for a blank project you can give the following command
ionic start ProjectName blank --v2
for tabs template you can give
ionic start ProjectName tabs --v2
--v2 is for ionic 2 project
you can also include --ts for getting the typescript project
ionic start ProjectName blank --v2 --ts
As of now The --v1 and --v2 flags have been removed.
ionic 1 blank project
ionic start myapp blank --type ionic1
ionic 2 blank project
ionic start myApp blank
ionic 3 blank project
ionic start myapp blank --type ionic-angular
Actually, I found what was wrong. In the documentation it's written:
ionic start Example --v2
where it should be (at least in my case)
ionic start Example -v2
Best tutorial follow the below link
First of install latest Node 6 LTS and NPM 3+ in window machinne.
/>npm install -g ionic#latest
/>ionic start mySampleApp
/>cd ./mySampleApp
/>npm install -g cordova
For android
/>ionic cordova platform add android
For ios
/>ionic cordova platform add ios
/>ionic cordova run android
That’s all if any error or problem comes please comment below.
http://infiniteneed.com/setup-and-start-ionic-mobile-app-from-scratch-in-window-machine/
I believe you will also need ionic#beta - currently 2.0.19
npm install -g ionic#beta
The great thing is, you can still use this CLI to install/control/build Ionic#1.x apps - in fact, there's little difference to the user since Ionic v1 is still the default for ionic#beta.

Unable to add platform ionic platform add Android

Getting below error when running command ionic platform add android
Error: ENOENT, no such file or directory _____\.cordova\lib\android\cordova\3.5.1\VERSION'
I am providing step by step installation of ionic along with cordova.
Have a look it may help you :
First install node to get started using this link
open cmd to install cordova using following command
$ sudo npm install -g cordova
(Drop sudo from the above command if running on Windows)
install ionic using command
$ sudo npm install -g ionic
Create project after selecting directory where project file will be stored,
through CMD,by following command
ionic start {project name} {template type} e.g
ionic start todo blank
Once your project is created go to your newly created project: cd .\new project. for e.g.
D:\Projects>cd.\todo
Now you have to add both android and ios to your project in order to test the build so you need to follow below commands
ionic cordova platform add android
ionic cordova platform add ios
I think in your case you are missing step 5.