Ah, a nice simple fix -- thank you!
I ended up needing to run "npm ci" twice. The first time was using Ubuntu 22.04's node package, which is still at version 12, and I got syntax errors. I ended up installing the official node 18 binaries from nodejs.org and using those, but apparently I did that after I'd started the webwork2 service and didn't think to restart it.
Thanks again!