Jhipster 应用程序生成失败
Posted
技术标签:
【中文标题】Jhipster 应用程序生成失败【英文标题】:Jhipster application generation is failing 【发布时间】:2017-10-07 08:56:25 【问题描述】:我正在使用 YARN v0.23.4 和 generator-jhipster v4.4.1 来生成单体应用程序。但它在安装纱线时失败了。 我不明白为什么会这样。请帮我弄清楚它的解决方案。
错误:
> 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
【问题讨论】:
【参考方案1】:我的问题得到了解决方案。
问题出在我的.npmrc
文件上。它包含以下文本:
registry=https://registry.npmjs.org
https://registry.yarnpkg.com=
要修复上述错误,删除 https://registry.yarnpkg.com
并运行 yarn install
。
【讨论】:
以上是关于Jhipster 应用程序生成失败的主要内容,如果未能解决你的问题,请参考以下文章
具有 OpenIDConnect 身份验证的 JHipster
JHipster:测试微服务时收到 401 Unauthorized
JHipster:CORS 在表单登录时失败(实际请求,不是飞行前)
jhipster - gyp动词`which`失败错误:未找到:python2