Jhipster 应用程序生成失败

Jhipster application generation is failing

我正在使用 YARN v0.23.4 和 generator-jhipster v4.4.1 生成单体应用程序。但它在步骤 yarn 安装时失败了。 我不明白为什么会这样。请帮我找出解决办法。

错误:

> yarn install v0.23.4 info No lockfile found. [1/4] Resolving
> packages... warning browser-sync > localtunnel > request >
> node-uuid@1.4.8: Use uuid module instead warning generator-jhipster >
> yo > fullname > npmconf@2.1.2: this package has been reintegrated into
> npm and is now out of date with respect to npm [2/4] Fetching
> packages... warning fsevents@1.1.1: The platform "win32" is
> incompatible with this module. info "fsevents@1.1.1" is an optional
> dependency and failed compatibility check. Excluding it from
> installation. [3/4] Linking dependencies... warning
> "angular2-cookie@1.2.6" has incorrect peer dependency
> "@angular/common@^2.0.0". warning "angular2-cookie@1.2.6" has
> incorrect peer dependency "@angular/core@^2.0.0". warning
> "ng2-translate@4.2.0" has incorrect peer dependency
> "@angular/core@^2.0.0". warning "ng2-translate@4.2.0" has incorrect
> peer dependency "@angular/http@^2.0.0". [4/4] Building fresh
> packages... success Saved lockfile. $ webdriver-manager update && node
> node_modules/phantomjs-prebuilt/install.js && yarn run webpack:build
> [12:05:25] I/file_manager - creating folder
> D:\Jhipster\testApp\node_modules\webdriver-manager\selenium [12:05:49]
> I/update - chromedriver: unzipping chromedriver_2.29.zip [12:06:25]
> I/update - geckodriver: unzipping geckodriver-v0.16.1.zip Found
> PhantomJS at
> D:\Jhipster\testApp\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
> ...verifying PhantomJS is previously installed at
> D:\Jhipster\testApp\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
> yarn run v0.23.4 $ yarn run ngc && webpack --config
> webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js
> yarn run v0.23.4 error An unexpected error occurred: "Cannot create
> property '-registry-yarnpkg-com' on string
> '{\"-registry-yarnpkg-com\":\"\"}'". info If you think this is a bug,
> please open a bug report with the information provided in
> "D:\Jhipster\testApp\yarn-error.log". info Visit
> https://yarnpkg.com/en/docs/cli/run for documentation about this
> command. error Command failed with exit code 1. info Visit
> command. WARNING! Install of dependencies failed! To install your
> dependencies manually, run: yarn install

我找到了问题的解决方案。

问题出在我的 .npmrc 文件上。它包含以下文本:

registry=https://registry.npmjs.org
https://registry.yarnpkg.com=

要修复上述错误,删除 https://registry.yarnpkg.com 和 运行 yarn install