From 6c37c5dacda89f53983a96753801a59d5fcf165f Mon Sep 17 00:00:00 2001 From: Jeremy <46999838+jeremy0519@users.noreply.github.com> Date: Sat, 7 Sep 2024 00:10:52 +0800 Subject: [PATCH] Update Discourse installation support in China (pnpm) (#867) This commit updates 2 things. 1. Updates the yarn hook to replace the npm mirror before `pnpm install`. 2. Removes the `yarn.lock` patch as pnpm is now used. After applying these modifications, I successfully installed Discourse on the Tencent Cloud China server. No more network problems. --- templates/web.china.template.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/web.china.template.yml b/templates/web.china.template.yml index eb6e5fb..fc95a0d 100644 --- a/templates/web.china.template.yml +++ b/templates/web.china.template.yml @@ -12,8 +12,7 @@ hooks: before_yarn: - exec: cmd: - - su discourse -c 'yarn config set registry https://registry.npmmirror.com --global' - - su discourse -c 'cd $home && sed -i "s#https://registry.yarnpkg.com#https://registry.npmmirror.com#g" yarn.lock' + - su discourse -c 'pnpm config set registry https://registry.npmmirror.com --global' before_bundle_exec: - exec: -- 2.25.1