# When "ionic start" : Invalid command (CLI v2.2.0)

**URL:** <https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385>\
**Category:** ionic-v3\
**Created:** [May 8, 2017, 1:33pm UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385 "2017-05-08T13:33:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youtch](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/youtch/32/132853_2.png) [@Youtch](https://forum.ionicframework.com/u/Youtch)\
**Post date:** [May 8, 2017, 1:33pm UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385/1 "2017-05-08T13:33:17Z")

</div>

**1)**  
I search to update Ionic at a specific version, so I used it :

```auto
npm uninstall -g ionic
npm install -g ionic@2.2.0
npm install -g cordova 

```

After it I ran :

```auto
ionic start projet_vide_blank blank --v2

```

… and I got a laconic error (I didn’t think to add --verbose parameter) :

> Invalid command (CLI v2.2.0)

> Your system information:

> ordova CLI: 7.0.0  
> Ionic CLI Version: 2.2.0  
> Ionic App Lib Version: 2.2.0  
> ios-deploy version: Not installed  
> ios-sim version: Not installed  
> OS: Windows 8.1  
> Node Version: v6.10.3  
> Xcode version: Not installed

**2)** So I try to re-install manualy my old installed ionic and cordova (2.0Beta11), I removed all folders targetted by ionic, I deleted all of these folders : **ionic, ionic-native, typing** in **AppData/Roaming/node\_modules**.  
And I install as previously _ionic_ and _cordova_

Next I ran it :

```auto
ionic start projet_vide_blank blank --v2 --verbose

```

…And I got it but I don’t know why :

```auto
Task: title=start, name=start, summary=Starts a new Ionic project in the specified PATH, [options]=any flags for the command, <PATH>=directory for the
 new project, [template]=Starter templates can either come from a named template, (ex: tabs, sidemenu, blank), a Github repo, a Codepen url, or a local directory.
Codepen url, ex: http://codepen.io/ionic/pen/odqCz
Defaults to Ionic "tabs" starter template, --appname|-a=Human readable name for the app (Use quotes around the name), --id|-i=Package name for <widget
 id> config, ex: com.mycompany.myapp, title=Skip npm package installation, boolean=true, title=Create a basic structure without Cordova requirements,
boolean=true, title=Setup the project to use Sass CSS precompiling, boolean=true, title=List starter templates available, boolean=true, --io-app-id=Th
e Ionic.io app ID to use, --template|-t=Project starter template, boolean=true, title=Start a Ionic v2 project, --zip-file|-z=URL to download zipfile
for starter template, isProjectTask=false, run=function run(ionic, argv) {
  if (argv.list || argv.l) {
    return templateUtils.listTemplates();
  }

  if (argv._.length < 2 && StartWizard) {
    return StartWizard.start();
  } else {
    return appLibUtils.fail('Invalid command', 'start');
  }

  if (argv._[1] === '.') {
    return log.error(chalk.red('Please name your Ionic project something me
aningful other than \'.\''));
  }

  // Ensure that the folder name provided is a String
  // ie 5 becomes '5' AND '5' stays as '5'
  argv._[1] = argv._[1].toString();

  var promptPromise;
  var options = appLibUtils.preprocessCliOptions(argv);
  var startingApp = true;

  // Grab the app's relative directory name
  if (fs.existsSync(options.targetPath)) {
    promptPromise = Start.promptForOverwrite(options.targetPath);
  } else {
    promptPromise = Q(true);
  }

  return promptPromise
  .then(function(promptToContinue) {
    if (!promptToContinue) {
      startingApp = false;
      log.info('\nIonic start cancelled by user.');
      return;
    }
    return Start.startApp(options);
  })
  .then(function() {
    if (startingApp) {
      return Start.printQuickHelp(options);
    }
  })
  .then(function() {
    if (startingApp) {
      return Start.promptLogin(options);
    }
  })
  .then(function() {
    if (options.v2 && startingApp) {
      //log.info('\nNew to Ionic? Get started here: http://ionicframework.com/getting-started\n');
    }
  })
  .catch(function(error) {
    log.error(error);
    throw error;
  });
}
Utils.fail Invalid command start
Utils.fail stack undefined
Utils.errorHandler is set, calling that now
Cli.appLibUtils.errorHandler msg Invalid command string

Invalid command (CLI v2.2.0)

Your system information:

 ordova CLI: 7.0.0
Ionic CLI Version: 2.2.0
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.10.3
Xcode version: Not installed

```

1. I thought this error could be caused by a too old version of Node (it was v4.5.0). So I update this one to v6.10.3.

After this last trying the CLI is returning the same error !  
Could it be a npm error or ionic CLI error ? Should I reinstall completly npm or others libraries  
?

Please help me I’m tired !

---

<div class="post-metadata">

**Author:** ![luukschoen](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/luukschoen/32/98585_2.png) [@luukschoen](https://forum.ionicframework.com/u/luukschoen)\
**Post date:** [May 8, 2017, 2:20pm UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385/2 "2017-05-08T14:20:37Z")

</div>

> [@Youtch](#):
>
> npm install -g ionic@2.2.0

What exactly are you trying to get to a specific version? The ionic framework should be altered inside your package.json (i.e. ionic-angular package). What you did was installing a specific version of the Ionic CLI (i.e. 2.2.0) which definitely worked, considering the fact ionic info gives you CLI version 2.2.0 .

To what version are you trying to downgrade and what’s the main purpose of doing that?

---

<div class="post-metadata">

**Author:** ![Youtch](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/youtch/32/132853_2.png) [@Youtch](https://forum.ionicframework.com/u/Youtch)\
**Post date:** [May 8, 2017, 5:56pm UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385/3 "2017-05-08T17:56:10Z")

</div>

I wish I was clearer, because I want to upgrade from 2.0Beta11 to 2.2.0. Because I wish I could test v2.2.0, because 3.0 release don’t seem to be stable : I can see a lot of RC released with :  
`npm info ionic`.  
I search to resolve the error message that I don’t understand, when I create a new project, I get this error, send by what script engine, is it npm ? gulp ? other ?  
I’m sure of it : error comes where **AppData/Roaming/node\_modules/ionic.cmd** file is processed , triggered by the CLI command  
`ionic start projet_vide_blank blank --v2`.

It would be smarter to get a simple way to resolve it, rather than I re-install npm, ionic, cordova, isn’t it ?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 8, 2017, 8:03pm UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385/4 "2017-05-08T20:03:52Z")

</div>

2.2.3 is the latest stable CLI. Use that.

---

<div class="post-metadata">

**Author:** ![Youtch](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/youtch/32/132853_2.png) [@Youtch](https://forum.ionicframework.com/u/Youtch)\
**Post date:** [May 9, 2017, 8:10am UTC](https://forum.ionicframework.com/t/when-ionic-start-invalid-command-cli-v2-2-0/89385/5 "2017-05-09T08:10:19Z")

</div>

@rapropos  
Thank you ! Launching these two tasks are making a project starting work correctly ! I don’t know why…

```auto
npm uninstall -g ionic
npm install -g ionic@2.2.3

```
