我使用brew来安装jhipster,当前版本是4.14.4。我已经生成了一个4.14.3版本的项目。我可以将现有项目更新到4.14.4并包含我在4.14.3上生成的代码。这是详细信息:
brew info jhipster
jhipster: stable 4.14.4 (bottled)
Generate, develop and deploy Spring Boot + Angular applications
https://jhipster.github.io/
/usr/local/Cellar/jhipster/4.14.1 (9,066 files, 31.7MB)
Poured from bottle on 2018-03-25 at 10:49:51
/usr/local/Cellar/jhipster/4.14.3 (9,076 files, 31.9MB)
Poured from bottle on 2018-04-18 at 22:01:45
/usr/local/Cellar/jhipster/4.14.4 (9,075 files, 31.9MB) *
Poured from bottle on 2018-05-17 at 23:04:12
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jhipster.rb
==> Dependencies
Required: node ✔, yarn ✔
==> Requirements
Required: java >= 1.8 ✔
和.yo-rc.json文件是:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.sgcc.syn",
"nativeLanguage": "zh-cn"
},
"jhipsterVersion": "4.14.3",
"baseName": "pmt",
"packageName": "com.sgcc.syn",
"packageFolder": "com/sgcc/syn",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": "kafka",
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "4166646bfabd18ccec24a2d10d5b15229ba3fae4",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "zh-cn",
"languages": [
"zh-cn"
]
}
}
我改变了" jhipsterVersion":" 4.14.3"到4.14.4并更新项目:
jhipster upgrade
Using JHipster version installed globally
Executing jhipster:upgrade
Options:
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
Looking for latest generator-jhipster version...
yarn info v1.6.0
4.14.4
Done in 0.29s.
events.js:182
throw er; // Unhandled 'error' event
^
Error: ERROR! No update available. Application has already been generated with latest version.
at Environment.error (/usr/local/Cellar/jhipster/4.14.4/libexec/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:157:40)
at module.exports.error (/usr/local/Cellar/jhipster/4.14.4/libexec/lib/node_modules/generator-jhipster/generators/generator-base.js:2064:18)
at shelljs.exec (/usr/local/Cellar/jhipster/4.14.4/libexec/lib/node_modules/generator-jhipster/generators/upgrade/index.js:163:30)
at /usr/local/Cellar/jhipster/4.14.4/libexec/lib/node_modules/generator-jhipster/node_modules/shelljs/src/exec.js:199:9
at ChildProcess.exithandler (child_process.js:262:7)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
似乎我应该删除一些目录,我该如何解决它
答案 0 :(得分:1)
rm -rf node_modules
rm yarn.lock
jhipster
overrite package.json //choose yes
the remainder conflict file i choose y or n on my demaind
结果:
jhipster --version
Using JHipster version installed locally in current project's node_modules
4.14.4