10年前のサイトのアップデートに問題が発生

うーん。私も同様の問題に直面しているようです。10年前(!)のDiscourseインスタンスを実行しており、移行されたことはなく、一貫性のない更新が続けられてきました:slight_smile:

本日、ダッシュボード経由でDocker Managerを更新しようとしたところ、Admin設定(特に、「一部のフロントエンドコンポーネントを無効にしてみてください」メッセージによって生成されるCustomizeリンク)をレンダリングしようとすると、ブラウザコンソールに次のエラーが表示されます。

loader.js:247 Uncaught (in promise) Error: Could not find module `discourse/lib/decorators` imported from `discourse/plugins/docker_manager/discourse/routes/update`

CLIで再構築しようとすると、PUPSエラーが発生します。

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'yarn config set network-timeout 60000 -g' failed with return #<Process::Status: pid 280 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"yarn", "cmd"=>["if [ \"$version\" != \"tests-passed\" ]; then\n  rm -rf app/assets/javascripts/node_modules\nfi", "su discourse -c 'yarn config set network-timeout 60000 -g'", "su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

ブートストラップには他に明らかなエラーはありません。これはシングルコンテナインストールです…どのようにすればこの状況を抜け出せますか?サイトは現在も稼働していますが、かなり悪い状態です。

おっと、PUPSエラーはこれからのようです。

error This project's package.json defines "packageManager": "yarn@pnpm@9.15.5". However the current global version of Yarn is 1.22.22.

一体どうして…

結局、問題は解決しましたか? 古いセットアップで苦労するよりも、新しいサーバーにバックアップを復元する方が、ここでも最善の方法かもしれません。

わかりました!1年前にメインのバグを修正するためにコミットを cherry-pick したのですが、Docker update manager plugin がそれを気に入らなかったようです(detached git head のチェックがなかったのかもしれません)。それがデプロイを壊していました。最終的には、サーバーで git reset –hard && ./launcher rebuild app を実行することで修正できましたが、それまでは非常に混乱しました :slight_smile:

「いいね!」 4