0

I installed JHipster generator using Yarn:

yarn global add generator-jhipster

Now I have two concerns:

1- What if I change my mind and want to generate new JHipster projects managed by "npm" when I use the yeoman command?

I mean:

yo jhipster

Should I install JHipster generator again, using "npm" this time?

I mean:

npm install -g generator-jhipster

2-How should I switch from "yarn" to "npm" on a project which is already using "yarn" as the dependency/package manager?

tk421
  • 5,775
  • 6
  • 23
  • 34
AliReza
  • 706
  • 2
  • 10
  • 30

1 Answers1

5
  1. Uninstall from yarn first, then install using npm and no need to use yo jhipster, just use jhipster
  2. Edit .yo-rc.json file and change value of clientPackageManager property to "npm", delete node_modules and yarn.lock, re-generate with jhipster --with-entities
Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49
  • It worked for me. This is reported as a "manual update" task, for a jhipster project, as stated in this page: https://www.jhipster.tech/upgrading-an-application/ Maybe it could be useful for other changes as welll. – funder7 Apr 03 '20 at 16:11