无法安装jhipster-generator

问题描述 投票:1回答:2

我正在尝试按照jhipster网站上的安装指南进行操作,但我甚至无法运行第一条指令,它会让ETIMEDOUT对我保持警觉。我现在运行它大约30次并且它一直失败(有时在不同的网址)

apixandru@DESKTOP-BAA6A1B MINGW64 ~
$ yarn global add generator-jhipster
yarn global v0.20.3
[1/4] Resolving packages...
warning generator-jhipster > yo > fullname > [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
error An unexpected error occurred: "https://registry.yarnpkg.com/lodash: connect ETIMEDOUT 104.16.59.173:443".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\apixandru\\AppData\\Local\\Yarn\\config\\global\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

apixandru@DESKTOP-BAA6A1B MINGW64 ~
$ yarn global add generator-jhipster
yarn global v0.20.3
[1/4] Resolving packages...
warning generator-jhipster > yo > fullname > [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
error An unexpected error occurred: "https://registry.yarnpkg.com/js-yaml: connect ETIMEDOUT 104.16.59.173:443".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\apixandru\\AppData\\Local\\Yarn\\config\\global\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

apixandru@DESKTOP-BAA6A1B MINGW64 ~
$ yarn global add generator-jhipster
yarn global v0.20.3
[1/4] Resolving packages...
warning generator-jhipster > yo > fullname > [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
error An unexpected error occurred: "https://registry.yarnpkg.com/html-wiring: connect ETIMEDOUT 104.16.62.173:443".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\apixandru\\AppData\\Local\\Yarn\\config\\global\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

看起来它开始发出数百个获取请求,最终服务器拒绝回复我。我不明白为什么这些响应没有在本地缓存,所以每次重试时我都不必执行数百个请求

https://paste.ubuntu.com/24048741/

node.js jhipster yarnpkg
2个回答
0
投票

我遇到了同样的错误,在我的情况下它只是在尝试从Docker容器中使用yarn add时。

重启Docker解决了我的问题。


0
投票

尝试正确设置注册表,如:

npm config set registry "https://registry.npmjs.org"
© www.soinside.com 2019 - 2024. All rights reserved.