Search code examples
angularjsnpmyeoman-generator

NPM - How to tell version of generator used to create an app


I used the generator angular-fullstack a few months ago to start an app, built almost half of it and had to put it on hold. App was kept in github.

Recently changed to another machine, installed my dev environment and decided to install angular-fullstack again, when I checked out my code I found out (as expected) that the version of angular-fullstack was higher than the one used to create my app.

Questions:

Is there a way for me to tell the version of the generator used to create my app? If so, is there a way to install the exact same version to keep working such app and not have to migrate to the new file structure (not yet at least)?


Solution

  • you can get a list of version from a specific package using npm info in your case is

    npm info generator-angular-fullstack
    

    to install a specific package version just do a

    npm install <package>@<version>
    

    that means

    npm info generator-angular-fullstack@2.0.13
    

    for example.

    look at the git repo for the version 1.x at look at that file structure if that matches the one in your project then use the 1.4.3 version if not use the latest 2.x version.