Marcelo C.
Marcelo C.

Reputation: 118

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)?

Upvotes: 1

Views: 3165

Answers (1)

pedrommuller
pedrommuller

Reputation: 16066

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 [email protected]

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.

Upvotes: 5

Related Questions