mirror of
https://github.com/YunoHost-Apps/ghost_ynh.git
synced 2024-09-03 19:16:02 +02:00
Increase yarn network timeout to 10 minutes
We often run into the error, `An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.1.tgz: ESOCKETTIMEDOUT".` This seems to be a common problem with the date-fns package, as well as other large packages installed with older versions of Yarn. See for example the following GitHub issues: https://github.com/date-fns/date-fns/issues/1004 https://github.com/yarnpkg/yarn/issues/8242 The problem seems to be related to slow hard-disk access on the client server/VPS - so it's actually the storage connection and not the Internet connection, that's timing out. A common workaround for this is to increase the network timeout for Yarn long enough for the build will complete, which is what we're doing in this case since it's likely to affect a lot of the slower setups (including, as it seems, the YunoHost CI!). For everyone else, the worst case is that they'll have to wait 10 minutes before they realise there's actually something wrong with the network.
This commit is contained in:
parent
dec480e706
commit
d9efcf7942
2 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,8 @@ ynh_script_progression --message="Building Ghost... (this will take some time an
|
|||
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
# Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn config set network-timeout 600000
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn setup # catch-all command provided by Ghost that handles all the setup
|
||||
popd
|
||||
|
|
|
@ -176,6 +176,8 @@ then
|
|||
ynh_script_progression --message="Building Ghost... (this will take some time and resources!)"
|
||||
|
||||
pushd "$final_path"
|
||||
# Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn config set network-timeout 600000
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --non-interactive
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn setup
|
||||
|
|
Loading…
Add table
Reference in a new issue