2017-01-23 32 views
0

我有一個在hipster 3.6.1上運行的現有項目,我想將其升級到3.12.2。我遵循jhipster網站中描述的升級過程,但生成的hipster_upgrade分支仍然提到舊版本的子生成器。如何升級jhipster子發電機?

強制更新使用NPM

在運行下面的命令npm install -g generator-jhipster,它讓我看到下面

npm WARN deprecated [email protected]: use uuid module instead npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm /usr/local/lib └── [email protected]

然後我跑yo jhipster --force --with-entities,這是輸出:

Welcome to the JHipster Generator v3.6.1 Documentation for creating an application: https://jhipster.github.io/creating-an-app/ Application files will be generated in folder: /Users/bso/Projects/portal ______________________________________________________________________________ JHipster update available: 3.12.2 (current: 3.6.1) Run npm install -g generator-jhipster to update. ______________________________________________________________________________

重新安裝jhipster發電機

npm i generator-jhipster的情況下,jhipster發電機更新爲3.12.2,但重新處理升級的時候,它回來3.6.1。

任何線索爲什麼發生這種情況?

+0

更新它的應用程序,使用-g開關,NPM安裝-g發電機jhipster –

+0

我做了這樣的說法,它沒有工作...我怎樣才能完全刪除版本3.6.1? –

+1

您是否嘗試過jhipster作爲本地生成器?喜歡你的本地發電機?如果你已經嘗試過這個npm鏈接生成器 - jhipster,那麼從本地目錄中取消鏈接或刪除生成器 –

回答

0

@Jinna添加的最新評論正在解決此問題。我發現在我的系統中的兩個不同位置的兩個jhipster發電機,所以這是問題...

步驟,使其工作: 1 NPM鏈接generatir-jhipster 2-刪除發電機在〜/。 node_modules,應該保留的那個是/ usr/loca/

0

之所以它很難使用3.6.1以外的其他版本,是因爲jhipster會將自己保存到您的節點模塊中,以確保您始終能夠工作使用您生成的生成器版本,以避免錯誤。

查找到JHipster application upgrade guide學習如何使用升級全球

yo jhipster:upgrade