简体   繁体   中英

Cannot install jhipster-generator

I'm trying to follow the install guide on the jhipster website but i can't even run the first instruction, it keeps ETIMEDOUT'ing on me. I tred running it about 30 times now and it keeps failing (sometimes at different urls)

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.

It looks like it starts making hundreds of get requests and eventually the server refuses to respond to me. I don't get why these responses aren't cached locally so i don't have to perform hundreds of requests every time i retry

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

I was experiencing the same error, in my case it it was only when trying to to yarn add from a Docker container.

Restarting Docker fixed my problem.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM