We have 2 jHipster 2.x in production and still under heavy dev ... And muist bootstrap a new one (so we go 3.0 !) : how can we manage both env (as i'll need to continue using the entity generator and cloudfoundry deployement script for our 2.x projects) ?
I think it's a major issue for the future as the project growth (and u all must be thanks for the job done so far !) : we must be able to maintain our old project (i'm ok to make the update effort, but not for a 3.0 release, as it's not really production ready ... But i can't even discover the new jhipster, having the risk to loose the hability to work on my oldest projects !)
If i update my jHipster module in 3.0 : i will loose 2.0 project script (mainly entity generator) !
2.27 and 3.0
.yo-rc.json file generated in the root folderN.C.
How about having an abstract (lot of work) inside jhipster call to go through version and a param to ask for a specific version ? yo jhipster:.... -version=xx
OR
when changing major ... Create new keywork and keeping old one (yo jhipster3:...., yo:jhipster2:....) ?
OR
I must go myself for VM or even better Docker dev env :D ?
2 "easy" solutions:
Now here is how I work, I find it very good but I'm not sure it's good for everyone else:
@lourai its really not within our control as its an npm thing. and there is nothing much we can do except what Julien said above as your suggestion are not practical (we are not a company making money with this you know to do that kind of maintenance)
One thing we did and hoped to work was we had yo and generator-jhipster in the dependency of the generated projects package json and i theory node should use the local version first before using a global so you can try the below and let us know if it works
-gnpm i on it-gnpm i on ityo jhipster again and see what version it shows ideally it should use the local jhipster instancebut this means all your new projects will use JH3.0 only existing 2.x might work
plz try and let us know
I want to add to the above suggestions an alternative: use a node environment manager (e.g. nvm on Linux, nodist on Windows) to install 2 different versions of node: one for JH 3 and one for JH 2.
@deepu105 : your 5th step should upgrade the project, so don't yo jhipster on old project.
But the yo jhipster:<module> should use the module inside node_modules/generator-jhipster, which means the old version
So for me, there is no issue here
OK so I was just playing around and this actually works as expected, so you of course can generate entities on a generator based on what version you used to create it
By default NPM will use the local instance of the generator in the node_modules folder
-gnpm i on it-gnpm i on ityo jhipster again and see what version it shows ideally it should use the local jhipster instance, do not proceed and just terminate the commandyo jhipster:entity to create more entitiesI Got the same issue. I have solved it by doing following, little updation in above process.
And above process worked successfully for me.
Can you paste exact command to download jhipster 2.x version ?
try: npm install -g [email protected]
replace X.Y.Z by the version you want
Most helpful comment
try:
npm install -g [email protected]replace
X.Y.Zby the version you want