说实话,这种频繁的升级还是比较容易出问题。
今天升级就出现了下面的这个问题。
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && if [ -f yarn.lock ]; then
if [ -d node_modules/.pnpm ]; then
echo "This version of Discourse uses yarn, but pnpm node_modules are preset. Cleaning up..."
find ./node_modules ./app/assets/javascripts/*/node_modules -mindepth 1 -maxdepth 1 -exec rm -rf {} +
fi
su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
else
su discourse -c 'CI=1 pnpm install --frozen-lockfile && pnpm prune'
fi failed with return #<Process::Status: pid 421 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 [ -f yarn.lock ]; then\n if [ -d node_modules/.pnpm ]; then\n echo \"This version of Discourse uses yarn, but pnpm node_modules are preset. Cleaning up...\"\n find ./node_modules ./app/assets/javascripts/*/node_modules -mindepth 1 -maxdepth 1 -exec rm -rf {} +\n fi\n su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'\nelse\n su discourse -c 'CI=1 pnpm install --frozen-lockfile && pnpm prune'\nfi"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
8aca470809dda6ed910eb4e64c0018b930db0678126c55b0983fa21320d4fb90
root@www:/var/discourse# dir
LICENSE README.md bin cids containers discourse-doctor discourse-setup image launcher samples scripts shared templates tests
root@www:/var/discourse# cd containers/
root@www:/var/discourse/containers# dir
app.yml
root@www:/var/discourse/containers# vi app.yml
root@www:/var/discourse/containers# cd ..
root@www:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
Ensuring launcher is up to date
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 app
后来发现,出现这个问题的原因是: npm registry 访问异常。
导致整个编译无法完成。
这个情况就是今天正好碰到服务不可用。