Search code examples
angularionic2

ionic2 - The generate command is only available for projects that use ionic-angular >= 3.0.0


When I generate a project page, error coming, but still can generate this page.

enter image description here


Solution

  • It clearly says on the doc. If you need to use latest generators then you must update the project to ionic-angular >= 3.0.0. Latest generators have tight coupling with the ionic-angular module.

    Note: If you don't like to update latest then just create your components manually. No restrictions for that :)

    Generate pipes, components, pages, directives, providers, and tabs (ionic-angular >= 3.0.0)

    You can read more about it on the doc.

    Update

    If you need to update then you have to do this changes on your package.json file.

    See also this video upgrade guide. This is for Ionic 3, but the concept is the same.

    Release notes are here.