无法安装jhipster-generator

时间:2017-02-22 20:31:21

标签: node.js jhipster yarnpkg

我正在尝试按照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 > npmconf@2.1.2: 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 > npmconf@2.1.2: 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 > npmconf@2.1.2: 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/

2 个答案:

答案 0 :(得分:0)

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

重启Docker解决了我的问题。

答案 1 :(得分:0)

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

npm config set registry "https://registry.npmjs.org"