CLI 2.0.0-beta.20 won't use generators

Hi everyone,
when I try to use generator, Ionic CLI tells me that “Generators are only available for Ionic 2 projects”, though it is Ionic 2 project. See screenshot.
Can anyone tell me what happens?

Can you update your CLI please.

The latest version, beta.22 fixes this.

What is repository and branch of ionic 2 CLI?

In this branch, the current version is 19
https://github.com/driftyco/ionic-cli/blob/v2-beta/package.json

Thanks

https://github.com/driftyco/ionic-cli/blob/v2-merge-final/package.json

Close :grin:

This issue seems to have returned:

jwright$ ionic generate page welcome

Generators are only available for Ionic 2 projects (CLI v2.0.0-beta.25)

Your system information:

Cordova CLI: 5.0.0
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v0.12.4
Xcode version: Xcode 7.3 Build version 7D175

I’m not able to reproduce the problem. Most probably your project is missing a ionic.config.json or it’s not configured properly - create one using the following template. If you’re using TypeScript, you should also add "typescript": true in there.

PS: @jmowright Also I noticed that you’re using pretty old version of Node - I’ll highly recommend you to upgrade Node to the latest LTS or the latest v5-release (however not to Node v6) to avoid compatibility problems with packages that might not support v0.12 anymore.

1 Like

Adding “typescript”: true fixed it. Not sure why the CLI didn’t install that when I specified it when I started the application. I used the sidenav template.

I’m also not sure, why it’s missing, but I made a PR that might fix it.