我正在尝试在空文件夹中生成新应用。
$ jhipster
Using JHipster version installed globally
Running default command
Executing jhipster:app
Options:
??? ??? ??? ????????? ???????? ??????? ????????? ????????? ????????
??? ??? ??? ????????? ????????? ???????? ????????? ????????? ?????????
??? ????????? ??? ????????? ??????? ??? ??????? ?????????
??? ??? ????????? ??? ???????? ??????? ??? ??????? ????????
????????? ??? ??? ????????? ??? ???????? ??? ????????? ??? ????
??????? ??? ??? ????????? ??? ??????? ??? ????????? ??? ???
https://www.jhipster.tech
Welcome to JHipster v5.0.1
Application files will be generated in folder: /home/eclipse-workspace/jhtest
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
______________________________________________________________________________
JHipster update available: 5.1.0 (current: 5.0.1)
Run yarn global upgrade generator-jhipster to update.
所以我取消了此尝试,
$ yarn global upgrade generator-jhipster
yarn global v1.7.0
error Outdated lockfile. Please run `yarn install` and try again.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
然后:
$ yarn install
yarn install v1.7.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.06s.
它创建了node_modules文件夹和yarn.lock文件,但是
$ yarn global upgrade generator-jhipster
生成错误如上所述的过期的锁文件。 我错过了什么?
答案 0 :(得分:3)
当您混合使用NPM和Yarn全局软件包时,会发生这种情况。
要解决此问题,请同时从npm和yarn上移除
:npm uninstall -g generator-jhipster
yarn global remove generator-jhipster
然后与另一个安装:
yarn global add generator-jhipster