I do not get an issue like that when I copy this problem and use it on a 2.19 server. (I did need to remove blank lines in between the [`` and ``] though. But I think those blank lines are just an artifact from when you pasted the problem code here.)
Can you check that your webwork2 and pg repositories are where they should be? What do you get from:
Can you check that your webwork2 and pg repositories are where they should be? What do you get from:
cd /opt/webwork/webwork2
git status
and from:
cd /opt/webwork/pg
git status
and then have you rebuilt dependencies and restarted both webwork2 and webwork2-job-queue?
cd /opt/webwork/webwork2/htdocs
npm ci
cd /opt/webwork/pg/htdocs
npm ci
sudo systemctl restart webwork2
sudo systemctl restart webwork2-job-queue